Human icon key & preferences tweaks (#3274)

changes:

Reworked how human body icon keys are generated; resulting keys should be much shorter now and involve less duplication of the same string.
Players are now shown a message when they try to add markings to a species that has none available.
Admin revive for human-types will now also re-apply their organ and marking prefs.
Admin revive now also resets shock_stage (fixes rejuv'd mobs being slow for a while)
This commit is contained in:
Lohikar
2017-08-14 01:01:40 +03:00
committed by Erki
parent 7ce566f472
commit eace452b30
10 changed files with 114 additions and 68 deletions
@@ -462,6 +462,10 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else if(!(pref.species in S.species_allowed))
usable_markings -= M
if (!usable_markings.len)
alert(user, "This species does not have any body markings available.")
return TOPIC_NOACTION
var/new_marking = input(user, "Choose a body marking:", "Character Preference") as null|anything in usable_markings
if(new_marking && CanUseTopic(user))
pref.body_markings[new_marking] = "#000000" //New markings start black
+2 -42
View File
@@ -363,48 +363,8 @@ datum/preferences
character.skills = skills
character.used_skillpoints = used_skillpoints
// Destroy/cyborgize organs
for(var/name in organ_data)
var/status = organ_data[name]
var/obj/item/organ/external/O = character.organs_by_name[name]
if(O)
O.status = 0
if(status == "amputated")
character.organs_by_name[O.limb_name] = null
character.organs -= O
if(O.children) // This might need to become recursive.
for(var/obj/item/organ/external/child in O.children)
character.organs_by_name[child.limb_name] = null
character.organs -= child
else if(status == "cyborg")
if(rlimb_data[name])
O.robotize(rlimb_data[name])
else
O.robotize()
else
var/obj/item/organ/I = character.internal_organs_by_name[name]
if(I)
if(status == "assisted")
I.mechassist()
else if(status == "mechanical")
I.robotize()
for(var/N in character.organs_by_name)
var/obj/item/organ/external/O = character.organs_by_name[N]
if (O)
O.markings.Cut()
for(var/M in body_markings)
var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[M]
var/mark_color = "[body_markings[M]]"
for(var/BP in mark_datum.body_parts)
var/obj/item/organ/external/O = character.organs_by_name[BP]
if(O)
O.markings[M] = list("color" = mark_color, "datum" = mark_datum)
// Destroy/cyborgize organs & setup body markings
character.sync_organ_prefs_to_mob(src)
character.underwear = underwear