MultiBrand (ready for review)
Since I've started branding, I'd like to allow slaves to be branded in more than one place. It seems to make sense, especially when branding them a second time currently gets rid of the first brand.
This mr allows multiple brands, and removal of any of them, thanks to objects (and ez) edit: snip cry for help to ez, thanks ez!
slaveInteract:
I would also like to thank Wakoma, who has suffered more in the multiverse than anyone could ever know.
Merge request reports
Activity
I would be happy to advise, but now I don't really understand what are you planning to achieve. This is because your explanation in the post contradicts the diff you posted.
Following the text, I suggest you to get rid of spaces in property names, replace
.brand
and.brandLocation
in theSlaveState
class with an instance of your newSlaveBrandState
class, and remove brackets in its constructor.Then the BC code. As far as I can tell, you need no map there. Just create the new attribute with default values and then assign:
const brand = new App.Entity.SlaveBrandState(); brand[slave.brandLocation] = slave.brand; // not sure here. Probably you need to replace `\s([a-z])' with uppercased `$1` delete slave.brandLocation; slave.bramd = brand;
added 20 commits
-
73bcec77...ca649b6d - 18 commits from branch
pregmodfan:pregmod-master
- 36cab1d1 - Merge branch 'pregmod-master' into MultiBrand
- 5a53e1e7 - tweak
-
73bcec77...ca649b6d - 18 commits from branch
added 11 commits
- a79353c3 - Added missing num()s
- 60d975cb - Removed unused code
- de8720fe - Minor bugfix
- fdd6f14a - Missed a fee
- 901f5c90 - Removed num() from slaveSummaryWidgets
- fce81df0 - Removed num() from storyCaption
- b5d7a14f - Handle old default placeholder for RA rules
- 2ddf3dd6 - Handle RA rules that were spiled by BC earlier
- 858677f0 - Ensure 'markings' RA settting exists
- 10fc1e1a - fixes
- 57ac0005 - fixes
Toggle commit listadded 26 commits
-
57ac0005...e2cc1264 - 25 commits from branch
pregmodfan:pregmod-master
- dedc4af2 - Merge branch 'pregmod-master' into MultiBrand
-
57ac0005...e2cc1264 - 25 commits from branch
added 2 commits
- Resolved by lowercasedonkey
- Resolved by ezsh
@ezsh If you're still on, another quick one for you. And thanks again for your help.
<<if $activeSlave.brand != 0>> <br> <<for _brandName, _brand range $activeSlave.brand>> <<if _brand == 0>> <<continue>> <<else>> $His _brandName is marked with _brand: <<capture _brandName>> <<link "Remove Brand">> <<set $brandApplied = 0>> <<set $activeSlave.brand.deleteAt(_brandName)>> <<run cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave)>> <<set $degradation -= 10>> <<goto "Body Modification">> <</link>> <</capture>> <br> <</if>> <</for>> <<else>> $His skin is unmarked. <</if>>
This link always comes back with
Error: <<set>>: bad evaluation: State.variables.activeSlave.brand.deleteAt is not a function.
Any idea why?Edited by lowercasedonkey
added 2 commits
- Resolved by lowercasedonkey
- Resolved by ezsh
added 2 commits