im not crazy but this commit breaks 90% of the game

This commit is contained in:
Timothy Teakettle
2021-05-05 18:11:05 +01:00
parent 1664459b14
commit ba71bb944a
9 changed files with 29 additions and 52 deletions
+2 -6
View File
@@ -529,7 +529,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(length(features[marking_type]))
dat += "<table>"
var/list/markings = features[marking_type]
for(var/list/marking_list in markings)
var/list/reverse_markings = reverseList(markings)
for(var/list/marking_list in reverse_markings)
var/marking_index = markings.Find(marking_list) // consider changing loop to go through indexes over lists instead of using Find here
var/actual_name = GLOB.bodypart_names[num2text(marking_list[1])] // get the actual name from the bitflag representing the part the marking is applied to
var/color_marking_dat = ""
@@ -2446,11 +2447,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
for(var/path in marking_list)
var/datum/sprite_accessory/S = marking_list[path]
if(istype(S))
// gross copypasta here because mam markings arent a subtype of regular markings despite one containing the other ???
if(istype(S, /datum/sprite_accessory/body_markings))
var/datum/sprite_accessory/body_markings/marking = S
if(!(limb_value in marking.covered_limbs))
continue
if(istype(S, /datum/sprite_accessory/mam_body_markings))
var/datum/sprite_accessory/mam_body_markings/marking = S
if(!(limb_value in marking.covered_limbs))
+7 -4
View File
@@ -295,11 +295,16 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
L -= ROLE_SYNDICATE
S["be_special"] << L
if(current_version < 51) // rp markings means markings are now stored as a list
if(current_version < 51) // rp markings means markings are now stored as a list, lizard markings now mam like the rest
var/marking_type
var/species_id = S["species"]
var/datum/species/actual_species = GLOB.species_datums[species_id]
if(actual_species.mutant_bodyparts["body_markings"] && S["feature_lizard_body_markings"]) marking_type = "feature_lizard_body_markings"
// convert lizard markings to lizard markings
if(species_id == SPECIES_LIZARD && S["feature_lizard_body_markings"])
S["feature_mam_body_markings"] = S["feature_lizard_body_markings"]
// convert mam body marking data to the new rp marking data
if(actual_species.mutant_bodyparts["mam_body_markings"] && S["feature_mam_body_markings"]) marking_type = "feature_mam_body_markings"
if(marking_type)
@@ -670,7 +675,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["feature_lizard_horns"] >> features["horns"]
S["feature_lizard_frills"] >> features["frills"]
S["feature_lizard_spines"] >> features["spines"]
features["body_markings"] = safe_json_decode(S["feature_lizard_body_markings"])
S["feature_lizard_legs"] >> features["legs"]
S["feature_human_tail"] >> features["tail_human"]
S["feature_human_ears"] >> features["ears"]
@@ -1037,7 +1041,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["feature_human_ears"] , features["ears"])
WRITE_FILE(S["feature_lizard_frills"] , features["frills"])
WRITE_FILE(S["feature_lizard_spines"] , features["spines"])
WRITE_FILE(S["feature_lizard_body_markings"] , safe_json_encode(features["body_markings"]))
WRITE_FILE(S["feature_lizard_legs"] , features["legs"])
WRITE_FILE(S["feature_deco_wings"] , features["deco_wings"])
WRITE_FILE(S["feature_horns_color"] , features["horns_color"])