Development > Newbie Coding
Encumbrance/TU penalty
DarkRain:
Here's a new update on the onChange subject (wich I'm plannig to use for the encumbrance/TU penalty), this is a bit better than before
--- Quote from: bayo on September 06, 2010, 11:06:39 am ---Anyway, sorry, the container code is very very bad ATM, and hard to clean.
--- End quote ---
Well when I said
--- Quote ---not very elegant tough.
--- End quote ---
it was an understatment ;D
edit: forgot to attach diff and changed subject
bayo:
ammoNode = UI_GetNode(node->root, "equip_ammo")
i think ammoNode can be null. In this case it will crash. We also should protect null targetNode.
I can apply this current patch, and rework it a little. I dislike the way it work with "equip_ammo", anyway its greater than the previous code. Thanks a lot anyway, it's a good improvment for behaviour consistency.
One more time, i only talk about the node container code. Cause, the onChange event and everything from the UI script should not manage rules like that. That's the job of the inventory code (and all the crappy thing around, which anyway need, IMO, a deep refactoring).
bayo:
How should i credit you? any name and mail?
DarkRain:
spamtome [dot] 10 [at] gmail [dot] com
not really needed to credit me you know
bayo:
I apply it to the master. Thanks again for your contribution.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version