Removes Lag (tm) (#313)

* sensible fixes

* this too

* some more

* fixes chair icons

reverted to state before tg pull

* fixes telecomms icons

revert to state before tg pull

* fixes research icons

reverted to before tg pull

* de-whitewashed the stools

* fixed missing broadcaster sprites

* always load from the savefile

helps custom servers who don't want to fuck with the config, this will
never not be wanted with the system we have

* stop it, ghosts

* fixes limb augmentation

https://github.com/tgstation/tgstation/pull/25446

* removes lag

* re-adds sounds

* exception

* makes travis happy
This commit is contained in:
TalkingCactus
2017-03-26 09:39:29 -04:00
committed by GitHub
parent 6db6e99830
commit c997ebcabd
41 changed files with 44165 additions and 118370 deletions
+3
View File
@@ -143,6 +143,9 @@ var/list/admin_verbs_debug = list(
/client/proc/check_bomb_impacts,
/proc/machine_upgrade,
/client/proc/populate_world,
//citadel code
/client/proc/give_humans_genitals,
/client/proc/test_mammal_overlays,
/client/proc/get_dynex_power, //*debug verbs for dynex explosions.
/client/proc/get_dynex_range, //*debug verbs for dynex explosions.
/client/proc/set_dynex_scale,
+37 -36
View File
@@ -2,7 +2,7 @@
#define SAVEFILE_VERSION_MIN 10
//This is the current version, anything below this will attempt to update (if it's not obsolete)
#define SAVEFILE_VERSION_MAX 17
#define SAVEFILE_VERSION_MAX 18
/*
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
This proc checks if the current directory of the savefile S needs updating
@@ -125,6 +125,36 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
joblessrole = BEASSISTANT
if(current_version < 17)
features["legs"] = "Normal Legs"
if(current_version < 18)//this should lower the amount of lag when you select or change something.
features["mam_body_markings"] = sanitize_inlist(features["mam_body_markings"], mam_body_markings_list)
features["mam_ears"] = sanitize_inlist(features["mam_ears"], mam_ears_list)
features["mam_tail"] = sanitize_inlist(features["mam_tail"], mam_tails_list)
features["taur"] = sanitize_inlist(features["taur"], taur_list)
//Xeno features
features["xenotail"] = sanitize_inlist(features["xenotail"], xeno_tail_list)
features["xenohead"] = sanitize_inlist(features["xenohead"], xeno_head_list)
features["xenodorsal"] = sanitize_inlist(features["xenodorsal"], xeno_dorsal_list)
//cock features
features["has_cock"] = sanitize_integer(features["has_cock"], 0, 1, 0)
features["cock_shape"] = sanitize_inlist(features["cock_shape"], cock_shapes_list, "Human")
features["cock_color"] = sanitize_hexcolor(features["cock_color"], 3, 0)
features["cock_length"] = sanitize_integer(features["cock_length"], COCK_SIZE_MIN, COCK_SIZE_MAX, 6)
//balls features
features["has_balls"] = sanitize_integer(features["has_balls"], 0, 1, 0)
features["balls_color"] = sanitize_hexcolor(features["balls_color"], 3, 0)
features["balls_size"] = sanitize_integer(features["balls_size"], BALLS_SIZE_MIN, BALLS_SIZE_MAX, BALLS_SIZE_DEF)
features["balls_sack_size"] = sanitize_integer(features["balls_sack_size"], BALLS_SACK_SIZE_MIN, BALLS_SACK_SIZE_MAX, BALLS_SACK_SIZE_DEF)
features["balls_fluid"] = sanitize_inlist(features["balls_fluid"], cum_id_list, "semen")
//breasts features
features["has_breasts"] = sanitize_integer(features["has_breasts"], 0, 1, 0)
features["breasts_size"] = sanitize_inlist(features["breasts_size"], breasts_size_list, "C")
features["breasts_color"] = sanitize_hexcolor(features["breasts_color"], 3, 0)
features["breasts_fluid"] = sanitize_inlist(features["breasts_fluid"], milk_id_list, "milk")
//vagina features
features["has_vag"] = sanitize_integer(features["has_vag"], 0, 1, 0)
features["vag_color"] = sanitize_hexcolor(features["vag_color"], 3, 0)
//womb features
features["has_womb"] = sanitize_integer(features["has_womb"], 0, 1, 0)
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
if(!ckey)
@@ -300,12 +330,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["feature_lizard_spines"] >> features["spines"]
S["feature_lizard_body_markings"] >> features["body_markings"]
S["feature_lizard_legs"] >> features["legs"]
if(!config.mutant_humans)
features["tail_human"] = "none"
features["ears"] = "none"
else
S["feature_human_tail"] >> features["tail_human"]
S["feature_human_ears"] >> features["ears"]
S["feature_human_tail"] >> features["tail_human"]
S["feature_human_ears"] >> features["ears"]
S["clown_name"] >> custom_names["clown"]
S["mime_name"] >> custom_names["mime"]
S["ai_name"] >> custom_names["ai"]
@@ -362,6 +388,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//vagina features
S["feature_has_vag"] >> features["has_vag"]
S["feature_vag_color"] >> features["vag_color"]
//womb features
S["feature_has_womb"] >> features["has_womb"]
//try to fix any outdated data if necessary
if(needs_update >= 0)
@@ -428,35 +456,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
features["mcolor3"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F")
features["mcolor2"] = sanitize_hexcolor(features["mcolor2"], 3, 0)
features["mcolor3"] = sanitize_hexcolor(features["mcolor3"], 3, 0)
features["mam_body_markings"] = sanitize_inlist(features["mam_body_markings"], mam_body_markings_list)
features["mam_ears"] = sanitize_inlist(features["mam_ears"], mam_ears_list)
features["mam_tail"] = sanitize_inlist(features["mam_tail"], mam_tails_list)
features["taur"] = sanitize_inlist(features["taur"], taur_list)
//Xeno features
features["xenotail"] = sanitize_inlist(features["xenotail"], xeno_tail_list)
features["xenohead"] = sanitize_inlist(features["xenohead"], xeno_head_list)
features["xenodorsal"] = sanitize_inlist(features["xenodorsal"], xeno_dorsal_list)
//cock features
features["has_cock"] = sanitize_integer(features["has_cock"], 0, 1, 0)
features["cock_shape"] = sanitize_inlist(features["cock_shape"], cock_shapes_list, "Human")
features["cock_color"] = sanitize_hexcolor(features["cock_color"], 3, 0)
features["cock_length"] = sanitize_integer(features["cock_length"], COCK_SIZE_MIN, COCK_SIZE_MAX, 6)
//balls features
features["has_balls"] = sanitize_integer(features["has_balls"], 0, 1, 0)
features["balls_color"] = sanitize_hexcolor(features["balls_color"], 3, 0)
features["balls_size"] = sanitize_integer(features["balls_size"], BALLS_SIZE_MIN, BALLS_SIZE_MAX, BALLS_SIZE_DEF)
features["balls_sack_size"] = sanitize_integer(features["balls_sack_size"], BALLS_SACK_SIZE_MIN, BALLS_SACK_SIZE_MAX, BALLS_SACK_SIZE_DEF)
features["balls_fluid"] = sanitize_inlist(features["balls_fluid"], cum_id_list, "semen")
//breasts features
features["has_breasts"] = sanitize_integer(features["has_breasts"], 0, 1, 0)
features["breasts_size"] = sanitize_inlist(features["breasts_size"], breasts_size_list, "C")
features["breasts_color"] = sanitize_hexcolor(features["breasts_color"], 3, 0)
features["breasts_fluid"] = sanitize_inlist(features["breasts_fluid"], milk_id_list, "milk")
//vagina features
features["has_vag"] = sanitize_integer(features["has_vag"], 0, 1, 0)
features["vag_color"] = sanitize_hexcolor(features["vag_color"], 3, 0)
return 1
/datum/preferences/proc/save_character()
@@ -553,6 +552,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//vagina features
S["feature_has_vag"] << features["has_vag"]
S["feature_vag_color"] << features["vag_color"]
//womb features
S["feature_has_womb"] << features["has_womb"]
return 1
+1 -1
View File
@@ -232,7 +232,7 @@
if(!(text2path(href_list["release"]) in stack_list))
return
var/obj/item/stack/sheet/inp = stack_list[text2path(href_list["release"])]
var/obj/item/stack/sheet/out = new inp.type(src,merge=FALSE)
var/obj/item/stack/sheet/out = new inp.type(src, 0, FALSE)
var/desired = input("How many sheets?", "How many sheets to eject?", 1) as null|num
out.amount = round(min(desired,50,inp.amount))
if(out.amount)
@@ -62,6 +62,7 @@
if(previewJob && !nude)
mannequin.job = previewJob.title
previewJob.equip(mannequin, TRUE)
mannequin.update_body()
CHECK_TICK
preview_icon = icon('icons/effects/effects.dmi', "nothing")
preview_icon.Scale((112), (32))
@@ -353,8 +353,6 @@
H.overlays_standing[BODY_LAYER] = standing
H.apply_overlay(BODY_LAYER)
//citadel code
handle_genitals(H)
handle_mutant_bodyparts(H)
/datum/species/proc/handle_mutant_bodyparts(mob/living/carbon/human/H, forced_colour)
@@ -3,7 +3,7 @@ datum/species/mammal
id = "mammal"
default_color = "4B4B4B"
species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR)
mutant_bodyparts = list("mam_tail", "mam_ears", "mam_body_markings", "snout", "legs", "taur")
mutant_bodyparts = list("mam_tail", "mam_ears", "mam_body_markings", "snout", "taur")
default_features = list("mcolor" = "FFF","mcolor2" = "FFF","mcolor3" = "FFF", "body_markings" = "None", "mam_tail" = "None", "mam_ears" = "None", "mam_body_markings" = "None", "taur" = "None")
attack_verb = "claw"
attack_sound = 'sound/weapons/slash.ogg'
@@ -60,6 +60,7 @@ There are several things that need to be remembered:
/mob/living/carbon/human/update_body()
remove_overlay(BODY_LAYER)
dna.species.handle_body(src)
dna.species.handle_genitals(src)
..()
/mob/living/carbon/human/update_fire()
@@ -73,6 +74,7 @@ There are several things that need to be remembered:
if(!..())
icon_render_key = null //invalidate bodyparts cache
update_body()
update_genitals()
update_hair()
update_inv_w_uniform()
update_inv_wear_id()
@@ -256,6 +258,11 @@ There are several things that need to be remembered:
if(get_num_legs() <2)
return
if("taur" in dna.species.mutant_bodyparts)
var/tpref = dna.features["taur"]
if(tpref == "Naga")
return
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_shoes]
inv.update_icon()
@@ -267,10 +274,7 @@ There are several things that need to be remembered:
client.screen += shoes //add it to client's screen
update_observer_view(shoes,1)
var/image/standing = shoes.build_worn_icon(state = shoes.icon_state, default_layer = SHOES_LAYER, default_icon_file = 'icons/mob/feet.dmi')
if("taur" in dna.species.mutant_bodyparts)
switch(dna.features["taur"])
if(!"Naga" || "None")
overlays_standing[SHOES_LAYER] = standing
overlays_standing[SHOES_LAYER] = standing
apply_overlay(SHOES_LAYER)
+3 -3
View File
@@ -320,9 +320,9 @@
I = image("icon"='icons/mob/human_parts.dmi', "icon_state"="[species_id]_[body_zone]", "layer"=-BODYPARTS_LAYER, "dir"=image_dir)
else
if(should_draw_gender)
I = image("icon"='icons/mob/augments.dmi', "icon_state"="[initial(icon_state)]_[icon_gender]", "layer"=-BODYPARTS_LAYER, "dir"=image_dir)
I = image("icon"= icon, "icon_state"="[body_zone]_[icon_gender]", "layer"=-BODYPARTS_LAYER, "dir"=image_dir)
else
I = image("icon"='icons/mob/augments.dmi', "icon_state"="[initial(icon_state)]", "layer"=-BODYPARTS_LAYER, "dir"=image_dir)
I = image("icon"= icon, "icon_state"="[body_zone]", "layer"=-BODYPARTS_LAYER, "dir"=image_dir)
standing += I
return standing
@@ -554,4 +554,4 @@
icon = 'icons/obj/surgery.dmi'
icon_state = "severedtail"
color = "#161"
var/markings = "Smooth"
var/markings = "Smooth"
@@ -1,5 +1,3 @@
/obj/item/bodypart/l_arm/robot
name = "cyborg left arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
@@ -7,7 +5,7 @@
item_state = "buildpipe"
icon = 'icons/obj/robot_parts.dmi'
flags = CONDUCT
icon_state = "l_arm"
icon_state = "borg_l_arm"
status = BODYPART_ROBOTIC
@@ -18,7 +16,7 @@
item_state = "buildpipe"
icon = 'icons/obj/robot_parts.dmi'
flags = CONDUCT
icon_state = "r_arm"
icon_state = "borg_r_arm"
status = BODYPART_ROBOTIC
@@ -29,7 +27,7 @@
item_state = "buildpipe"
icon = 'icons/obj/robot_parts.dmi'
flags = CONDUCT
icon_state = "l_leg"
icon_state = "borg_l_leg"
status = BODYPART_ROBOTIC
@@ -40,7 +38,7 @@
item_state = "buildpipe"
icon = 'icons/obj/robot_parts.dmi'
flags = CONDUCT
icon_state = "r_leg"
icon_state = "borg_r_leg"
status = BODYPART_ROBOTIC
@@ -50,7 +48,7 @@
item_state = "buildpipe"
icon = 'icons/obj/robot_parts.dmi'
flags = CONDUCT
icon_state = "chest"
icon_state = "borg_chest"
status = BODYPART_ROBOTIC
var/wired = 0
var/obj/item/weapon/stock_parts/cell/cell = null
@@ -100,7 +98,7 @@
item_state = "buildpipe"
icon = 'icons/obj/robot_parts.dmi'
flags = CONDUCT
icon_state = "head"
icon_state = "borg_head"
status = BODYPART_ROBOTIC
var/obj/item/device/assembly/flash/handheld/flash1 = null
var/obj/item/device/assembly/flash/handheld/flash2 = null
@@ -165,27 +163,27 @@
/obj/item/bodypart/l_arm/robot/surplus
name = "surplus prosthetic left arm"
desc = "A skeletal, robotic limb. Outdated and fragile, but it's still better than nothing."
icon = 'icons/mob/augments.dmi'
icon_state = "surplus_l_arm"
icon = 'icons/mob/surplus_augments.dmi'
icon_state = "l_arm"
max_damage = 20
/obj/item/bodypart/r_arm/robot/surplus
name = "surplus prosthetic right arm"
desc = "A skeletal, robotic limb. Outdated and fragile, but it's still better than nothing."
icon = 'icons/mob/augments.dmi'
icon_state = "surplus_r_arm"
icon = 'icons/mob/surplus_augments.dmi'
icon_state = "r_arm"
max_damage = 20
/obj/item/bodypart/l_leg/robot/surplus
name = "surplus prosthetic left leg"
desc = "A skeletal, robotic limb. Outdated and fragile, but it's still better than nothing."
icon = 'icons/mob/augments.dmi'
icon_state = "surplus_l_leg"
icon = 'icons/mob/surplus_augments.dmi'
icon_state = "l_leg"
max_damage = 20
/obj/item/bodypart/r_leg/robot/surplus
name = "surplus prosthetic right leg"
desc = "A skeletal, robotic limb. Outdated and fragile, but it's still better than nothing."
icon = 'icons/mob/augments.dmi'
icon = 'icons/mob/surplus_augments.dmi'
icon_state = "surplus_r_leg"
max_damage = 20
max_damage = 20
+4 -3
View File
@@ -1,4 +1,3 @@
/////AUGMENTATION SURGERIES//////
@@ -46,13 +45,15 @@
//SURGERY STEP SUCCESSES
/datum/surgery_step/add_limb/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
/datum/surgery_step/add_limb/success(mob/user, mob/living/carbon/target, target_zone, obj/item/bodypart/tool, datum/surgery/surgery)
if(L)
user.visible_message("[user] successfully augments [target]'s [parse_zone(target_zone)]!", "<span class='notice'>You successfully augment [target]'s [parse_zone(target_zone)].</span>")
L.change_bodypart_status(BODYPART_ROBOTIC, 1)
L.icon = tool.icon
L.max_damage = tool.max_damage
user.drop_item()
qdel(tool)
target.update_damage_overlays()
target.update_body_parts()
target.updatehealth()
add_logs(user, target, "augmented", addition="by giving him new [parse_zone(target_zone)] INTENT: [uppertext(user.a_intent)]")
else
@@ -62,6 +62,7 @@
S.icon_state = icon_state
S.origin_tech = origin_tech
S.w_class = w_class
S.color = color
return S