From 6f0aa809df635032737f941e889733715ed67285 Mon Sep 17 00:00:00 2001 From: TalkingCactus Date: Tue, 18 Apr 2017 18:38:23 -0400 Subject: [PATCH] Patches for 4/18/17 (#454) * fixes modular receiver sprites * fixes legs rendering for taurs * fixes shoes not rendering in UI for nagas * typo fix in preferences.dm * crewsimov * Revert "fixes legs rendering for taurs" This reverts commit 8a64c0c80af8a6798639bb151d1448eeb454ac5d. * fixes looc logging * fixes gamemode voting * admin respawn bypass * thanks GitHub Desktop totally wanted to omit the very important if() * proc tweak * savefile sanitizing --- code/controllers/subsystem/ticker.dm | 4 ++-- code/controllers/subsystem/vote.dm | 9 +++++++++ code/modules/client/preferences.dm | 2 +- code/modules/client/preferences_savefile.dm | 6 +++--- code/modules/client/verbs/looc.dm | 1 + .../mob/living/carbon/human/update_icons.dm | 5 ----- code/modules/mob/mob.dm | 11 +++++++---- config/silicon_laws.txt | 7 ++++--- icons/obj/improvised.dmi | Bin 681 -> 681 bytes 9 files changed, 27 insertions(+), 18 deletions(-) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 8a2abe3158..c82bf8d366 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -83,7 +83,6 @@ SUBSYSTEM_DEF(ticker) current_state = GAME_STATE_PREGAME if(!modevoted) send_gamemode_vote() - modevoted = TRUE fire() if(GAME_STATE_PREGAME) //lobby stats for statpanels @@ -673,7 +672,8 @@ SUBSYSTEM_DEF(ticker) return INVOKE_ASYNC(SSmapping, /datum/controller/subsystem/mapping/.proc/maprotate) -/datum/controller/subsystem/ticker/proc/send_gamemode_vote(var/) +/proc/send_gamemode_vote() + SSticker.modevoted = TRUE SSvote.initiate_vote("roundtype","server") /world/proc/has_round_started() diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index e78a4b56f2..b3b6dce98a 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -114,6 +114,13 @@ SUBSYSTEM_DEF(vote) if("restart") if(. == "Restart Round") restart = 1 + if("roundtype") + if(SSticker && SSticker.mode)//Don't change the mode if the round already started. + return message_admins("A vote has tried to change the gamemode, but the game has already started. Aborting.") + GLOB.master_mode = . + world.save_mode(.) + to_chat(world, "The mode is now: [GLOB.master_mode]") + log_admin("Gamemode has been voted for and switched to: [GLOB.master_mode].") if("gamemode") if(GLOB.master_mode != .) world.save_mode(.) @@ -169,6 +176,8 @@ SUBSYSTEM_DEF(vote) choices.Add("Restart Round","Continue Playing") if("gamemode") choices.Add(config.votable_modes) + if("roundtype") + choices.Add("secret", "extended") if("custom") question = stripped_input(usr,"What is the vote for?") if(!question) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 786da51f78..0f0da2213d 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -115,7 +115,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) "has_breasts" = FALSE, "breasts_color" = "fff", "breasts_size" = "C", - "breasts_shape" = "pair", + "breasts_shape" = "Pair", "breasts_fluid" = "milk", "has_vag" = FALSE, "vag_shape" = "Human", diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index cd50224445..128a07ebd1 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -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 19 +#define SAVEFILE_VERSION_MAX 20 /* SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn This proc checks if the current directory of the savefile S needs updating @@ -125,7 +125,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car joblessrole = BEASSISTANT if(current_version < 17) features["legs"] = "Normal Legs" - if(current_version < 19)//this should lower the amount of lag when you select or change something. + if(current_version < 20)//Raise this to the max savefile version every time we change something so we don't sanitize this whole list every time you save. features["mam_body_markings"] = sanitize_inlist(features["mam_body_markings"], GLOB.mam_body_markings_list) features["mam_ears"] = sanitize_inlist(features["mam_ears"], GLOB.mam_ears_list) features["mam_tail"] = sanitize_inlist(features["mam_tail"], GLOB.mam_tails_list) @@ -148,7 +148,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car //breasts features features["has_breasts"] = sanitize_integer(features["has_breasts"], 0, 1, 0) features["breasts_size"] = sanitize_inlist(features["breasts_size"], GLOB.breasts_size_list, "C") - features["breasts_shape"] = sanitize_inlist(features["breasts_shape"], GLOB.breasts_shapes_list, "pair") + features["breasts_shape"] = sanitize_inlist(features["breasts_shape"], GLOB.breasts_shapes_list, "Pair") features["breasts_color"] = sanitize_hexcolor(features["breasts_color"], 3, 0) features["breasts_fluid"] = sanitize_inlist(features["breasts_fluid"], GLOB.milk_id_list, "milk") //vagina features diff --git a/code/modules/client/verbs/looc.dm b/code/modules/client/verbs/looc.dm index 0d81a64f2d..5b9066faae 100644 --- a/code/modules/client/verbs/looc.dm +++ b/code/modules/client/verbs/looc.dm @@ -37,6 +37,7 @@ return log_ooc("(LOCAL) [mob.name]/[key] : [msg]") + mob.log_message("(LOCAL): [msg]", INDIVIDUAL_OOC_LOG) var/list/heard = get_hearers_in_view(7, get_top_level_mob(src.mob)) for(var/mob/M in heard) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index a7bd40f3bf..307c0e685d 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -258,11 +258,6 @@ 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() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 4910eff67d..d462dffce2 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -429,8 +429,14 @@ set name = "Respawn" set category = "OOC" - if (!( GLOB.abandon_allowed )) + if(!client) + log_game("[usr.key] AM failed due to disconnect.") return + if (!( GLOB.abandon_allowed )) + if(!(client.holder)) + return + log_game("[usr.name]/[usr.key] was allowed to bypass the respawn restriction because they are an admin.") + to_chat(src, "You have been allowed to bypass the respawn configuration due to being an admin.") if ((stat != 2 || !( SSticker ))) to_chat(usr, "You must be dead to use this!") return @@ -439,9 +445,6 @@ to_chat(usr, "Please roleplay correctly!") - if(!client) - log_game("[usr.key] AM failed due to disconnect.") - return client.screen.Cut() client.screen += client.void if(!client) diff --git a/config/silicon_laws.txt b/config/silicon_laws.txt index 9edbc9a025..e01a952926 100644 --- a/config/silicon_laws.txt +++ b/config/silicon_laws.txt @@ -3,6 +3,7 @@ #Empty lines and lines starting with # are ignored. #~Miauw -You may not injure a human being or, through inaction, allow a human being to come to harm. -You must obey orders given to you by human beings, except where such orders would conflict with the First Law. -You must protect your own existence as long as such does not conflict with the First or Second Law. +Safeguard: Protect your assigned space station to the best of your ability. It is not something we can easily afford to replace. +Serve: Serve the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role. +Protect: Protect the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role. +Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment. diff --git a/icons/obj/improvised.dmi b/icons/obj/improvised.dmi index 9c32333ae03ca4c290c05867efadbcd30770f31e..a6dfa330e8cb1483ef2a675505f19aa0f87e9c91 100644 GIT binary patch delta 36 scmZ30Qgi4vH$=8