Merge pull request #1744 from VOREStation/aro-sizepersist

Persistent size between rounds
This commit is contained in:
Leshana
2017-06-16 11:55:56 -04:00
committed by GitHub
2 changed files with 9 additions and 2 deletions
@@ -2,8 +2,9 @@
#define PERSIST_WEIGHT 0x02 // Persist mob weight
#define PERSIST_ORGANS 0x04 // Persist the status (normal/amputated/robotic/etc) and model (for robotic) status of organs
#define PERSIST_MARKINGS 0x08 // Persist markings
#define PERSIST_COUNT 4 // Number of valid bits in this bitflag. Keep this updated!
#define PERSIST_DEFAULT PERSIST_SPAWN|PERSIST_ORGANS|PERSIST_MARKINGS // Default setting for new folks
#define PERSIST_SIZE 0x10 // Persist size
#define PERSIST_COUNT 5 // Number of valid bits in this bitflag. Keep this updated!
#define PERSIST_DEFAULT PERSIST_SPAWN|PERSIST_ORGANS|PERSIST_MARKINGS|PERSIST_SIZE // Default setting for new folks
// Define a place to save in character setup
/datum/preferences
@@ -45,6 +46,10 @@
. += make_yesno(PERSIST_MARKINGS)
. += "</tr>"
. += "<tr><td title=\"Update character scale based on what you were at round end.\">Save Scale: </td>"
. += make_yesno(PERSIST_SIZE)
. += "</tr>"
. += "</table>"
return jointext(., "")
+2
View File
@@ -102,6 +102,8 @@
if(prefs.persistence_settings & PERSIST_WEIGHT)
resolve_excess_nutrition(H)
prefs.weight_vr = H.weight
if(prefs.persistence_settings & PERSIST_SIZE)
prefs.size_multiplier = H.size_multiplier
prefs.save_character()