diff --git a/code/game/response_team.dm b/code/game/response_team.dm index 19d827640f2..282db62f72b 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -55,15 +55,16 @@ client/verb/JoinResponseTeam() if(response_team_members.len > 5) usr << "The emergency response team is already full!" - var/leader_selected = (response_team_members.len == 0) - for (var/obj/effect/landmark/L in landmarks_list) if (L.name == "Commando") - + L.name = null//Reserving the place. var/new_name = input(usr, "Pick a name","Name") as null|text - if(!new_name) return - var/mob/living/carbon/human/new_commando = create_response_team(L, leader_selected, new_name) - + if(!new_name)//Somebody changed his mind, place is available again. + L.name = "Commando" + return + var/leader_selected = isemptylist(response_team_members) + var/mob/living/carbon/human/new_commando = create_response_team(L.loc, leader_selected, new_name) + del(L) new_commando.mind.key = usr.key new_commando.key = usr.key @@ -73,7 +74,7 @@ client/verb/JoinResponseTeam() new_commando << "As member of the Emergency Response Team, you answer only to your leader and CentComm officials." else new_commando << "As leader of the Emergency Response Team, you answer only to CentComm, and have authority to override the Captain where it is necessary to achieve your mission goals. It is recommended that you attempt to cooperate with the captain where possible, however." - del(L) + return else usr << "You need to be an observer or new player to use this." @@ -272,9 +273,8 @@ proc/trigger_armed_response_team(var/force = 0) M.mind.special_role = "Response Team" if(!(M.mind in ticker.minds)) ticker.minds += M.mind//Adds them to regular mind list. - M.loc = spawn_location.loc + M.loc = spawn_location M.equip_strike_team(leader_selected) - del(spawn_location) return M /mob/living/carbon/human/proc/equip_strike_team(leader_selected = 0) @@ -316,19 +316,12 @@ proc/trigger_armed_response_team(var/force = 0) equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(src), slot_in_backpack) */ var/obj/item/weapon/card/id/W = new(src) - W.name = "[real_name]'s ID Card (Emergency Response Team)" - W.icon_state = "centcom" - if(leader_selected) - W.name = "[real_name]'s ID Card (Emergency Response Team Leader)" - W.access = get_all_accesses() - W.access += get_all_centcom_access() - W.assignment = "Emergency Response Team Leader" - else - W.access = get_all_accesses() - W.access += get_all_centcom_access() - W.assignment = "Emergency Response Team" - W.access += list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage)//Let's add their alloted CentCom access. + W.assignment = "Emergency Response Team[leader_selected ? " Leader" : ""]" W.registered_name = real_name + W.name = "[real_name]'s ID Card ([W.assignment])" + W.icon_state = "centcom" + W.access = get_all_accesses() + W.access += get_all_centcom_access() equip_to_slot_or_del(W, slot_wear_id) return 1 diff --git a/code/modules/virus2/centrifuge.dm b/code/modules/virus2/centrifuge.dm index aadada0b2df..651d36ce0a3 100644 --- a/code/modules/virus2/centrifuge.dm +++ b/code/modules/virus2/centrifuge.dm @@ -31,7 +31,7 @@ /obj/machinery/computer/centrifuge/attack_hand(var/mob/user as mob) if(..()) return - user.machine = src + user.set_machine(src) var/dat= "" if(curing) dat = "Antibody isolation in progress" @@ -86,12 +86,15 @@ if(sample) isolate() update_icon() + + src.updateUsrDialog() return /obj/machinery/computer/centrifuge/Topic(href, href_list) if(..()) return - usr.machine = src + + if(usr) usr.set_machine(src) switch(href_list["action"]) if("antibody") @@ -99,33 +102,27 @@ var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list if (!B) state("\The [src.name] buzzes, \"No antibody carrier detected.\"", "blue") - return - if(sample.reagents.has_reagent("toxins")) + else if(sample.reagents.has_reagent("toxins")) state("\The [src.name] beeps, \"Pathogen purging speed above nominal.\"", "blue") delay = delay/2 - return - curing = delay - playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1) - update_icon() + else + curing = delay + playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1) + update_icon() if("isolate") var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list - if (!B) - return - - var/list/virus = virus_copylist(B.data["virus2"]) - var/choice = href_list["isolate"]; - if (choice in virus) - virus2 = virus[choice] - else - state("\The [src.name] buzzes, \"No such pathogen detected.\"", "blue") - return - isolating = 40 - update_icon() - src.updateUsrDialog() - return + if (B) + var/list/virus = virus_copylist(B.data["virus2"]) + var/choice = href_list["isolate"] + if (choice in virus) + virus2 = virus[choice] + isolating = 40 + update_icon() + else + state("\The [src.name] buzzes, \"No such pathogen detected.\"", "blue") if("sample") if(sample) diff --git a/code/modules/virus2/diseasesplicer.dm b/code/modules/virus2/diseasesplicer.dm index d1ac117c383..c39f1d02dfc 100644 --- a/code/modules/virus2/diseasesplicer.dm +++ b/code/modules/virus2/diseasesplicer.dm @@ -39,7 +39,7 @@ /obj/machinery/computer/diseasesplicer/attack_hand(var/mob/user as mob) if(..()) return - user.machine = src + user.set_machine(src) var/dat if(splicing) dat = "Splicing in progress." @@ -111,12 +111,15 @@ d.effect = memorybank state("The [src.name] zings", "blue") + src.updateUsrDialog() return /obj/machinery/computer/diseasesplicer/Topic(href, href_list) if(..()) return + if(usr) usr.set_machine(src) + if (href_list["grab"]) memorybank = locate(href_list["grab"]) analysed = dish.analysed diff --git a/code/modules/virus2/dishincubator.dm b/code/modules/virus2/dishincubator.dm index c8af39777f8..5d2771b2950 100644 --- a/code/modules/virus2/dishincubator.dm +++ b/code/modules/virus2/dishincubator.dm @@ -51,13 +51,14 @@ /obj/machinery/disease2/incubator/Topic(href, href_list) if(..()) return + if(usr) usr.set_machine(src) + if (href_list["ejectchem"]) if(beaker) beaker.loc = src.loc beaker = null if(!dish) return - usr.machine = src if (href_list["power"]) on = !on if(on) @@ -78,19 +79,17 @@ if(href_list["virus"]) if (!dish) state("\The [src.name] buzzes, \"No viral culture sample detected.\"", "blue") - return + else + var/datum/reagent/blood/B = locate(/datum/reagent/blood) in beaker.reagents.reagent_list + if (!B) + state("\The [src.name] buzzes, \"No suitable breeding enviroment detected.\"", "blue") + else + if (!B.data["virus2"]) + B.data["virus2"] = list() + var/list/virus = list("[dish.virus2.uniqueID]" = dish.virus2.getcopy()) + B.data["virus2"] = virus - var/datum/reagent/blood/B = locate(/datum/reagent/blood) in beaker.reagents.reagent_list - if (!B) - state("\The [src.name] buzzes, \"No suitable breeding enviroment detected.\"", "blue") - return - - if (!B.data["virus2"]) - B.data["virus2"] = list() - var/list/virus = list("[dish.virus2.uniqueID]" = dish.virus2.getcopy()) - B.data["virus2"] = virus - - state("\The [src.name] pings, \"Injection complete.\"", "blue") + state("\The [src.name] pings, \"Injection complete.\"", "blue") src.add_fingerprint(usr) @@ -99,7 +98,7 @@ /obj/machinery/disease2/incubator/attack_hand(mob/user as mob) if(stat & BROKEN) return - user.machine = src + user.set_machine(src) var/dat = "" if(!dish) dat = "Please insert dish into the incubator.
" @@ -151,7 +150,7 @@ else if(prob(5)) dish.virus2.minormutate() - radiation -= 1 + radiation -= 1 if(toxins && prob(5)) dish.virus2.infectionchance -= 1 if(toxins > 50) @@ -164,4 +163,6 @@ if(!beaker.reagents.remove_reagent("virusfood",5)) foodsupply += 10 if(!beaker.reagents.remove_reagent("toxin",1)) - toxins += 1 \ No newline at end of file + toxins += 1 + + src.updateUsrDialog() \ No newline at end of file diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm index ff62376c63e..b5eaf35452a 100644 --- a/code/modules/virus2/effect.dm +++ b/code/modules/virus2/effect.dm @@ -144,7 +144,7 @@ if(istype(mob, /mob/living/carbon/human)) var/mob/living/carbon/human/H = mob for (var/datum/organ/external/E in H.organs) - E.status ^= ORGAN_DEAD + E.status &= ~ORGAN_DEAD /datum/disease2/effect/immortal name = "Longevity Syndrome"