diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index d4721aa8114..62c97f8807c 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -443,8 +443,8 @@ if(pressure <= LAVALAND_EQUIPMENT_EFFECT_PRESSURE) . = TRUE -/proc/pollCandidatesWithVeto(adminclient, adminusr, max_slots, Question, be_special_type, antag_age_check = FALSE, poll_time = 300, ignore_respawnability = FALSE, min_hours = FALSE, flashwindow = TRUE, check_antaghud = TRUE, source) - var/list/willing_ghosts = SSghost_spawns.poll_candidates(Question, be_special_type, antag_age_check, poll_time, ignore_respawnability, min_hours, flashwindow, check_antaghud, source) +/proc/pollCandidatesWithVeto(adminclient, adminusr, max_slots, Question, be_special_type, antag_age_check = FALSE, poll_time = 300, ignore_respawnability = FALSE, min_hours = FALSE, flashwindow = TRUE, check_antaghud = TRUE, source, role_cleanname) + var/list/willing_ghosts = SSghost_spawns.poll_candidates(Question, be_special_type, antag_age_check, poll_time, ignore_respawnability, min_hours, flashwindow, check_antaghud, source, role_cleanname) var/list/selected_ghosts = list() if(!willing_ghosts.len) return selected_ghosts diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 7b53bce22de..a07a29ccc53 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -570,10 +570,7 @@ so as to remain in compliance with the most up-to-date laws." G.ManualFollow(target) /obj/screen/alert/notify_action/Topic(href, href_list) - if(..()) - return TRUE - - if(href_list["signup"] && isobserver(usr) && poll?.sign_up(usr)) + if(href_list["signup"] && poll?.sign_up(usr)) display_signed_up() /obj/screen/alert/notify_action/proc/display_signed_up() diff --git a/code/controllers/subsystem/ghost_spawns.dm b/code/controllers/subsystem/ghost_spawns.dm index ea0aefb88bd..d8a4f29e20d 100644 --- a/code/controllers/subsystem/ghost_spawns.dm +++ b/code/controllers/subsystem/ghost_spawns.dm @@ -41,9 +41,10 @@ SUBSYSTEM_DEF(ghost_spawns) * * flash_window - Whether the poll should flash a potential candidate's game window * * check_antaghud - Whether to filter out potential candidates who enabled AntagHUD * * source - The atom, atom prototype, icon or mutable appearance to display as an icon in the alert + * * role_cleanname - The name override to display to clients */ -/datum/controller/subsystem/ghost_spawns/proc/poll_candidates(question = "Would you like to play a special role?", role, antag_age_check = FALSE, poll_time = 30 SECONDS, ignore_respawnability = FALSE, min_hours = 0, flash_window = TRUE, check_antaghud = TRUE, source) - log_debug("Polling candidates [role ? "for [get_roletext(role)]" : "\"[question]\""] for [poll_time / 10] seconds") +/datum/controller/subsystem/ghost_spawns/proc/poll_candidates(question = "Would you like to play a special role?", role, antag_age_check = FALSE, poll_time = 30 SECONDS, ignore_respawnability = FALSE, min_hours = 0, flash_window = TRUE, check_antaghud = TRUE, source, role_cleanname) + log_debug("Polling candidates [role ? "for [role_cleanname || get_roletext(role)]" : "\"[question]\""] for [poll_time / 10] seconds") // Start firing polls_active = TRUE @@ -130,7 +131,7 @@ SUBSYSTEM_DEF(ghost_spawns) if(isatom(source)) act_jump = "\[Teleport]" var/act_signup = "\[Sign Up]" - to_chat(M, "Now looking for candidates [role ? "to play as \an [get_roletext(role)]" : "\"[question]\""]. [act_jump] [act_signup]") + to_chat(M, "Now looking for candidates [role ? "to play as \an [role_cleanname || get_roletext(role)]" : "\"[question]\""]. [act_jump] [act_signup]") // Start processing it so it updates visually the timer START_PROCESSING(SSprocessing, A) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 307d3c20445..cc8b2dd5e97 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -113,6 +113,11 @@ A.on_body_transfer(old_current, current) transfer_antag_huds(hud_to_transfer) //inherit the antag HUD transfer_actions(new_character) + if(martial_art) + if(martial_art.temporary) + martial_art.remove(current) + else + martial_art.teach(current) if(active) new_character.key = key //now transfer the key to link the client to our new body diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 20ff79041a9..adbed5f15eb 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -571,20 +571,22 @@ event = null else if(href_list["killcrew"]) //shoot a crewmember + if(length(settlers) <= 0 || alive <= 0) + return var/sheriff = remove_crewmember() //I shot the sheriff - playsound(loc,'sound/weapons/gunshots/gunshot.ogg', 100, 1) + playsound(loc, 'sound/weapons/gunshots/gunshot.ogg', 100, 1) - if(settlers.len == 0 || alive == 0) + if(length(settlers) == 0 || alive == 0) atom_say("The last crewmember [sheriff], shot themselves, GAME OVER!") if(emagged) - usr.death(0) - emagged = 0 - gameover = 1 + usr.death(FALSE) + emagged = FALSE + gameover = TRUE event = null else if(emagged) if(usr.name == sheriff) atom_say("The crew of the ship chose to kill [usr.name]!") - usr.death(0) + usr.death(FALSE) if(event == ORION_TRAIL_LING) //only ends the ORION_TRAIL_LING event, since you can do this action in multiple places event = null diff --git a/code/game/machinery/poolcontroller.dm b/code/game/machinery/poolcontroller.dm index b910b1272ff..777aa155a62 100644 --- a/code/game/machinery/poolcontroller.dm +++ b/code/game/machinery/poolcontroller.dm @@ -15,7 +15,6 @@ var/decalinpool = list() // List containing all of the cleanable decals in pool var/linked_area = null var/temperature = NORMAL //The temperature of the pool, starts off on normal, which has no effects. - var/temperaturecolor = "" //used for nanoUI fancyness var/srange = 5 //The range of the search for pool turfs, change this for bigger or smaller pools. var/list/linkedmist = list() //Used to keep track of created mist var/deep_water = FALSE //set to 1 to drown even standing people @@ -67,8 +66,8 @@ else to_chat(user, "Nothing happens.")//If not emagged, don't do anything, and don't tell the user that it can be emagged. -/obj/machinery/poolcontroller/attack_hand(mob/user as mob) - ui_interact(user) +/obj/machinery/poolcontroller/attack_hand(mob/user) + tgui_interact(user) /obj/machinery/poolcontroller/process() processMob() //Call the mob affecting proc @@ -151,64 +150,74 @@ linkedmist.Cut() -/obj/machinery/poolcontroller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) +/obj/machinery/poolcontroller/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = TRUE, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) - ui = new(user, src, ui_key, "poolcontroller.tmpl", "Pool Controller Interface", 520, 410) + ui = new(user, src, ui_key, "PoolController", "Pool Controller Interface", 520, 410) ui.open() -/obj/machinery/poolcontroller/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state) - var/data[0] - var/currenttemp - switch(temperature) //So we can output nice things like "Cool" to nanoUI +/obj/machinery/poolcontroller/proc/temp_to_str(temp) + switch(temp) //So we can output nice things like "Cool" to tgUI if(FRIGID) - currenttemp = "frigid" + return "frigid" if(COOL) - currenttemp = "cool" + return "cool" if(NORMAL) - currenttemp = "normal" + return "normal" if(WARM) - currenttemp = "warm" + return "warm" if(SCALDING) - currenttemp = "scalding" - data["currentTemp"] = currenttemp + return "scalding" + +/obj/machinery/poolcontroller/proc/set_temp(val) + if (val != WARM && val != NORMAL && val != COOL && !(emagged && (val == SCALDING || val == FRIGID))) + return + + if(val == SCALDING) + miston() + else + mistoff() + + temperature = val + + +/obj/machinery/poolcontroller/proc/str_to_temp(str) + switch(str) + if("frigid") + return FRIGID + if("cool") + return COOL + if("normal") + return NORMAL + if("warm") + return WARM + if("scalding") + return SCALDING + +/obj/machinery/poolcontroller/proc/set_temp_str(target) + var/temp = str_to_temp(target) + if(temp) + set_temp(temp) + + +/obj/machinery/poolcontroller/tgui_data(mob/user) + var/list/data = list() + data["currentTemp"] = temp_to_str(temperature) data["emagged"] = emagged - data["TempColor"] = temperaturecolor return data -/obj/machinery/poolcontroller/Topic(href, href_list) +/obj/machinery/poolcontroller/tgui_act(action, list/params) if(..()) - return 1 + return - switch(href_list["temp"]) - if("Scalding") - if(!emagged) - return 0 - temperature = SCALDING - temperaturecolor = "#FF0000" - miston() - if("Frigid") - if(!emagged) - return 0 - temperature = FRIGID - temperaturecolor = "#00CCCC" - mistoff() - if("Warm") - temperature = WARM - temperaturecolor = "#990000" - mistoff() - if("Cool") - temperature = COOL - temperaturecolor = "#009999" - mistoff() - if("Normal") - temperature = NORMAL - temperaturecolor = "" - mistoff() + switch(action) + if("setTemp") + set_temp_str(params["temp"]) + return TRUE - return 1 + return FALSE #undef FRIGID #undef COOL diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm index 2305eabb654..f2ccc0c1aa1 100644 --- a/code/game/objects/items/devices/camera_bug.dm +++ b/code/game/objects/items/devices/camera_bug.dm @@ -10,11 +10,16 @@ throw_range = 20 origin_tech = "syndicate=1;engineering=3" /// Integrated camera console to serve UI data - var/obj/machinery/computer/security/integrated_console + var/obj/machinery/computer/security/camera_bug/integrated_console + +/obj/machinery/computer/security/camera_bug + name = "invasive camera utility" + desc = "How did this get here?! Please report this as a bug to github" + use_power = NO_POWER_USE /obj/item/camera_bug/Initialize(mapload) . = ..() - integrated_console = new + integrated_console = new(src) integrated_console.parent = src integrated_console.network = list("SS13") diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 2390394b280..262fab1775c 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -3577,7 +3577,7 @@ var/datum/outfit/O = hunter_outfits[dresscode] message_admins("[key_name_admin(mob)] is sending a ([dresscode]) to [killthem ? "assassinate" : "protect"] [key_name_admin(H)]...") var/image/source = image('icons/obj/cardboard_cutout.dmi', "cutout_traitor") - var/list/candidates = SSghost_spawns.poll_candidates("Play as a [killthem ? "murderous" : "protective"] [dresscode]?", ROLE_TRAITOR, TRUE, source = source) + var/list/candidates = SSghost_spawns.poll_candidates("Play as a [killthem ? "murderous" : "protective"] [dresscode]?", ROLE_TRAITOR, TRUE, source = source, role_cleanname = "[killthem ? "murderous" : "protective"] [dresscode]") if(!candidates.len) to_chat(usr, "ERROR: Could not create eventmob. No valid candidates.") return diff --git a/code/modules/admin/verbs/gimmick_team.dm b/code/modules/admin/verbs/gimmick_team.dm index 3403a4417cf..3080ef5706d 100644 --- a/code/modules/admin/verbs/gimmick_team.dm +++ b/code/modules/admin/verbs/gimmick_team.dm @@ -53,7 +53,7 @@ players_to_spawn += candidate else to_chat(src, "Polling candidates...") - players_to_spawn = SSghost_spawns.poll_candidates("Do you want to play as \a [O.name]?") + players_to_spawn = SSghost_spawns.poll_candidates("Do you want to play as \a [initial(O.name)]?") if(!players_to_spawn.len) to_chat(src, "Nobody volunteered.") @@ -93,4 +93,3 @@ feedback_add_details("admin_verb","SPAWNGIM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! // --------------------------------------------------------------------------------------------------------- - diff --git a/code/modules/admin/verbs/infiltratorteam_syndicate.dm b/code/modules/admin/verbs/infiltratorteam_syndicate.dm index d4ea1a0dd2e..a4e12d8d768 100644 --- a/code/modules/admin/verbs/infiltratorteam_syndicate.dm +++ b/code/modules/admin/verbs/infiltratorteam_syndicate.dm @@ -55,8 +55,8 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0) infiltrators += candidate else to_chat(src, "Polling candidates...") - var/mutable_appearance/ma = new('icons/mob/simple_human.dmi', "syndicate") - infiltrators = SSghost_spawns.poll_candidates("Do you want to play as a SYNDICATE INFILTRATOR?", ROLE_TRAITOR, TRUE, source = ma) + var/image/I = new('icons/obj/cardboard_cutout.dmi', "cutout_sit") + infiltrators = SSghost_spawns.poll_candidates("Do you want to play as a Syndicate infiltrator?", ROLE_TRAITOR, TRUE, source = I, role_cleanname = "Syndicate infiltrator") if(!infiltrators.len) to_chat(src, "Nobody volunteered.") diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 0e769ed3e73..779687b2501 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -137,8 +137,8 @@ var/confirm = alert("Are you sure?", "Confirm creation", "Yes", "No") if(confirm != "Yes") return 0 - var/mutable_appearance/ma = new('icons/mob/simple_human.dmi', "wizard") - var/list/candidates = SSghost_spawns.poll_candidates("Do you wish to be considered for the position of a Wizard Foundation 'diplomat'?", "wizard", source = ma) + var/image/I = new('icons/mob/simple_human.dmi', "wizard") + var/list/candidates = SSghost_spawns.poll_candidates("Do you wish to be considered for the position of a Wizard Foundation 'diplomat'?", "wizard", source = I) log_admin("[key_name(owner)] tried making a Wizard with One-Click-Antag") message_admins("[key_name_admin(owner)] tried making a Wizard with One-Click-Antag") diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm index 405c1d3c3d2..dab21cfa8a1 100644 --- a/code/modules/admin/verbs/striketeam_syndicate.dm +++ b/code/modules/admin/verbs/striketeam_syndicate.dm @@ -45,7 +45,8 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0) break // Find ghosts willing to be SST - var/list/commando_ghosts = pollCandidatesWithVeto(src, usr, SYNDICATE_COMMANDOS_POSSIBLE, "Join the Syndicate Strike Team?",, 21, 60 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE) + var/image/I = new('icons/obj/cardboard_cutout.dmi', "cutout_commando") + var/list/commando_ghosts = pollCandidatesWithVeto(src, usr, SYNDICATE_COMMANDOS_POSSIBLE, "Join the Syndicate Strike Team?",, 21, 60 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE, source = I) if(!commando_ghosts.len) to_chat(usr, "Nobody volunteered to join the SST.") return diff --git a/code/modules/antagonists/_common/antag_spawner.dm b/code/modules/antagonists/_common/antag_spawner.dm index 82f492d214b..35dfc22b1fb 100644 --- a/code/modules/antagonists/_common/antag_spawner.dm +++ b/code/modules/antagonists/_common/antag_spawner.dm @@ -46,8 +46,8 @@ checking = TRUE to_chat(user, "You activate [src] and wait for confirmation.") - var/mutable_appearance/ma = new('icons/mob/simple_human.dmi', "syndicate_space_sword") - var/list/nuke_candidates = SSghost_spawns.poll_candidates("Do you want to play as a [rolename]?", ROLE_OPERATIVE, TRUE, 15 SECONDS, source = ma) + var/image/I = new('icons/mob/simple_human.dmi', "syndicate_space_sword") + var/list/nuke_candidates = SSghost_spawns.poll_candidates("Do you want to play as a [rolename]?", ROLE_OPERATIVE, TRUE, 15 SECONDS, source = I) if(LAZYLEN(nuke_candidates)) checking = FALSE if(QDELETED(src) || !check_usability(user)) diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm index 50ca634a22f..cc8c1e9933b 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -140,9 +140,10 @@ return if(H.mind.martial_art != src) return - H.mind.martial_art = base - if(has_explaination_verb && !(base && base.has_explaination_verb)) - H.verbs -= /mob/living/carbon/human/proc/martial_arts_help + H.mind.martial_art = null // Remove reference + H.verbs -= /mob/living/carbon/human/proc/martial_arts_help + if(base) + base.teach(H) /mob/living/carbon/human/proc/martial_arts_help() set name = "Show Info" diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index 54c23c89b5d..7de33866d46 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -220,8 +220,9 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ var/datum/wires/explosive/gibtonite/wires /obj/item/twohanded/required/gibtonite/Destroy() - SStgui.close_uis(wires) - QDEL_NULL(wires) + if(wires) + SStgui.close_uis(wires) + QDEL_NULL(wires) return ..() /obj/item/twohanded/required/gibtonite/attackby(obj/item/I, mob/user, params) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index cf61162733e..87d7165b8d3 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -14,19 +14,20 @@ emp_act return FALSE if(P.is_reflectable) var/can_reflect = check_reflect(def_zone) - if(!can_reflect) - return (..(P , def_zone)) //Bad luck - else - if(can_reflect == 2) //If target is holding a toy sword - var/list/safe_list = list(/obj/item/projectile/beam/lasertag, /obj/item/projectile/beam/practice) - if(!is_type_in_list(P, safe_list)) //And it's not safe - return (..(P , def_zone)) //Bad luck - visible_message("The [P.name] gets reflected by [src]!", \ + if(can_reflect == 1) // proper reflection + visible_message("The [P.name] gets reflected by [src]!", \ "The [P.name] gets reflected by [src]!") + P.reflect_back(src) + return -1 // complete projectile permutation - P.reflect_back(src) + else if(can_reflect == 2) //If target is holding a toy sword + var/list/safe_list = list(/obj/item/projectile/beam/lasertag, /obj/item/projectile/beam/practice) + if(is_type_in_list(P, safe_list)) //And it's safe + visible_message("The [P.name] gets reflected by [src]!", \ + "The [P.name] gets reflected by [src]!") + P.reflect_back(src) + return -1 // complete projectile permutation - return -1 // complete projectile permutation //Shields if(check_shields(P, P.damage, "the [P.name]", PROJECTILE_ATTACK, P.armour_penetration)) diff --git a/code/modules/mob/living/carbon/human/species/diona.dm b/code/modules/mob/living/carbon/human/species/diona.dm index 2ce011c7159..133a334a998 100644 --- a/code/modules/mob/living/carbon/human/species/diona.dm +++ b/code/modules/mob/living/carbon/human/species/diona.dm @@ -85,9 +85,8 @@ return ..() /datum/species/diona/handle_life(mob/living/carbon/human/H) - if(H.stat == DEAD) - return var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing + var/is_vamp = H.mind?.vampire != null if(isturf(H.loc)) //else, there's considered to be no light var/turf/T = H.loc light_amount = min(1, T.get_lumcount()) - 0.5 @@ -95,9 +94,12 @@ H.clear_alert("nolight") else H.throw_alert("nolight", /obj/screen/alert/nolight) - H.adjust_nutrition(light_amount * 10) - if(H.nutrition > NUTRITION_LEVEL_ALMOST_FULL) - H.set_nutrition(NUTRITION_LEVEL_ALMOST_FULL) + + if(!is_vamp) + H.adjust_nutrition(light_amount * 10) + if(H.nutrition > NUTRITION_LEVEL_ALMOST_FULL) + H.set_nutrition(NUTRITION_LEVEL_ALMOST_FULL) + if(light_amount > 0.2 && !H.suiciding) //if there's enough light, heal if(!pod && H.health <= 0) return @@ -106,7 +108,7 @@ H.adjustToxLoss(-1) H.adjustOxyLoss(-1) - if(H.nutrition < NUTRITION_LEVEL_STARVING + 50) + if(!is_vamp && H.nutrition < NUTRITION_LEVEL_STARVING + 50) H.adjustBruteLoss(2) ..() diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm index 8f423dfb5d2..e78acd08a90 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm @@ -366,3 +366,7 @@ /obj/structure/spider/terrorweb/queen/CanAtmosPass(turf/T) return FALSE +/obj/structure/spider/terrorweb/queen/Destroy() + var/turf/T = get_turf(src) + . = ..() + T.air_update_turf(TRUE) diff --git a/icons/obj/cardboard_cutout.dmi b/icons/obj/cardboard_cutout.dmi index da5f58d7f7c..63f65c7d07f 100644 Binary files a/icons/obj/cardboard_cutout.dmi and b/icons/obj/cardboard_cutout.dmi differ diff --git a/nano/templates/poolcontroller.tmpl b/nano/templates/poolcontroller.tmpl deleted file mode 100644 index 3492aa8f85f..00000000000 --- a/nano/templates/poolcontroller.tmpl +++ /dev/null @@ -1,55 +0,0 @@ - -