From afc682436cf0b911fa0616994bdb973b43ab5e12 Mon Sep 17 00:00:00 2001 From: CornMyCob Date: Sat, 13 Jun 2020 15:02:05 +0100 Subject: [PATCH 01/20] better clean_blood proc --- code/game/atoms.dm | 53 +++++++++++--- code/game/objects/structures/watercloset.dm | 70 +------------------ code/modules/mob/living/carbon/human/human.dm | 10 --- .../mob/living/carbon/human/update_icons.dm | 14 ++-- .../reagents/chemistry/reagents/water.dm | 32 +-------- 5 files changed, 54 insertions(+), 125 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 1cb0ee3baad..11d4cd89856 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -692,16 +692,53 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons) /mob/living/carbon/human/clean_blood() - if(gloves) - if(gloves.clean_blood()) - clean_blood() - update_inv_gloves() - gloves.germ_level = 0 - else - ..() // Clear the Blood_DNA list - if(bloody_hands) + . = ..() + if(head) + if(head.clean_blood()) + update_inv_head() + if(wear_suit) + if(wear_suit.clean_blood()) + update_inv_wear_suit() + else if(w_uniform) + if(w_uniform.clean_blood()) + update_inv_w_uniform() + if(!(wear_suit && wear_suit.flags_inv & HIDEGLOVES)) + if(gloves) + if(gloves.clean_blood()) + update_inv_gloves() + gloves.germ_level = 0 + else if(bloody_hands) bloody_hands = 0 update_inv_gloves() + if(!(wear_suit && wear_suit.flags_inv & HIDESHOES)) + if(shoes) + if(shoes.clean_blood()) + update_inv_shoes() + else + feet_blood_color = null + qdel(feet_blood_DNA) + bloody_feet = list(BLOOD_STATE_HUMAN = 0, BLOOD_STATE_XENO = 0, BLOOD_STATE_NOT_BLOODY = 0) + blood_state = BLOOD_STATE_NOT_BLOODY + update_inv_shoes() + if(!(head && head.flags_inv & HIDEMASK)) + if(wear_mask) + if(wear_mask.clean_blood()) + update_inv_wear_mask() + else if(lip_style) + lip_style = null + update_body() + if(glasses && !(wear_mask && wear_mask.flags_inv & HIDEEYES)) + if(glasses.clean_blood()) + update_inv_glasses() + if(l_ear && !(wear_mask && wear_mask.flags_inv & HIDEEARS)) + if(l_ear.clean_blood()) + update_inv_ears() + if(r_ear && !(wear_mask && wear_mask.flags_inv & HIDEEARS)) + if(r_ear.clean_blood()) + update_inv_ears() + if(belt) + if(belt.clean_blood()) + update_inv_belt() update_icons() //apply the now updated overlays to the mob diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index a529dc3a6e7..1a5b275bc01 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -403,75 +403,7 @@ L.ExtinguishMob() L.adjust_fire_stacks(-20) //Douse ourselves with water to avoid fire more easily to_chat(L, "You've been drenched in water!") - if(iscarbon(O)) - var/mob/living/carbon/M = O - if(M.r_hand) - M.r_hand.clean_blood() - if(M.l_hand) - M.l_hand.clean_blood() - if(M.back) - if(M.back.clean_blood()) - M.update_inv_back(0) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - var/washgloves = 1 - var/washshoes = 1 - var/washmask = 1 - var/washears = 1 - var/washglasses = 1 - - if(H.wear_suit) - washgloves = !(H.wear_suit.flags_inv & HIDEGLOVES) - washshoes = !(H.wear_suit.flags_inv & HIDESHOES) - - if(H.head) - washmask = !(H.head.flags_inv & HIDEMASK) - washglasses = !(H.head.flags_inv & HIDEEYES) - washears = !(H.head.flags_inv & HIDEEARS) - - if(H.wear_mask) - if(washears) - washears = !(H.wear_mask.flags_inv & HIDEEARS) - if(washglasses) - washglasses = !(H.wear_mask.flags_inv & HIDEEYES) - - if(H.head) - if(H.head.clean_blood()) - H.update_inv_head(0,0) - if(H.wear_suit) - if(H.wear_suit.clean_blood()) - H.update_inv_wear_suit(0,0) - else if(H.w_uniform) - if(H.w_uniform.clean_blood()) - H.update_inv_w_uniform(0,0) - if(H.gloves && washgloves) - if(H.gloves.clean_blood()) - H.update_inv_gloves(0,0) - if(H.shoes && washshoes) - if(H.shoes.clean_blood()) - H.update_inv_shoes(0,0) - if(H.wear_mask && washmask) - if(H.wear_mask.clean_blood()) - H.update_inv_wear_mask(0) - if(H.glasses && washglasses) - if(H.glasses.clean_blood()) - H.update_inv_glasses(0) - if(H.l_ear && washears) - if(H.l_ear.clean_blood()) - H.update_inv_ears(0) - if(H.r_ear && washears) - if(H.r_ear.clean_blood()) - H.update_inv_ears(0) - if(H.belt) - if(H.belt.clean_blood()) - H.update_inv_belt(0) - else - if(M.wear_mask) //if the mob is not human, it cleans the mask without asking for bitflags - if(M.wear_mask.clean_blood()) - M.update_inv_wear_mask(0) - - else - O.clean_blood() + L.clean_blood() if(isturf(loc)) var/turf/tile = loc diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 7d1073fbdb2..b7ad8fabddc 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1162,16 +1162,6 @@ //returns 1 if made bloody, returns 0 otherwise -/mob/living/carbon/human/clean_blood(var/clean_feet) - .=..() - if(clean_feet && !shoes && istype(feet_blood_DNA, /list) && feet_blood_DNA.len) - feet_blood_color = null - qdel(feet_blood_DNA) - bloody_feet = list(BLOOD_STATE_HUMAN = 0, BLOOD_STATE_XENO = 0, BLOOD_STATE_NOT_BLOODY = 0) - blood_state = BLOOD_STATE_NOT_BLOODY - update_inv_shoes(1) - return 1 - /mob/living/carbon/human/cuff_resist(obj/item/I) if(HULK in mutations) say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index cbc768cdd02..9f5cc5127c0 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -609,7 +609,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) overlays_standing[ID_LAYER] = mutable_appearance('icons/mob/mob.dmi', "id", layer = -ID_LAYER) apply_overlay(ID_LAYER) -/mob/living/carbon/human/update_inv_gloves(var/update_icons=1) +/mob/living/carbon/human/update_inv_gloves() remove_overlay(GLOVES_LAYER) if(client && hud_used) var/obj/screen/inventory/inv = hud_used.inv_slots[slot_gloves] @@ -735,7 +735,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) overlays_standing[EARS_LAYER] = mutable_appearance('icons/mob/ears.dmi', "[t_type]", layer = -EARS_LAYER) apply_overlay(EARS_LAYER) -/mob/living/carbon/human/update_inv_shoes(var/update_icons=1) +/mob/living/carbon/human/update_inv_shoes() remove_overlay(SHOES_LAYER) if(client && hud_used) var/obj/screen/inventory/inv = hud_used.inv_slots[slot_shoes] @@ -844,7 +844,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) apply_overlay(BELT_LAYER) -/mob/living/carbon/human/update_inv_wear_suit(var/update_icons=1) +/mob/living/carbon/human/update_inv_wear_suit() remove_overlay(SUIT_LAYER) if(client && hud_used) var/obj/screen/inventory/inv = hud_used.inv_slots[slot_wear_suit] @@ -919,7 +919,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) client.screen += wear_pda wear_pda.screen_loc = ui_pda -/mob/living/carbon/human/update_inv_wear_mask(var/update_icons = 1) +/mob/living/carbon/human/update_inv_wear_mask() ..() remove_overlay(FACEMASK_LAYER) if(client && hud_used) @@ -955,7 +955,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) apply_overlay(FACEMASK_LAYER) -/mob/living/carbon/human/update_inv_back(var/update_icons=1) +/mob/living/carbon/human/update_inv_back() ..() remove_overlay(BACK_LAYER) if(back) @@ -1000,7 +1000,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) apply_overlay(LEGCUFF_LAYER) -/mob/living/carbon/human/update_inv_r_hand(var/update_icons=1) +/mob/living/carbon/human/update_inv_r_hand() ..() remove_overlay(R_HAND_LAYER) if(r_hand) @@ -1019,7 +1019,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) apply_overlay(R_HAND_LAYER) -/mob/living/carbon/human/update_inv_l_hand(var/update_icons=1) +/mob/living/carbon/human/update_inv_l_hand() ..() remove_overlay(L_HAND_LAYER) if(l_hand) diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm index c6960aac916..186315ecc56 100644 --- a/code/modules/reagents/chemistry/reagents/water.dm +++ b/code/modules/reagents/chemistry/reagents/water.dm @@ -83,37 +83,7 @@ M.adjustToxLoss(rand(5, 10)) /datum/reagent/space_cleaner/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume) - if(iscarbon(M)) - var/mob/living/carbon/C = M - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.lip_style) - H.lip_style = null - H.update_body() - if(C.r_hand) - C.r_hand.clean_blood() - if(C.l_hand) - C.l_hand.clean_blood() - if(C.wear_mask) - if(C.wear_mask.clean_blood()) - C.update_inv_wear_mask(0) - if(ishuman(M)) - var/mob/living/carbon/human/H = C - if(H.head) - if(H.head.clean_blood()) - H.update_inv_head(0,0) - if(H.wear_suit) - if(H.wear_suit.clean_blood()) - H.update_inv_wear_suit(0,0) - else if(H.w_uniform) - if(H.w_uniform.clean_blood()) - H.update_inv_w_uniform(0,0) - if(H.shoes) - if(H.shoes.clean_blood()) - H.update_inv_shoes(0,0) - M.clean_blood() - ..() - + M.clean_blood() /datum/reagent/blood data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"blood_colour"="#A10808","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null, "dna" = null) From 6b07ef7e0b03a383cb0d9dc146fa71e42594deea Mon Sep 17 00:00:00 2001 From: CornMyCob Date: Sat, 13 Jun 2020 15:06:48 +0100 Subject: [PATCH 02/20] pointless comment --- code/modules/mob/living/carbon/human/human.dm | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index b7ad8fabddc..2b51edff623 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1160,8 +1160,6 @@ custom_pain("You feel a stabbing pain in your chest!") L.damage = L.min_bruised_damage -//returns 1 if made bloody, returns 0 otherwise - /mob/living/carbon/human/cuff_resist(obj/item/I) if(HULK in mutations) say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) From fe51aca07fd13accb50ef19694310ecdac8e84dd Mon Sep 17 00:00:00 2001 From: CornMyCob Date: Mon, 15 Jun 2020 23:21:25 +0100 Subject: [PATCH 03/20] back --- code/game/atoms.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 0a63ce10dd0..851e1fdee00 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -748,6 +748,9 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons) if(belt) if(belt.clean_blood()) update_inv_belt() + if(back) + if(back.clean_blood()) + update_inv_back() update_icons() //apply the now updated overlays to the mob From 53f6a7bfbaf55ff11871eb786c8d49c2d988c412 Mon Sep 17 00:00:00 2001 From: CornMyCob Date: Thu, 18 Jun 2020 15:03:13 +0100 Subject: [PATCH 04/20] update --- code/game/atoms.dm | 52 ++++++++---------------- code/modules/mob/living/carbon/carbon.dm | 19 +++++++++ code/modules/mob/mob.dm | 26 ++++++++++++ 3 files changed, 63 insertions(+), 34 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 851e1fdee00..2f2bb130a33 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -701,41 +701,27 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons) /mob/living/carbon/human/clean_blood() - . = ..() - if(head) - if(head.clean_blood()) - update_inv_head() - if(wear_suit) - if(wear_suit.clean_blood()) - update_inv_wear_suit() - else if(w_uniform) + var/do_clean_hands = TRUE + var/do_clean_mask = TRUE + var/do_clean_feet = TRUE + if(w_uniform && !(wear_suit && wear_suit.flags_inv & HIDEJUMPSUIT)) if(w_uniform.clean_blood()) update_inv_w_uniform() - if(!(wear_suit && wear_suit.flags_inv & HIDEGLOVES)) - if(gloves) - if(gloves.clean_blood()) - update_inv_gloves() - gloves.germ_level = 0 - else if(bloody_hands) - bloody_hands = 0 + if(gloves && !(wear_suit && wear_suit.flags_inv & HIDEGLOVES)) + if(gloves.clean_blood()) update_inv_gloves() - if(!(wear_suit && wear_suit.flags_inv & HIDESHOES)) - if(shoes) - if(shoes.clean_blood()) - update_inv_shoes() - else - feet_blood_color = null - qdel(feet_blood_DNA) - bloody_feet = list(BLOOD_STATE_HUMAN = 0, BLOOD_STATE_XENO = 0, BLOOD_STATE_NOT_BLOODY = 0) - blood_state = BLOOD_STATE_NOT_BLOODY + gloves.germ_level = 0 + do_clean_hands = FALSE + if(shoes && !(wear_suit && wear_suit.flags_inv & HIDESHOES)) + if(shoes.clean_blood()) update_inv_shoes() - if(!(head && head.flags_inv & HIDEMASK)) - if(wear_mask) - if(wear_mask.clean_blood()) - update_inv_wear_mask() - else if(lip_style) - lip_style = null - update_body() + do_clean_feet = FALSE + if(s_store && !(wear_suit && wear_suit.flags_inv & HIDESUITSTORAGE)) + if(s_store.clean_blood()) + update_inv_s_store() + if(lip_style && !(head && head.flags_inv & HIDEMASK)) + lip_style = null + update_body() if(glasses && !(wear_mask && wear_mask.flags_inv & HIDEEYES)) if(glasses.clean_blood()) update_inv_glasses() @@ -748,9 +734,7 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons) if(belt) if(belt.clean_blood()) update_inv_belt() - if(back) - if(back.clean_blood()) - update_inv_back() + ..(do_clean_hands, do_clean_mask, do_clean_feet) update_icons() //apply the now updated overlays to the mob diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 4b6d6c68603..a34762046f7 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -1201,3 +1201,22 @@ so that different stomachs can handle things in different ways VB*/ I.acid_level = 0 //washes off the acid on our clothes I.extinguish() //extinguishes our clothes ..() + +/mob/living/carbon/clean_blood(clean_hands = TRUE, clean_mask = TRUE, clean_feet = TRUE) + // Declared vars because these get changed around + var/do_clean_hands = clean_hands + var/do_clean_mask = clean_mask + var/do_clean_feet = clean_feet + if(head) + if(head.clean_blood()) + update_inv_head() + if(head.flags_inv & HIDEMASK) + do_clean_mask = FALSE + if(wear_suit) + if(wear_suit.clean_blood()) + update_inv_wear_suit() + if(wear_suit.flags_inv & HIDESHOES) + do_clean_feet = FALSE + if(wear_suit.flags_inv & HIDEGLOVES) + do_clean_hands = FALSE + ..(do_clean_hands, do_clean_mask, do_clean_feet) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 235996e571f..440756dfefb 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1383,3 +1383,29 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ ///Force set the mob nutrition /mob/proc/set_nutrition(change) nutrition = max(0, change) + +/mob/clean_blood(clean_hands = TRUE, clean_mask = TRUE, clean_feet = TRUE) + . = ..() + if(bloody_hands && clean_hands) + bloody_hands = 0 + update_inv_gloves() + if(l_hand) + if(l_hand.clean_blood()) + update_inv_l_hand() + if(r_hand) + if(r_hand.clean_blood()) + update_inv_r_hand() + if(back) + if(back.clean_blood()) + update_inv_back() + if(wear_mask && clean_mask) + if(wear_mask.clean_blood()) + update_inv_wear_mask() + if(clean_feet) + feet_blood_color = null + qdel(feet_blood_DNA) + bloody_feet = list(BLOOD_STATE_HUMAN = 0, BLOOD_STATE_XENO = 0, BLOOD_STATE_NOT_BLOODY = 0) + blood_state = BLOOD_STATE_NOT_BLOODY + update_inv_shoes() + update_icons() //apply the now updated overlays to the mob + From 95cf279beb09333926eb98d59fe9175c02d4fad6 Mon Sep 17 00:00:00 2001 From: CornMyCob Date: Thu, 25 Jun 2020 13:54:57 +0100 Subject: [PATCH 05/20] args exist --- code/game/atoms.dm | 11 ++++------- code/modules/mob/living/carbon/carbon.dm | 12 ++++-------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 2f2bb130a33..d14041b005b 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -700,10 +700,7 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons) M.update_inv_shoes() -/mob/living/carbon/human/clean_blood() - var/do_clean_hands = TRUE - var/do_clean_mask = TRUE - var/do_clean_feet = TRUE +/mob/living/carbon/human/clean_blood(clean_hands = TRUE, clean_mask = TRUE, clean_feet = TRUE) if(w_uniform && !(wear_suit && wear_suit.flags_inv & HIDEJUMPSUIT)) if(w_uniform.clean_blood()) update_inv_w_uniform() @@ -711,11 +708,11 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons) if(gloves.clean_blood()) update_inv_gloves() gloves.germ_level = 0 - do_clean_hands = FALSE + clean_hands = FALSE if(shoes && !(wear_suit && wear_suit.flags_inv & HIDESHOES)) if(shoes.clean_blood()) update_inv_shoes() - do_clean_feet = FALSE + clean_feet = FALSE if(s_store && !(wear_suit && wear_suit.flags_inv & HIDESUITSTORAGE)) if(s_store.clean_blood()) update_inv_s_store() @@ -734,7 +731,7 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons) if(belt) if(belt.clean_blood()) update_inv_belt() - ..(do_clean_hands, do_clean_mask, do_clean_feet) + ..(clean_hands, clean_mask, clean_feet) update_icons() //apply the now updated overlays to the mob diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 7e634bfdbe1..f542ec5a5e5 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -1207,20 +1207,16 @@ so that different stomachs can handle things in different ways VB*/ ..() /mob/living/carbon/clean_blood(clean_hands = TRUE, clean_mask = TRUE, clean_feet = TRUE) - // Declared vars because these get changed around - var/do_clean_hands = clean_hands - var/do_clean_mask = clean_mask - var/do_clean_feet = clean_feet if(head) if(head.clean_blood()) update_inv_head() if(head.flags_inv & HIDEMASK) - do_clean_mask = FALSE + clean_mask = FALSE if(wear_suit) if(wear_suit.clean_blood()) update_inv_wear_suit() if(wear_suit.flags_inv & HIDESHOES) - do_clean_feet = FALSE + clean_feet = FALSE if(wear_suit.flags_inv & HIDEGLOVES) - do_clean_hands = FALSE - ..(do_clean_hands, do_clean_mask, do_clean_feet) + clean_hands = FALSE + ..(clean_hands, clean_mask, clean_feet) From 465049855eb352805cdae54ee7caf82956126856 Mon Sep 17 00:00:00 2001 From: mochi Date: Mon, 29 Jun 2020 01:16:52 +0200 Subject: [PATCH 06/20] Add ability to VV an object's armor easily --- code/datums/datumvars.dm | 53 +++++++++++++++++++++++++++++++++++++++ code/game/objects/objs.dm | 1 + 2 files changed, 54 insertions(+) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index b2b09003934..e8d0b881ccb 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -819,6 +819,59 @@ message_admins("[key_name(usr)] has made [A] process normally") return TRUE + else if(href_list["modifyarmor"]) + if(!check_rights(R_DEBUG|R_ADMIN)) + return + var/obj/A = locateUID(href_list["modifyarmor"]) + if(!istype(A)) + return + A.var_edited = TRUE + var/list/armorlist = A.armor.getList() + var/list/displaylist + + var/result + do + displaylist = list() + for(var/key in armorlist) + displaylist += "[key] = [armorlist[key]]" + result = input(usr, "Select an armor type to modify..", "Modify armor") as null|anything in displaylist + "(ADD ALL)" + "(SET ALL)" + "(DONE)" + + if(result == "(DONE)") + break + else if(result == "(ADD ALL)" || result == "(SET ALL)") + var/new_amount = input(usr, result == "(ADD ALL)" ? "Enter armor to add to all types:" : "Enter new armor value for all types:", "Modify all types") as num|null + if(isnull(new_amount)) + continue + var/proper_amount = text2num(new_amount) + if(isnull(proper_amount)) + continue + for(var/key in armorlist) + armorlist[key] = (result == "(ADD ALL)" ? armorlist[key] : 0) + proper_amount + else if(result) + var/list/fields = splittext(result, " = ") + if(length(fields) != 2) + continue + var/type = fields[1] + if(isnull(armorlist[type])) + continue + var/new_amount = input(usr, "Enter new armor value for [type]:", "Modify [type]") as num|null + if(isnull(new_amount)) + continue + var/proper_amount = text2num(new_amount) + if(isnull(proper_amount)) + continue + armorlist[type] = proper_amount + while(result) + + if(!result || !A) + return TRUE + + A.armor = A.armor.setRating(armorlist["melee"], armorlist["bullet"], armorlist["laser"], armorlist["energy"], armorlist["bomb"], armorlist["bio"], armorlist["rad"], armorlist["fire"], armorlist["acid"], armorlist["magic"]) + + log_admin("[key_name(usr)] modified the armor on [A] to: melee = [armorlist["melee"]], bullet = [armorlist["bullet"]], laser = [armorlist["laser"]], energy = [armorlist["energy"]], bomb = [armorlist["bomb"]], bio = [armorlist["bio"]], rad = [armorlist["rad"]], fire = [armorlist["fire"]], acid = [armorlist["acid"]], magic = [armorlist["magic"]]") + message_admins("[key_name(usr)] modified the armor on [A] to: melee = [armorlist["melee"]], bullet = [armorlist["bullet"]], laser = [armorlist["laser"]], energy = [armorlist["energy"]], bomb = [armorlist["bomb"]], bio = [armorlist["bio"]], rad = [armorlist["rad"]], fire = [armorlist["fire"]], acid = [armorlist["acid"]], magic = [armorlist["magic"]]") + return TRUE + else if(href_list["addreagent"]) /* Made on /TG/, credit to them. */ if(!check_rights(R_DEBUG|R_ADMIN)) return diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 43244c470ff..d40c628ed90 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -347,6 +347,7 @@ a { .["Make speed process"] = "?_src_=vars;makespeedy=[UID()]" else .["Make normal process"] = "?_src_=vars;makenormalspeed=[UID()]" + .["Modify armor values"] = "?_src_=vars;modifyarmor=[UID()]" /obj/proc/check_uplink_validity() return TRUE From fcd382dc309e7e3489c733854811f38296b8f12a Mon Sep 17 00:00:00 2001 From: AffectedArc07 Date: Tue, 30 Jun 2020 11:50:39 +0100 Subject: [PATCH 07/20] The beginning: Removing unused NanoUI files --- nano/templates/ame.tmpl | 56 ---- nano/templates/botany_editor.tmpl | 56 ---- nano/templates/botany_isolator.tmpl | 73 ----- nano/templates/code_mirror.tmpl | 14 - nano/templates/disease_splicer.tmpl | 108 -------- nano/templates/dish_incubator.tmpl | 123 --------- nano/templates/docking_airlock_console.tmpl | 96 ------- nano/templates/engines_control.tmpl | 84 ------ nano/templates/escape_pod_berth_console.tmpl | 42 --- nano/templates/escape_pod_console.tmpl | 95 ------- .../escape_shuttle_control_console.tmpl | 84 ------ nano/templates/geoscanner.tmpl | 185 ------------- nano/templates/hardsuit.tmpl | 259 ------------------ nano/templates/helm.tmpl | 115 -------- nano/templates/isolation_centrifuge.tmpl | 81 ------ nano/templates/multi_docking_console.tmpl | 37 --- nano/templates/pathogenic_isolator.tmpl | 107 -------- nano/templates/shuttle_control_console.tmpl | 66 ----- .../shuttle_control_console_exploration.tmpl | 73 ----- .../shuttle_control_multi_console.tmpl | 58 ---- nano/templates/simple_docking_console.tmpl | 99 ------- .../templates/simple_docking_console_pod.tmpl | 101 ------- nano/templates/vending.tmpl | 85 ------ 23 files changed, 2097 deletions(-) delete mode 100644 nano/templates/ame.tmpl delete mode 100644 nano/templates/botany_editor.tmpl delete mode 100644 nano/templates/botany_isolator.tmpl delete mode 100644 nano/templates/code_mirror.tmpl delete mode 100644 nano/templates/disease_splicer.tmpl delete mode 100644 nano/templates/dish_incubator.tmpl delete mode 100644 nano/templates/docking_airlock_console.tmpl delete mode 100644 nano/templates/engines_control.tmpl delete mode 100644 nano/templates/escape_pod_berth_console.tmpl delete mode 100644 nano/templates/escape_pod_console.tmpl delete mode 100644 nano/templates/escape_shuttle_control_console.tmpl delete mode 100644 nano/templates/geoscanner.tmpl delete mode 100644 nano/templates/hardsuit.tmpl delete mode 100644 nano/templates/helm.tmpl delete mode 100644 nano/templates/isolation_centrifuge.tmpl delete mode 100644 nano/templates/multi_docking_console.tmpl delete mode 100644 nano/templates/pathogenic_isolator.tmpl delete mode 100644 nano/templates/shuttle_control_console.tmpl delete mode 100644 nano/templates/shuttle_control_console_exploration.tmpl delete mode 100644 nano/templates/shuttle_control_multi_console.tmpl delete mode 100644 nano/templates/simple_docking_console.tmpl delete mode 100644 nano/templates/simple_docking_console_pod.tmpl delete mode 100644 nano/templates/vending.tmpl diff --git a/nano/templates/ame.tmpl b/nano/templates/ame.tmpl deleted file mode 100644 index 4a86139eda1..00000000000 --- a/nano/templates/ame.tmpl +++ /dev/null @@ -1,56 +0,0 @@ -
-
Status:
- {{if data.active}} -
Injecting
- {{else}} -
Standby
- {{/if}} -  {{:helper.link("Toggle Status", "gear", {"togglestatus":1},null)}} -
-{{if !data.fueljar}} -
No fuel jar detected.
-{{else}} -
-
-
Fuel:
-
{{:data.fueljar.fuel}}/{{:data.fueljar.fuel_max}}
- {{:helper.link("Eject", "eject", {"ejectjar":1},null,'floatRight')}} -
-
-
Injecting:
-
- {{:helper.link(data.fueljar.injecting+" units", 'arrows-v', {'set_strength': 1})}} -
-
-
-{{/if}} -
-
-
Stability:
-
- {{:helper.displayBar(data.stability,0,100,"good")}} - {{:data.stability}}% -
-
-
-
Shielding Count:
-
{{:data.linked_shields}}
-
-
-
Cores:
-
{{:data.linked_cores}}
- {{:helper.link("Refresh Parts",null,{"refreshicons" : 1},(data.active?"disabled":null),'floatRight')}} -
-
-
Current Efficiency:
-
{{:data.efficiency}}
-
-
-
Average Efficiency:
-
{{:data.stability}}
-
-
-
Last Produced:
-
{{:data.stored_power}}
-
-
\ No newline at end of file diff --git a/nano/templates/botany_editor.tmpl b/nano/templates/botany_editor.tmpl deleted file mode 100644 index 96cabc4341c..00000000000 --- a/nano/templates/botany_editor.tmpl +++ /dev/null @@ -1,56 +0,0 @@ - - -{{if data.activity}} - Scanning... -{{else}} -

Buffered Genetic Data

- {{if data.disk}} -
-
- Source: -
-
- {{:data.sourceName}} -
-
- Gene decay: -
-
- {{if data.degradation <= 100}} - {{:data.degradation}}% - {{else}} - FURTHER AMENDMENTS NONVIABLE - {{/if}} -
-
- Locus: -
-
- {{:data.locus}} -
- {{:helper.link('Eject Disk', 'arrow-circle-right', {'eject_disk' : 1}, null)}} -
- {{else}} -
No disk loaded.
- {{/if}} -

Loaded Material

- {{if data.loaded}} -
-
- Target: -
-
- {{:data.loaded}} -
- {{if data.degradation <= 100}} - {{:helper.link('Apply Gene Mods', 'gear', {'apply_gene' : 1}, null)}} - {{/if}} - {{:helper.link('Eject Target', 'arrow-circle-right', {'eject_packet' : 1}, null)}} -
- {{else}} -
No target seed packet loaded
- {{/if}} -{{/if}} \ No newline at end of file diff --git a/nano/templates/botany_isolator.tmpl b/nano/templates/botany_isolator.tmpl deleted file mode 100644 index a5efbc4a212..00000000000 --- a/nano/templates/botany_isolator.tmpl +++ /dev/null @@ -1,73 +0,0 @@ - - -{{if data.activity}} - Scanning... -{{else}} -

Buffered Genetic Data

- {{if data.hasGenetics}} -
-
- Source: -
-
- {{:data.sourceName}} -
-
- Gene decay: -
-
- {{:data.degradation}}% -
-
- {{if data.disk}} - {{for data.geneMasks}} -
-
- {{:value}} -
-
- {{:helper.link('Extract', 'arrow-circle-down', {'get_gene' : value}, null)}} -
-
- {{empty}} -
Data error. Genetic record corrupt.
- {{/for}} -
-
- {{:helper.link('Eject Loaded Disk', 'arrow-circle-right', {'eject_disk' : 1}, null)}} - {{:helper.link('Clear Genetic Buffer', 'gear', {'clear_buffer' : 1}, null)}} -
- {{else}} -
No disk inserted.
- {{/if}} - {{else}} -
No data buffered.
- {{if data.disk}} -
-
- {{:helper.link('Eject Loaded Disk', 'arrow-circle-right', {'eject_disk' : 1}, null)}} -
- {{else}} -
No disk inserted.
- {{/if}} - {{/if}} -

Loaded Material

- {{if data.loaded}} -
-
- Packet loaded: -
-
- {{:data.loaded}} -
-
- {{:helper.link('Process Genome', 'gear', {'scan_genome' : 1}, null)}}{{:helper.link('Eject Packet', 'arrow-circle-right', {'eject_packet' : 1}, null)}} -
-
- {{else}} -
No seeds loaded.
- {{/if}} -{{/if}} \ No newline at end of file diff --git a/nano/templates/code_mirror.tmpl b/nano/templates/code_mirror.tmpl deleted file mode 100644 index dce1bf6f43b..00000000000 --- a/nano/templates/code_mirror.tmpl +++ /dev/null @@ -1,14 +0,0 @@ -

HELLO

- -
- - - -
- - {{:helper.cMirror("fSubmit")}} -
- -
diff --git a/nano/templates/disease_splicer.tmpl b/nano/templates/disease_splicer.tmpl deleted file mode 100644 index fb248c0d6ca..00000000000 --- a/nano/templates/disease_splicer.tmpl +++ /dev/null @@ -1,108 +0,0 @@ -
-
- {{:helper.link('Close', 'gear', {'close' : 1}, null, 'fixedLeft')}} -
-
- -{{if data.busy}} -
The Splicer is currently busy.
-
-
{{:data.busy}}
-
-

- Thank you for your patience! -

-{{else}} -
-

Virus Dish

-
-
- {{:helper.link('Eject Dish', 'eject', { 'eject' : 1 }, data.dish_inserted ? null : 'disabled')}} -
- -
-
- Growth Density: -
-
- {{:helper.displayBar(data.growth, 0, 100, (data.growth >= 50) ? 'good' : data.growth >= 25 ? 'average' : 'bad', data.growth + '%' )}} -
-
- -
-
- {{if !data.info}} -
- Symptoms: -
- {{/if}} -
- {{if data.info}} - {{:data.info}} - {{else}} - {{for data.effects}} -
-
- ({{:value.stage}}) {{:value.name}} - {{if value.badness > 1}} - Dangerous - {{/if}} -
-
- {{/for}} - {{/if}} -
-
- {{if data.affected_species && !data.info}} -
-
- Affected Species: -
-
- {{:data.affected_species}} -
-
- {{/if}} -
- {{if data.effects}} -
- CAUTION: Reverse engineering will destroy the viral sample. -
-
-
- Reverse Engineering: -
-
- {{for data.effects}} - {{:helper.link(value.stage, 'exchange', { 'grab' : value.reference })}} - {{/for}} -
-
- {{:helper.link('Species', 'exchange', { 'affected_species' : 1 })}} -
-
- {{/if}} - -
-

Storage

-
- -
-
- Memory Buffer: -
-
- {{if data.buffer}} - {{:data.buffer.name}} ({{:data.buffer.stage}}) - {{else}} - {{if data.species_buffer}} - {{:data.species_buffer}} - {{else}} - Empty - {{/if}} - {{/if}} -
-
- {{:helper.link('Save To Disk', 'floppy-o', { 'disk' : 1 }, (data.buffer || data.species_buffer) ? null : 'disabled')}} - {{:helper.link('Splice Onto Dish', 'pencil', { 'splice' : 1 }, ((data.buffer || data.species_buffer) && !data.info) ? null : 'disabled')}} -{{/if}} diff --git a/nano/templates/dish_incubator.tmpl b/nano/templates/dish_incubator.tmpl deleted file mode 100644 index c8f9d51014b..00000000000 --- a/nano/templates/dish_incubator.tmpl +++ /dev/null @@ -1,123 +0,0 @@ -
-
- {{:helper.link('Close', 'gear', {'close' : '1'}, null, 'fixedLeft')}} -
-
- -
-

Environmental Conditions

-
-
-
- Power: -
-
- {{:helper.link('On', 'power-off', { 'power' : 1 }, !data.dish_inserted ? 'disabled' : data.on ? 'selected' : null)}}{{:helper.link('Off', 'close', { 'power' : 1 }, data.on ? null : 'selected')}} -
-
-
- {{:helper.link('Add Radiation', 'exclamation-circle', {'rad' : 1})}} - {{:helper.link('Flush System', 'trash', {'flush' : 1}, data.system_in_use ? null : 'disabled')}} -
- -
-
-
- Virus Food: -
-
- {{:helper.displayBar(data.food_supply, 0, 100, 'good', data.food_supply)}} -
-
-
-
- Radiation Level: -
-
- {{:helper.displayBar(data.radiation, 0, 100, (data.radiation >= 50) ? 'bad' : (data.growth >= 25) ? 'average' : 'good')}} -
- {{:helper.formatNumber(data.radiation * 10000)}} µSv -
-
-
-
- Toxicity: -
-
- {{:helper.displayBar(data.toxins, 0, 100, (data.toxins >= 50) ? 'bad' : (data.toxins >= 25) ? 'average' : 'good', data.toxins + '%')}} -
-
-
- -
-

Chemicals

-
-
- {{:helper.link('Eject Chemicals', 'eject', { 'ejectchem' : 1 }, data.chemicals_inserted ? null : 'disabled')}} - {{:helper.link('Breed Virus', 'arrow-circle-down', { 'virus' : 1 }, data.can_breed_virus ? null : 'disabled')}} -
- -{{if data.chemicals_inserted}} -
-
- Volume: -
-
- {{:helper.displayBar(data.chemical_volume, 0, data.max_chemical_volume, 'good', data.chemical_volume + ' / ' + data.max_chemical_volume)}} -
-
-
-
- Breeding Environment: -
-
- - {{:!data.dish_inserted ? 'N/A' : data.can_breed_virus ? 'Suitable' : 'No hemolytic samples detected'}} - - {{if data.blood_already_infected}} -
- CAUTION: Viral infection detected in blood sample. - {{/if}} -
-
-{{else}} -
- No chemicals inserted. -
-{{/if}} - -
-

Virus Dish

-
-
- {{:helper.link('Eject Dish', 'eject', {'ejectdish' : 1}, data.dish_inserted ? null : 'disabled')}} -
- -{{if data.dish_inserted}} - {{if data.virus}} -
-
- Growth Density: -
-
- {{:helper.displayBar(data.growth, 0, 100, (data.growth >= 50) ? 'good' : (data.growth >= 25) ? 'average' : 'bad', data.growth + '%' )}} -
-
-
-
- Infection Rate: -
-
- {{:data.analysed ? data.infection_rate : "Unknown"}} -
-
- {{else}} -
- No virus detected. -
- {{/if}} -{{else}} -
- No dish loaded. -
-{{/if}} diff --git a/nano/templates/docking_airlock_console.tmpl b/nano/templates/docking_airlock_console.tmpl deleted file mode 100644 index 91a9c81cf47..00000000000 --- a/nano/templates/docking_airlock_console.tmpl +++ /dev/null @@ -1,96 +0,0 @@ -
-
-
- Docking Port Status: -
- {{if data.docking_status == "docked"}} -
- {{if !data.override_enabled}} - DOCKED - {{else}} - DOCKED-OVERRIDE ENABLED - {{/if}} - - {{:helper.link('Override', 'exclamation-triangle', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redButton' : null)}} - -
- {{else data.docking_status == "docking"}} -
- {{if !data.override_enabled}} - DOCKING - {{else}} - DOCKING-OVERRIDE ENABLED - {{/if}} - - {{:helper.link('Override', 'exclamation-triangle', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redButton' : null)}} - -
- {{else data.docking_status == "undocking"}} -
- {{if !data.override_enabled}} - UNDOCKING - {{else}} - UNDOCKING-OVERRIDE ENABLED - {{/if}} - - {{:helper.link('Override', 'exclamation-triangle', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redButton' : null)}} - -
- {{else data.docking_status == "undocked"}} -
- {{if !data.override_enabled}} - NOT IN USE - {{else}} - OVERRIDE ENABLED - {{/if}} - - {{:helper.link('Override', 'exclamation-triangle', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redButton' : null)}} - -
- {{else}} - ERROR - {{:helper.link('Override', 'exclamation-triangle', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redButton' : null)}} - {{/if}} -
-
-
-
-
- Chamber Pressure: -
-
- {{:helper.displayBar(data.chamber_pressure, 0, 200, (data.chamber_pressure < 80 || data.chamber_pressure > 120) ? 'bad' : (data.chamber_pressure < 95 || data.chamber_pressure > 110) ? 'average' : 'good')}} -
- {{:helper.smoothRound(data.chamber_pressure)}} kPa -
-
-
-
-
-
-
- {{:helper.link('Cycle to Exterior', 'arrow-circle-o-left', {'command' : 'cycle_ext'}, (data.processing || data.airlock_disabled) ? 'disabled' : null)}} - {{:helper.link('Cycle to Interior', 'arrow-circle-right', {'command' : 'cycle_int'}, (data.processing || data.airlock_disabled) ? 'disabled' : null)}} -
-
- {{if data.airlock_disabled}} - {{:helper.link('Force exterior door', 'exclamation-triangle', {'command' : 'force_ext'}, 'disabled', null)}} - {{:helper.link('Force interior door', 'exclamation-triangle', {'command' : 'force_int'}, 'disabled', null)}} - {{else}} - {{if data.interior_status.state == "open"}} - {{:helper.link('Force exterior door', 'exclamation-triangle', {'command' : 'force_ext'}, null, 'redButton')}} - {{else}} - {{:helper.link('Force exterior door', 'exclamation-triangle', {'command' : 'force_ext'}, null, data.processing ? 'yellowButton' : null)}} - {{/if}} - {{if data.exterior_status.state == "open"}} - {{:helper.link('Force interior door', 'exclamation-triangle', {'command' : 'force_int'}, null, 'redButton')}} - {{else}} - {{:helper.link('Force interior door', 'exclamation-triangle', {'command' : 'force_int'}, null, data.processing ? 'yellowButton' : null)}} - {{/if}} - {{/if}} -
-
-
- {{:helper.link('Abort', 'ban', {'command' : 'abort'}, (data.processing && !data.airlock_disabled) ? null : 'disabled', (data.processing && !data.airlock_disabled) ? 'redButton' : null)}} -
-
\ No newline at end of file diff --git a/nano/templates/engines_control.tmpl b/nano/templates/engines_control.tmpl deleted file mode 100644 index ae44ff572c0..00000000000 --- a/nano/templates/engines_control.tmpl +++ /dev/null @@ -1,84 +0,0 @@ -
- {{:helper.link('Overall status', 'sticky-note', {'state' :'status'}, null, state == 'status' ? 'selected' : null)}} - {{:helper.link('Details', 'sticky-note', {'state' : 'engines'}, null, state == 'engines' ? 'selected' : null)}} -
- -{{if data.state == "engines"}} - {{if data.engines_info}} - {{for data.engines_info}} -
-
- Engine #{{:(index + 1)}}: -
-
- {{:helper.link(value.eng_on ? 'Shutdown' : 'Power up', 'power-off', { 'toggle' : 1, 'engine' : value.eng_reference }, null, value.eng_on ? 'selected' : null)}} -
-
-
-
-
- Type: -
-
- {{:value.eng_type}} -
-
-
-
- Status: -
-
- {{:value.eng_on ? 'Online' : 'Offline'}}
- {{:value.eng_status}} -
-
-
-
- Current thrust: -
-
- {{:value.eng_thrust}} -
-
-
-
- Thrust limit: -
-
- {{:helper.link('', 'plus-circle', { 'limit' : 0.1, 'engine' : value.eng_reference }, null, null)}} - {{:helper.link(value.eng_thrust_limiter+'%', null, { 'set_limit' : 1, 'engine' : value.eng_reference }, null, null)}} - {{:helper.link('', 'minus-circle', { 'limit' : -0.1, 'engine' : value.eng_reference }, null, null)}} -
-
-
- {{/for}} - {{/if}} -{{/if}} -{{if data.state == "status"}} - {{if data.engines_info}} - {{for data.engines_info}} -
-
-
- Engine #{{:(index + 1)}}: -
-
- {{:helper.link(value.eng_on ? 'Shutdown' : 'Power up', 'power-off', { 'toggle' : 1, 'engine' : value.eng_reference }, null, value.eng_on ? 'selected' : null)}} -
-
-
-
- Thrust: -
- Thrust limit: -
-
- {{:value.eng_thrust}} -
- {{:value.eng_thrust_limiter}}% -
-
-
- {{/for}} - {{/if}} -{{/if}} \ No newline at end of file diff --git a/nano/templates/escape_pod_berth_console.tmpl b/nano/templates/escape_pod_berth_console.tmpl deleted file mode 100644 index 7bccb3205c4..00000000000 --- a/nano/templates/escape_pod_berth_console.tmpl +++ /dev/null @@ -1,42 +0,0 @@ -
-
-
- Escape Pod Status: -
-
- {{if data.docking_status == "docked"}} - {{if data.armed}} - ARMED - {{else}} - SYSTEMS OK - {{/if}} - {{else data.docking_status == "undocking"}} - EJECTING-STAND CLEAR! - {{else data.docking_status == "undocked"}} - POD EJECTED - {{else data.docking_status == "docking"}} - INITIALIZING... - {{else}} - ERROR - {{/if}} -
-
-
-
-
-
- {{if data.armed}} - {{if data.docking_status == "docked"}} - {{:helper.link('Force exterior door', 'exclamation-triangle', {'command' : 'force_door'}, data.override_enabled ? null : 'disabled', null)}} - {{:helper.link('Override', 'exclamation-triangle', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redButton' : null)}} - {{else}} - {{:helper.link('Force exterior door', 'exclamation-triangle', {'command' : 'force_door'}, data.override_enabled ? null : 'disabled', data.override_enabled ? 'redButton' : null)}} - {{:helper.link('Override', 'exclamation-triangle', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redButton' : 'yellowButton')}} - {{/if}} - {{else}} - {{:helper.link('Force exterior door', 'exclamation-triangle', {'command' : 'force_door'}, 'disabled', null)}} - {{:helper.link('Override', 'exclamation-triangle', {'command' : 'toggle_override'}, 'disabled', null)}} - {{/if}} -
-
-
\ No newline at end of file diff --git a/nano/templates/escape_pod_console.tmpl b/nano/templates/escape_pod_console.tmpl deleted file mode 100644 index a99cb1e6810..00000000000 --- a/nano/templates/escape_pod_console.tmpl +++ /dev/null @@ -1,95 +0,0 @@ -
-
-
- Escape Pod Status: -
-
- {{if data.docking_status == "docked"}} - {{if data.is_armed}} - ARMED - {{else}} - SYSTEMS OK - {{/if}} - {{else data.docking_status == "undocking"}} - EJECTING - {{else data.docking_status == "undocked"}} - POD EJECTED - {{else data.docking_status == "docking"}} - DOCKING - {{else}} - ERROR - {{/if}} -
-
-
-
-
-
- Docking Hatch: -
-
- {{if data.docking_status == "docked"}} - {{if data.door_state == "open"}} - OPEN - {{else data.door_state == "closed"}} - CLOSED - {{else}} - ERROR - {{/if}} - {{else data.docking_status == "docking"}} - {{if data.door_state == "open"}} - OPEN - {{else data.door_state == "closed" && data.door_lock == "locked"}} - SECURED - {{else data.door_state == "closed" && data.door_lock == "unlocked"}} - UNSECURED - {{else}} - ERROR - {{/if}} - {{else data.docking_status == "undocking"}} - {{if data.door_state == "open"}} - OPEN - {{else data.door_state == "closed" && data.door_lock == "locked"}} - SECURED - {{else data.door_state == "closed" && data.door_lock == "unlocked"}} - UNSECURED - {{else}} - ERROR - {{/if}} - {{else data.docking_status == "undocked"}} - {{if data.door_state == "open"}} - OPEN - {{else data.door_state == "closed" && data.door_lock == "locked"}} - SECURED - {{else data.door_state == "closed" && data.door_lock == "unlocked"}} - UNSECURED - {{else}} - ERROR - {{/if}} - {{else}} - ERROR - {{/if}} -
-
-
-
-
-
- {{if data.docking_status == "docked"}} - {{:helper.link('Force exterior door', 'exclamation-triangle', {'command' : 'force_door'}, data.override_enabled ? null : 'disabled', null)}} - {{:helper.link('Override', 'exclamation-triangle', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redButton' : null)}} - {{else}} - {{:helper.link('Force exterior door', 'exclamation-triangle', {'command' : 'force_door'}, data.override_enabled ? null : 'disabled', data.override_enabled ? 'redButton' : null)}} - {{:helper.link('Override', 'exclamation-triangle', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redButton' : 'yellowButton')}} - {{/if}} -
-
-
-
-
-
- {{:helper.link('ARM', 'exclamation-triangle', {'command' : 'manual_arm'}, data.is_armed ? 'disabled' : null, data.is_armed ? 'redButton' : 'yellowButton')}} - {{:helper.link('MANUAL EJECT', 'exclamation-triangle', {'command' : 'force_launch'}, data.can_force ? null : 'disabled', data.can_force ? 'yellowButton' : null)}} -
-
-
diff --git a/nano/templates/escape_shuttle_control_console.tmpl b/nano/templates/escape_shuttle_control_console.tmpl deleted file mode 100644 index eab831464a8..00000000000 --- a/nano/templates/escape_shuttle_control_console.tmpl +++ /dev/null @@ -1,84 +0,0 @@ -

Shuttle Status

-
-
- {{:data.shuttle_status}} -
-
-
-
-
- Bluespace Drive: -
-
- {{if data.shuttle_state == "idle"}} - IDLE - {{else data.shuttle_state == "warmup"}} - SPINNING UP - {{else data.shuttle_state == "in_transit"}} - ENGAGED - {{else}} - ERROR - {{/if}} -
-
-
-{{if data.has_docking}} -
-
-
- Docking Status: -
-
- {{if data.docking_status == "docked"}} - DOCKED - {{else data.docking_status == "docking"}} - {{if !data.docking_override}} - DOCKING - {{else}} - DOCKING-MANUAL - {{/if}} - {{else data.docking_status == "undocking"}} - {{if !data.docking_override}} - UNDOCKING - {{else}} - UNDOCKING-MANUAL - {{/if}} - {{else data.docking_status == "undocked"}} - UNDOCKED - {{else}} - ERROR - {{/if}} -
-
-
-{{/if}} -

Shuttle Authorization

-
-
- {{if data.has_auth}} - Access Granted. Shuttle controls unlocked. - {{else}} - Additional authorization required. - {{/if}} -
-
-
- {{for data.auth_list}} - {{if value.auth_hash}} - {{:helper.link(value.auth_name, 'eject', {'removeid' : value.auth_hash}, null, 'itemContentWide')}} - {{else}} - {{:helper.link("", 'eject', {'scanid' : 1}, null, 'itemContentWide')}} - {{/if}} - {{/for}} -
- -

Shuttle Control

-
-
-
- {{:helper.link('Launch Shuttle', 'arrow-circle-right', {'move' : '1'}, data.can_launch ? null : 'disabled' , null)}} -{{:helper.link('Cancel Launch', 'ban', {'cancel' : '1'}, data.can_cancel ? null : 'disabled' , null)}} - {{:helper.link('Force Launch', 'exclamation-triangle', {'force' : '1'}, data.can_force ? null : 'disabled' , data.can_force ? 'redButton' : null)}} -
-
-
\ No newline at end of file diff --git a/nano/templates/geoscanner.tmpl b/nano/templates/geoscanner.tmpl deleted file mode 100644 index 4204d6466a8..00000000000 --- a/nano/templates/geoscanner.tmpl +++ /dev/null @@ -1,185 +0,0 @@ - - -

Machine Status

-
-
- {{:helper.link(data.scanning ? 'Halt Scan' : 'Begin Scan', 'signal', {'scanItem' : 1}, null)}} -
-
- {{:helper.link('Eject item', 'eject', {'ejectItem' : 1}, (data.scanned_item && !data.scanning) ? null : 'disabled')}} -
-
- -
-
-
Item:
-
- {{if data.scanned_item}} - {{:data.scanned_item}} - {{else}} - No item inserted - {{/if}} -
-
-
-
Heuristic analysis:
-
- {{if data.scanned_item_desc}} - {{:data.scanned_item_desc}} - {{/if}} -
-
-
- -

Scanner

-
-
Scan progress:
-
- {{:helper.displayBar(data.scan_progress, 0, 100, 'good')}} - {{:helper.smoothRound(data.scan_progress)}} % -
-
- {{if data.scan_progress >= 100}} - Scan completed successfully. - {{/if}} -
-
-
-
Vacuum seal integrity:
-
- {{:helper.displayBar(data.scanner_seal_integrity, 0, 100, ((data.scanner_seal_integrity < 66) ? ((data.scanner_seal_integrity < 33) ? 'bad' : 'average') : 'good'))}} - {{:helper.smoothRound(data.scanner_seal_integrity)}} % -
-
- {{if data.scanner_seal_integrity < 25}} - Warning! Vacuum seal breach will result in scan failure! - {{/if}} -
-
- -

MASER

-
-
MASER Efficiency:
-
- {{:helper.displayBar(data.maser_efficiency, 1, 100, ((data.maser_efficiency < 66) ? ((data.maser_efficiency) < 33 ? 'bad' : 'average') : 'good'))}} - {{:data.maser_efficiency}} % -
-
- {{if data.maser_efficiency < 50}} - Match wavelengths to progress the scan. - {{/if}} -
-
-
-
Optimal Wavelength:
-
- {{:helper.displayBar(data.optimal_wavelength, 1, 10000, 'good')}} - {{:data.optimal_wavelength}} MHz -
-
-
-
Current Wavelength:
-
- {{:helper.displayBar(data.maser_wavelength, 1, 10000, 'good')}} - {{:data.maser_wavelength}} MHz -
-
- {{:helper.link('-2 KHz', null, {'maserWavelength' : -2}, null)}} - {{:helper.link('-1 KHz', null, {'maserWavelength' : -1}, null)}} - {{:helper.link('-0.5 KHz', null, {'maserWavelength' : -0.5}, null)}} -
-
- {{:helper.link('+0.5 KHz', null, {'maserWavelength' : 0.5}, null)}} - {{:helper.link('+1 KHz', null, {'maserWavelength' : 1}, null)}} - {{:helper.link('+2 KHz', null, {'maserWavelength' : 2}, null)}} -
-
- -

Environment / Internal

-
-
Centrifuge speed:
-
- {{:helper.displayBar(data.scanner_rpm, 0, 1000, 'good')}} - {{:data.scanner_rpm}} RPM -
-
-
-
Internal temperature:
-
- {{:helper.displayBar(data.scanner_temperature, 0, 1273, (data.scanner_temperature > 250 ? (data.scanner_temperature > 1000 ? 'bad' : 'average') : 'good'))}} - {{:helper.smoothRound(data.scanner_temperature)}} K -
-
- {{if data.scanner_temperature > 1000}} - Warning! Exceeding 1200K will result in scan failure! - {{/if}} -
-
- -

Radiation

-
-
Ambient radiation:
-
- {{:helper.displayBar(data.radiation, 0, 100, ((data.radiation > 15) ? ((data.radiation > 65) ? 'bad' : 'average') : 'good'))}} - {{:helper.smoothRound(data.radiation)}} mSv -
-
- {{:helper.link(data.rad_shield_on ? 'Disable Radiation Shielding' : 'Enable Radiation Shielding', 'exclamation-circle', {'toggle_rad_shield' : 1}, null)}} - {{if data.rad_shield_on}} - Shield blocking scanner. - {{/if}} -
-
- -

Cooling

-
-
Coolant remaining:
-
- {{:helper.displayBar(data.unused_coolant_per, 0, 100, ((data.unused_coolant_per < 66) ? ((data.unused_coolant_per < 33) ? 'bad' : 'average') : 'good'))}} - {{:helper.smoothRound(data.unused_coolant_abs)}} u -
-
- {{if data.unused_coolant_per < 20}} - Warning! Coolant stocks low! - {{/if}} -
-
-
-
Coolant flow rate:
-
- {{:helper.displayBar(data.coolant_usage_rate, 0, 10, 'good')}} - {{:helper.smoothRound(data.coolant_usage_rate)}} u/s -
-
- {{:helper.link('Min u/s', null, {'coolantRate' : -10}, null)}} - {{:helper.link('-3 u/s', null, {'coolantRate' : -3}, null)}} - {{:helper.link('-1 u/s', null, {'coolantRate' : -1}, null)}} -
-
- {{:helper.link('+1 u/s', null, {'coolantRate' : 1}, null)}} - {{:helper.link('+3 u/s', null, {'coolantRate' : 3}, null)}} - {{:helper.link('Max u/s', null, {'coolantRate' : 10}, null)}} -
-
-
-
Coolant purity:
-
- {{:helper.displayBar(data.coolant_purity, 0, 100, ((data.coolant_purity < 66) ? ((data.coolant_purity < 33) ? 'bad' : 'average') : 'good'))}} - {{:data.coolant_purity}} % -
-
- {{if data.coolant_purity < 0.5}} - Warning! Check coolant for contaminants! - {{/if}} -
-
- -

Latest Results

-
-
- {{:data.last_scan_data}} -
-
diff --git a/nano/templates/hardsuit.tmpl b/nano/templates/hardsuit.tmpl deleted file mode 100644 index 92ab1c0fadf..00000000000 --- a/nano/templates/hardsuit.tmpl +++ /dev/null @@ -1,259 +0,0 @@ - - - - -{{if data.interfacelock || data.malf > 0}} -
-- HARDSUIT INTERFACE OFFLINE --
-{{else}} - {{if data.aicontrol && data.ai != 1}} -
-- HARDSUIT CONTROL OVERRIDDEN BY AI --
- {{else}} -
-
-
- Power supply -
-
- {{:helper.displayBar(data.chargestatus, 0, 50, (data.chargestatus >= 35) ? 'good' : (data.chargestatus >= 15) ? 'average' : 'bad')}} {{:helper.smoothRound(data.charge)}}/{{:data.maxcharge}} -
-
-
-
-
- AI control: -
-
- {{if data.aioverride}} -
ENABLED
- {{else}} -
DISABLED
- {{/if}} -
-
- {{:helper.link('Toggle', 'arrow-circle-down', {'toggle_ai_control' : 1}, null)}} -
-
-
-
- Suit status: -
-
- {{if data.sealing == 1}} -
PROCESSING
- {{else}} - {{if data.seals == 1}} -
INACTIVE
- {{else}} -
ACTIVE
- {{/if}} - {{/if}} -
-
- {{:helper.link('Toggle', 'arrow-circle-down', {'toggle_seals' : 1}, null)}} -
-
-
-
- Cover status: -
-
- {{if data.emagged || !data.securitycheck}} -
ERROR - MAINTENANCE LOCK CONTROL OFFLINE
- {{else}} - {{if data.coverlock}} -
LOCKED
- {{else}} -
UNLOCKED
- {{/if}} - {{/if}} -
-
- {{:helper.link('Toggle', 'arrow-circle-down', {'toggle_suit_lock' : 1}, null)}} -
-
-
-
- -

Hardware

-

Suit pieces

- -
-
-
- Helmet: -
-
- {{:helper.capitalizeFirstLetter(data.helmet)}} -
- {{if data.sealing != 1}} -
- {{:helper.link('Toggle', 'arrow-circle-down', {'toggle_piece' : 'helmet'}, null)}} -
- {{/if}} -
-
-
- Gauntlets: -
-
- {{:helper.capitalizeFirstLetter(data.gauntlets)}} -
- {{if data.sealing != 1}} -
- {{:helper.link('Toggle', 'arrow-circle-down', {'toggle_piece' : 'gauntlets'}, null)}} -
- {{/if}} -
-
-
- Boots: -
-
- {{:helper.capitalizeFirstLetter(data.boots)}} -
- {{if data.sealing != 1}} -
- {{:helper.link('Toggle', 'arrow-circle-down', {'toggle_piece' : 'boots'}, null)}} -
- {{/if}} -
-
-
- Chestpiece: -
-
- {{:helper.capitalizeFirstLetter(data.chest)}} -
- {{if data.sealing != 1}} -
- {{:helper.link('Toggle', 'arrow-circle-down', {'toggle_piece' : 'chest'}, null)}} -
- {{/if}} -
-
- -

System modules

- {{if data.seals == 1 || data.sealing == 1}} -

HARDSUIT SYSTEMS OFFLINE

- {{else}} -

Selected primary system: - {{if data.primarysystem}} - {{:helper.capitalizeFirstLetter(data.primarysystem)}} - {{else}} - None - {{/if}} -

- {{if data.modules}} -
- {{for data.modules}} -
-
-
-
{{:helper.capitalizeFirstLetter(value.name)}}
- {{if value.damage > 0}} -
- {{if value.damage == 1}} - (
damaged
) - {{else}} - (
destroyed
) - {{/if}} -
- {{/if}} -
-
- Engage: {{:value.engagecost}} - Activate: {{:value.activecost}} - Passive: {{:value.passivecost}} -
-
- {{:value.desc}} -
-
- {{if value.can_use == 1}} -
- {{:helper.link(value.engagestring, 'arrow-circle-down', {'interact_module' : value.index, 'module_mode' : 'engage'}, null)}} -
- {{/if}} - {{if value.can_select == 1}} -
- {{if value.name == data.primarysystem}} -
SELECTED
- {{else}} - {{:helper.link('Select', 'arrow-circle-down', {'interact_module' : value.index, 'module_mode' : 'select'}, null)}} - {{/if}} -
- {{/if}} - {{if value.can_toggle == 1}} -
- {{if value.is_active == 1}} - {{:helper.link(value.deactivatestring, 'arrow-circle-down', {'interact_module' : value.index, 'module_mode' : 'deactivate'}, null)}} - {{else}} - {{:helper.link(value.activatestring, 'arrow-circle-down', {'interact_module' : value.index, 'module_mode' : 'activate'}, null)}} - {{/if}} -
- {{/if}} -
-
-
-
- {{if value.charges}} -
Stored charges
-
-
Selected:
 {{:helper.capitalizeFirstLetter(value.chargetype)}} -
- {{for value.charges :itemValue:itemIndex}} -
- {{:helper.link(helper.capitalizeFirstLetter(itemValue.caption), null, {'interact_module' : value.index, 'module_mode' : 'select_charge_type', 'charge_type' : itemValue.index}, null)}} -
- {{/for}} - {{/if}} -
-
-
- {{/for}} -
- {{else}} - None. - {{/if}} - {{/if}} - {{/if}} -{{/if}} \ No newline at end of file diff --git a/nano/templates/helm.tmpl b/nano/templates/helm.tmpl deleted file mode 100644 index 615d4ab46d0..00000000000 --- a/nano/templates/helm.tmpl +++ /dev/null @@ -1,115 +0,0 @@ - -
-

Sector information

-
- {{:data.sector}} -
- Coordinates: {{:data.s_x}} : {{:data.s_y}} -
- Additional information: {{:data.s_x}} : {{:data.s_y}} - {{:data.sector_info}} -
-
- -
-

Flight data

-
-
-
- Speed: -
-
- {{:data.speed}} -
-
-
-
- Acceleration: -
-
- {{:data.accel}} -
-
-
-
- Heading: -
-
- {{:data.heading}} -
-
-
-
- - -

Manual control

-
-
-
-
- {{:helper.link('', 'caret-left fa-rotate-45', { 'move' : 9 }, null, null)}} - {{:helper.link('', 'caret-up', { 'move' : 1 }, null, null)}} - {{:helper.link('', 'caret-up fa-rotate-45', { 'move' : 5 }, null, null)}} -
-
- {{:helper.link('', 'caret-left', { 'move' : 8 }, null, null)}} - {{:helper.link('', 'circle-close', { 'brake' : 1 }, null, null)}} - {{:helper.link('', 'caret-right', { 'move' : 4 }, null, null)}} -
-
- {{:helper.link('', 'caret-down fa-rotate-45', { 'move' : 10 }, null, null)}} - {{:helper.link('', 'caret-down', { 'move' : 2 }, null, null)}} - {{:helper.link('', 'caret-right fa-rotate-45', { 'move' : 6 }, null, null)}} -
-
- -
-
- Direct control - {{:helper.link(data.manual_control ? 'Engaged' : 'Disengaged', 'random', { 'manual' : 1 }, data.manual_control ? 'selected' : null, null)}} -
-
-
-
- -
-
-

Autopilot

-
-
- {{:helper.link(data.autopilot ? 'Engaged' : 'Disengaged', 'gear', { 'apilot' : 1 }, data.dest ? null : 'disabled', data.autopilot ? 'selected' : null)}} -
-
-
-
- Target coordinates -
-
- {{if data.dest}} - {{:helper.link(data.d_x, null, { 'setx' : 1 }, null, null)}} {{:helper.link(data.d_y, null, { 'sety' : 1 }, null, null)}} - {{else}} - {{:helper.link('None', null, { 'sety' : 1, 'setx' : 1 }, null, null)}} - {{/if}} -
-
- -

Navigation data

-
- {{:helper.link('Save current position', 'floppy-o', { 'add' : 'current' }, null)}} - {{:helper.link('Add new entry', 'file', { 'add' : 'new' }, null)}} -
- -
- {{if data.locations}} - {{for data.locations}} -
- {{:value.name}}: - {{:value.x}} : {{:value.y}} -
-
- {{:helper.link('Plot course', 'arrow-right', { 'x' : value.x, 'y' : value.y }, null, null)}} - {{:helper.link('Remove entry', 'close', { 'remove' : value.reference }, null, null)}} -
- {{/for}} - {{/if}} -
diff --git a/nano/templates/isolation_centrifuge.tmpl b/nano/templates/isolation_centrifuge.tmpl deleted file mode 100644 index 4ff0272df02..00000000000 --- a/nano/templates/isolation_centrifuge.tmpl +++ /dev/null @@ -1,81 +0,0 @@ -
- {{:helper.link('Close', 'gear', {'close' : 1}, null, 'fixedLeft')}} - {{:helper.link('Print', 'print', { 'print' : 1 }, data.antibodies || data.pathogens ? null : 'disabled', 'fixedLeft')}} -
- -{{if data.busy}} -
The Centrifuge is currently busy.
-
-
{{:data.busy}}
-
-

- Thank you for your patience! -

-{{else}} -
-

{{:data.is_antibody_sample ? 'Antibody Sample' : 'Blood Sample'}}

-
-
- {{:helper.link('Eject Vial', 'eject', { 'action' : 'sample' }, data.sample_inserted ? null : 'disabled')}} -
- {{if data.sample_inserted}} - {{if data.antibodies || data.pathogens}} -
- {{if data.antibodies}} -
-
- Antibodies: -
-
- {{:data.antibodies}} -
-
- {{/if}} - {{if data.pathogens}} -
-
- Pathogens: -
-
- {{for data.pathogens}} -
- {{:value.name}} ({{:value.spread_type}}) -
- {{/for}} -
-
- {{/if}} -
- {{else}} -
- No antibodies or viral strains detected. -
- {{/if}} - {{else}} -
- No vial detected. -
- {{/if}} - {{if data.antibodies && !data.is_antibody_sample}} -
-
- Isolate Antibodies: -
-
- {{:helper.link(data.antibodies, 'pencil', { 'action' : 'antibody' })}} -
-
- {{/if}} - {{if data.pathogens}} -
-
- Isolate Strain: -
-
- {{for data.pathogens}} - {{:helper.link(value.name, 'pencil', { 'isolate' : value.reference })}} - {{/for}} -
-
- {{/if}} -{{/if}} diff --git a/nano/templates/multi_docking_console.tmpl b/nano/templates/multi_docking_console.tmpl deleted file mode 100644 index 9515799644e..00000000000 --- a/nano/templates/multi_docking_console.tmpl +++ /dev/null @@ -1,37 +0,0 @@ -
-
-
- Docking Port Status: -
-
- {{if data.docking_status == "docked"}} - DOCKED - {{else data.docking_status == "docking"}} - DOCKING - {{else data.docking_status == "undocking"}} - UNDOCKING - {{else data.docking_status == "undocked"}} - NOT IN USE - {{else}} - ERROR - {{/if}} -
-
-
- -{{for data.airlocks}} -
-
-
- {{:value.name}} -
-
- {{if value.override_enabled}} - OVERRIDE ENABLED - {{else}} - STATUS OK - {{/if}} -
-
-
-{{/for}} \ No newline at end of file diff --git a/nano/templates/pathogenic_isolator.tmpl b/nano/templates/pathogenic_isolator.tmpl deleted file mode 100644 index 119d5b6b7fe..00000000000 --- a/nano/templates/pathogenic_isolator.tmpl +++ /dev/null @@ -1,107 +0,0 @@ -
-

Menu

-
-
- {{if !data.isolating}} - {{:helper.link('Home', 'home', {'home' : 1}, data.state == 'home' ? 'disabled' : null, 'fixedLeft')}} - {{:helper.link('List', 'sticky-note', {'list' : 1}, data.state == 'list' ? 'disabled' : null, 'fixedLeft')}} - {{:helper.link('Pathogen', 'folder-open', {'entry' : 1}, data.state == 'entry' ? 'disabled' : null, 'fixedLeft')}} - {{/if}} -
- {{:helper.link('Close', 'gear', {'close' : 1}, null, 'fixedLeft')}} - {{:helper.link('Print', 'print', { 'print' : 1 }, data.can_print ? null : 'disabled', 'fixedLeft')}} -
- -{{if data.isolating}} -
The Isolator is currently busy.
-
-
Isolating pathogens...
-
-

- Thank you for your patience! -

-{{else}} - {{if data.state =="home"}} -
-

Blood Sample

-
-
- {{:helper.link('Eject Syringe', 'eject', { 'eject' : 1 }, data.syringe_inserted ? null : 'disabled')}} -
- - {{if data.syringe_inserted}} -
- Pathogens: - {{if data.pathogen_pool}} - {{for data.pathogen_pool}} -
- {{:index + 1}}. #{{:value.unique_id}} {{:value.is_in_database ? "(Analysed)" : ""}}
- {{:value.name}}: {{:value.dna}} -
- {{/for}} - {{else}} - No pathogens detected. - {{/if}} -
- {{else}} -
- No syringe loaded. -
- {{/if}} - {{if data.pathogen_pool}} -
-
- Isolate Pathogens: -
-
- {{for data.pathogen_pool}} - {{:helper.link('#' + value.unique_id, 'pencil', { 'isolate' : value.reference }, null, 'fixedLeft')}} - {{/for}} -
-
-
-
- Database Lookup: -
-
- {{for data.pathogen_pool}} - {{if value.is_in_database}} - {{:helper.link('#' + value.unique_id, 'info', { 'entry' : 1, 'view' : value.record }, null, 'fixedLeft')}} - {{/if}} - {{/for}} -
-
- {{/if}} - {{else}} - {{if data.state == "list"}} -
-

View Database

-
-
- {{if data.database}} - {{for data.database}} -
-
{{:data.name}}
- {{:helper.link('Details', 'arrow-circle-down', { 'entry' : 1, 'view' : value.record }, null, 'fixedLeft')}} -
- {{/for}} - {{else}} - The viral database is empty. - {{/if}} -
- {{else}} - {{if data.state == "entry"}} - {{if data.entry}} -
-

{{:data.entry.name}}

-
-
- {{:data.entry.description}} -
- {{else}} - No virus selected. - {{/if}} - {{/if}} - {{/if}} - {{/if}} -{{/if}} diff --git a/nano/templates/shuttle_control_console.tmpl b/nano/templates/shuttle_control_console.tmpl deleted file mode 100644 index eb7ce9c0ad8..00000000000 --- a/nano/templates/shuttle_control_console.tmpl +++ /dev/null @@ -1,66 +0,0 @@ -

Shuttle Status

-
-
- {{:data.shuttle_status}} -
-
-
-
-
- Bluespace Drive: -
-
- {{if data.shuttle_state == "idle"}} - IDLE - {{else data.shuttle_state == "warmup"}} - SPINNING UP - {{else data.shuttle_state == "in_transit"}} - ENGAGED - {{else}} - ERROR - {{/if}} -
-
-
-{{if data.has_docking}} -
-
-
- Docking Status: -
-
- {{if data.docking_status == "docked"}} - DOCKED - {{else data.docking_status == "docking"}} - {{if !data.docking_override}} - DOCKING - {{else}} - DOCKING-MANUAL - {{/if}} - {{else data.docking_status == "undocking"}} - {{if !data.docking_override}} - UNDOCKING - {{else}} - UNDOCKING-MANUAL - {{/if}} - {{else data.docking_status == "undocked"}} - UNDOCKED - {{else}} - ERROR - {{/if}} - -
-
-
-{{/if}} - -

Shuttle Control

-
-
-
- {{:helper.link('Launch Shuttle', 'arrow-circle-right', {'move' : '1'}, data.can_launch? null : 'disabled' , null)}} - {{:helper.link('Cancel Launch', 'ban', {'cancel' : '1'}, data.can_cancel ? null : 'disabled' , null)}} - {{:helper.link('Force Launch', 'exclamation-triangle', {'force' : '1'}, data.can_force? null : 'disabled' , data.can_force ? 'redButton' : null)}} -
-
-
\ No newline at end of file diff --git a/nano/templates/shuttle_control_console_exploration.tmpl b/nano/templates/shuttle_control_console_exploration.tmpl deleted file mode 100644 index 2e470a00978..00000000000 --- a/nano/templates/shuttle_control_console_exploration.tmpl +++ /dev/null @@ -1,73 +0,0 @@ -

Shuttle Status

-
-
- {{:data.shuttle_status}} -
-
-
-
-
- Drive: -
-
- {{if data.shuttle_state == "idle"}} - IDLE - {{else data.shuttle_state == "warmup"}} - SPINNING UP - {{else data.shuttle_state == "in_transit"}} - ENGAGED - {{else}} - ERROR - {{/if}} -
-
-
-{{if data.has_docking}} -
-
-
- Docking Status: -
-
- {{if data.docking_status == "docked"}} - DOCKED - {{else data.docking_status == "docking"}} - {{if !data.docking_override}} - DOCKING - {{else}} - DOCKING-MANUAL - {{/if}} - {{else data.docking_status == "undocking"}} - {{if !data.docking_override}} - UNDOCKING - {{else}} - UNDOCKING-MANUAL - {{/if}} - {{else data.docking_status == "undocked"}} - UNDOCKED - {{else}} - ERROR - {{/if}} -
-
-
-{{/if}} -
-
- Current Destination: -
- {{:data.destination_name}} -
- {{:helper.link('Choose Destination', 'arrow-down', {'pick' : '1'}, data.can_pick ? null : 'disabled' , null)}} -
-
-

Shuttle Control

-
-
-
- {{:helper.link('Launch Shuttle', 'arrow-circle-right', {'move' : '1'}, data.can_launch ? null : 'disabled' , null)}} - {{:helper.link('Cancel Launch', 'ban', {'cancel' : '1'}, data.can_cancel ? null : 'disabled' , null)}} - {{:helper.link('Force Launch', 'exclamation-triangle', {'force' : '1'}, data.can_force ? null : 'disabled' , data.can_force ? 'redButton' : null)}} -
-
-
\ No newline at end of file diff --git a/nano/templates/shuttle_control_multi_console.tmpl b/nano/templates/shuttle_control_multi_console.tmpl deleted file mode 100644 index 2d7d2fbb622..00000000000 --- a/nano/templates/shuttle_control_multi_console.tmpl +++ /dev/null @@ -1,58 +0,0 @@ -{{if data.is_syndicate}} - {{:helper.syndicateMode()}} -{{/if}} -

Ship Status

-
-
- {{:data.shuttle_status}} -
-
-
-
-
- Bluespace Drive: -
-
- {{if data.shuttle_state == "idle"}} - IDLE - {{else data.shuttle_state == "charging"}} - CHARGING - {{else data.shuttle_state == "warmup"}} - SPINNING UP - {{else data.shuttle_state == "in_transit"}} - ENGAGED - {{else}} - ERROR - {{/if}} -
-
-
-{{if data.can_cloak}} -
-
-
- Cloak: -
-
- {{if data.cloaked}} - ENABLED - {{else}} - DISABLED: The station will be warned of our arrival. - {{/if}} -
-
-
-{{/if}} - -

Ship Control

-
-
-
- {{:helper.link('Launch Ship', 'arrow-circle-right', {'move_multi' : '1'}, data.can_launch ? null : 'disabled' , null)}} - {{:helper.link('Return to Base', 'arrow-circle-o-left', {'start' : '1'}, data.can_return_to_base ? null : 'disabled' , null)}} - {{if data.can_cloak}} - {{:helper.link(data.cloaked ? 'Disable Cloak' : 'Enable Cloak', 'exclamation-triangle', {'toggle_cloak' : '1'}, data.can_cloak ? null : 'disabled' , null)}} - {{/if}} -
-
-
\ No newline at end of file diff --git a/nano/templates/simple_docking_console.tmpl b/nano/templates/simple_docking_console.tmpl deleted file mode 100644 index c97e8a84924..00000000000 --- a/nano/templates/simple_docking_console.tmpl +++ /dev/null @@ -1,99 +0,0 @@ -
-
-
- Docking Port Status: -
-
- {{if data.docking_status == "docked"}} - {{if !data.override_enabled}} - DOCKED - {{else}} - DOCKED-OVERRIDE ENABLED - {{/if}} - {{else data.docking_status == "docking"}} - {{if !data.override_enabled}} - DOCKING - {{else}} - DOCKING-OVERRIDE ENABLED - {{/if}} - {{else data.docking_status == "undocking"}} - {{if !data.override_enabled}} - UNDOCKING - {{else}} - UNDOCKING-OVERRIDE ENABLED - {{/if}} - {{else data.docking_status == "undocked"}} - {{if !data.override_enabled}} - NOT IN USE - {{else}} - OVERRIDE ENABLED - {{/if}} - {{else}} - ERROR - {{/if}} -
-
-
-
-
-
- Docking Hatch: -
-
- {{if data.docking_status == "docked"}} - {{if data.door_state == "open"}} - OPEN - {{else data.door_state == "closed"}} - CLOSED - {{else}} - ERROR - {{/if}} - {{else data.docking_status == "docking"}} - {{if data.door_state == "open"}} - OPEN - {{else data.door_state == "closed" && data.door_lock == "locked"}} - SECURED - {{else data.door_state == "closed" && data.door_lock == "unlocked"}} - UNSECURED - {{else}} - ERROR - {{/if}} - {{else data.docking_status == "undocking"}} - {{if data.door_state == "open"}} - OPEN - {{else data.door_state == "closed" && data.door_lock == "locked"}} - SECURED - {{else data.door_state == "closed" && data.door_lock == "unlocked"}} - UNSECURED - {{else}} - ERROR - {{/if}} - {{else data.docking_status == "undocked"}} - {{if data.door_state == "open"}} - OPEN - {{else data.door_state == "closed" && data.door_lock == "locked"}} - SECURED - {{else data.door_state == "closed" && data.door_lock == "unlocked"}} - UNSECURED - {{else}} - ERROR - {{/if}} - {{else}} - ERROR - {{/if}} -
-
-
-
-
-
- {{if data.docking_status == "docked"}} - {{:helper.link('Force exterior door', 'exclamation-triangle', {'command' : 'force_door'}, data.override_enabled ? null : 'disabled', null)}} - {{:helper.link('Override', 'exclamation-triangle', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redButton' : null)}} - {{else}} - {{:helper.link('Force exterior door', 'exclamation-triangle', {'command' : 'force_door'}, data.override_enabled ? null : 'disabled', data.override_enabled ? 'redButton' : null)}} - {{:helper.link('Override', 'exclamation-triangle', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redButton' : 'yellowButton')}} - {{/if}} -
-
-
\ No newline at end of file diff --git a/nano/templates/simple_docking_console_pod.tmpl b/nano/templates/simple_docking_console_pod.tmpl deleted file mode 100644 index b17a8a01028..00000000000 --- a/nano/templates/simple_docking_console_pod.tmpl +++ /dev/null @@ -1,101 +0,0 @@ -
-
-
- Docking Port Status: -
-
- {{if data.docking_status == "docked"}} - {{if !data.override_enabled}} - DOCKED - {{else}} - DOCKED-OVERRIDE ENABLED - {{/if}} - {{else data.docking_status == "docking"}} - {{if !data.override_enabled}} - DOCKING - {{else}} - DOCKING-OVERRIDE ENABLED - {{/if}} - {{else data.docking_status == "undocking"}} - {{if !data.override_enabled}} - UNDOCKING - {{else}} - UNDOCKING-OVERRIDE ENABLED - {{/if}} - {{else data.docking_status == "undocked"}} - {{if !data.override_enabled}} - NOT IN USE - {{else}} - OVERRIDE ENABLED - {{/if}} - {{else}} - ERROR - {{/if}} -
-
-
-
-
-
- Docking Hatch: -
-
- {{if data.docking_status == "docked"}} - {{if data.door_state == "open"}} - OPEN - {{else data.door_state == "closed"}} - CLOSED - {{else}} - ERROR - {{/if}} - {{else data.docking_status == "docking"}} - {{if data.door_state == "open"}} - OPEN - {{else data.door_state == "closed" && data.door_lock == "locked"}} - SECURED - {{else data.door_state == "closed" && data.door_lock == "unlocked"}} - UNSECURED - {{else}} - ERROR - {{/if}} - {{else data.docking_status == "undocking"}} - {{if data.door_state == "open"}} - OPEN - {{else data.door_state == "closed" && data.door_lock == "locked"}} - SECURED - {{else data.door_state == "closed" && data.door_lock == "unlocked"}} - UNSECURED - {{else}} - ERROR - {{/if}} - {{else data.docking_status == "undocked"}} - {{if data.door_state == "open"}} - OPEN - {{else data.door_state == "closed" && data.door_lock == "locked"}} - SECURED - {{else data.door_state == "closed" && data.door_lock == "unlocked"}} - UNSECURED - {{else}} - ERROR - {{/if}} - {{else}} - ERROR - {{/if}} -
-
-
-
-
-
- {{if data.docking_status == "docked"}} - {{:helper.link('Force exterior door', 'exclamation-triangle', {'command' : 'force_door'}, data.override_enabled ? null : 'disabled', null)}} - {{:helper.link('Override', 'exclamation-triangle', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redButton' : null)}} - {{:helper.link('MANUAL EJECT', 'exclamation-triangle', {'command' : 'toggle_override'}, 'disabled', null)}} - {{else}} - {{:helper.link('Force exterior door', 'exclamation-triangle', {'command' : 'force_door'}, data.override_enabled ? null : 'disabled', data.override_enabled ? 'redButton' : null)}} - {{:helper.link('Override', 'exclamation-triangle', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redButton' : 'yellowButton')}} - {{:helper.link('MANUAL EJECT', 'exclamation-triangle', {'command' : 'toggle_override'}, data.can_force ? null : 'disabled', data.can_force ? 'redButton' : null)}} - {{/if}} -
-
-
\ No newline at end of file diff --git a/nano/templates/vending.tmpl b/nano/templates/vending.tmpl deleted file mode 100644 index 6ca87626494..00000000000 --- a/nano/templates/vending.tmpl +++ /dev/null @@ -1,85 +0,0 @@ -
{{:~link('Eject Coin', 'eject', {'remove_coin' : 1}, coin ? null : 'disabled', 'floatRight')}} -
- {{if !coin}} -
No coin loaded.  
- {{else}} -
Coin Loaded.  
- {{/if}} -
-
- Select an Item: -
-
-
-
-
-
-
-
- {{if products}} - {{for productData}} -
- {{if amount}} - {{:~link('Vend', 'eject', {'vend': itself}, vendReady ? 'disabled' : null)}} {{:name}} - {{:amount}}-{{:price}} - {{else}} - {{:~link('Vend', 'eject', {'vend': itself}, 'disabled')}}{{:name}} - Sold Out. - {{/if}} -
- {{/for}} - {{else}} - No products loaded. - {{/if}} -
-
-
-{{if coin}} -
-
- Premium Items: -
-
-
-
-
- {{if products}} - {{for premiumData}} -
- {{if amount}} - {{:~link('Vend', 'eject', {'vend': itself}, vendReady ? 'disabled' : null)}} {{:name}} - {{:amount}}-{{:price}} - {{else}} - {{:~link('Vend', 'eject', {'vend': itself}, 'disabled')}}{{:name}} - Sold Out. - {{/if}} -
- {{/for}} - {{else}} - No products loaded. - {{/if}} -
-
-
-{{/if}} -{{if extendedInventory}} -
- Contraband: -
-
-
-
-
- {{if products}} - {{for contrabandData}} -
- {{if amount}} - {{:~link('Vend', 'eject', {'vend': itself}, vendReady ? 'disabled' : null)}} {{:name}} - {{:amount}}-{{:price}} - {{else}} - {{:~link('Vend', 'eject', {'vend': itself}, 'disabled')}}{{:name}} - Sold Out. - {{/if}} -
- {{/for}} - {{else}} - No products loaded. - {{/if}} -
-
-
-{{/if}} \ No newline at end of file From 94a77895bce71f8e54353345ab8831afcd7bcf43 Mon Sep 17 00:00:00 2001 From: Gatchapod Date: Tue, 30 Jun 2020 13:39:04 +0200 Subject: [PATCH 08/20] We don't need it, do we? --- code/game/gamemodes/changeling/powers/tiny_prick.dm | 8 +++----- code/game/gamemodes/miniantags/bot_swarm/swarmer.dm | 2 +- code/game/objects/items/devices/scanners.dm | 2 +- code/game/objects/items/stacks/nanopaste.dm | 2 +- code/modules/mob/living/carbon/human/death.dm | 4 ++-- code/modules/mob/living/carbon/human/examine.dm | 8 ++++---- code/modules/mob/living/carbon/human/human_defense.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 4 ++-- code/modules/mob/living/carbon/human/update_icons.dm | 2 +- code/modules/mob/living/say.dm | 2 +- code/modules/mob/living/silicon/robot/component.dm | 8 ++++---- code/modules/mob/mob_helpers.dm | 8 -------- code/modules/surgery/organs/blood.dm | 2 +- code/modules/surgery/organs/organ_icon.dm | 2 +- 14 files changed, 23 insertions(+), 33 deletions(-) diff --git a/code/game/gamemodes/changeling/powers/tiny_prick.dm b/code/game/gamemodes/changeling/powers/tiny_prick.dm index 94bde26674b..77c041ed555 100644 --- a/code/game/gamemodes/changeling/powers/tiny_prick.dm +++ b/code/game/gamemodes/changeling/powers/tiny_prick.dm @@ -36,11 +36,9 @@ to_chat(user, "We haven't prepared our sting yet!") if(!iscarbon(target)) return - if(ishuman(target)) - var/mob/living/carbon/human/H = target - if(H.isSynthetic()) - to_chat(user, "This won't work on synthetics.") - return + if(ismachine(target)) + to_chat(user, "This won't work on synthetics.") + return if(!isturf(user.loc)) return if(!AStar(user, target.loc, /turf/proc/Distance, user.mind.changeling.sting_range, simulated_only = 0)) diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm index 059eed3541c..35354cf7b39 100644 --- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm +++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm @@ -604,7 +604,7 @@ if(!istype(L, /mob/living/simple_animal/hostile/swarmer)) playsound(loc,'sound/effects/snap.ogg',50, 1, -1) L.electrocute_act(0, src, 1, TRUE, TRUE) - if(isrobot(L) || L.isSynthetic()) + if(isrobot(L) || ismachine(L)) L.Weaken(5) qdel(src) ..() diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 0d8873a6377..0960679d89f 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -141,7 +141,7 @@ REAGENT SCANNER // Used by the PDA medical scanner too /proc/healthscan(mob/user, mob/living/M, mode = 1, advanced = FALSE) - if(!ishuman(M) || M.isSynthetic()) + if(!ishuman(M) || ismachine(M)) //these sensors are designed for organic life to_chat(user, "Analyzing Results for ERROR:\n\t Overall Status: ERROR") to_chat(user, "\t Key: Suffocation/Toxin/Burns/Brute") diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index 708070e1478..79252b7bb98 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -57,7 +57,7 @@ E.heal_damage(0, remheal, 0, 1) //Healing Burn remheal = nremheal user.visible_message("\The [user] applies some nanite paste at \the [M]'s [E.name] with \the [src].") - if(H.bleed_rate && H.isSynthetic()) + if(H.bleed_rate && ismachine(H)) H.bleed_rate = 0 else to_chat(user, "Nothing to fix here.") diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 6b7a0a2b15d..dd5947e4994 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -6,7 +6,7 @@ canmove = 0 icon = null invisibility = 101 - if(!isSynthetic()) + if(!ismachine(src)) animation = new(loc) animation.icon_state = "blank" animation.icon = 'icons/mob/mob.dmi' @@ -37,7 +37,7 @@ M.forceMove(get_turf(src)) visible_message("[M] bursts out of [src]!") - if(!isSynthetic()) + if(!ismachine(src)) flick("gibbed-h", animation) hgibs(loc, dna) else diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index b67e01924c8..c48fa8168de 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -208,7 +208,7 @@ if(!E) wound_flavor_text["[organ_tag]"] = "[p_they(TRUE)] [p_are()] missing [p_their()] [organ_descriptor].\n" else - if(!isSynthetic()) + if(!ismachine(src)) if(E.is_robotic()) wound_flavor_text["[E.limb_name]"] = "[p_they(TRUE)] [p_have()] a robotic [E.name]!\n" @@ -252,7 +252,7 @@ var/temp = getBruteLoss() //no need to calculate each of these twice if(temp) - var/brute_message = !isSynthetic() ? "bruising" : "denting" + var/brute_message = !ismachine(src) ? "bruising" : "denting" if(temp < 30) msg += "[p_they(TRUE)] [p_have()] minor [brute_message ].\n" else @@ -301,13 +301,13 @@ else if(nutrition >= NUTRITION_LEVEL_FAT) msg += "[p_they(TRUE)] [p_are()] quite chubby.\n" - if(!isSynthetic() && blood_volume < BLOOD_VOLUME_SAFE) + if(!ismachine(src) && blood_volume < BLOOD_VOLUME_SAFE) msg += "[p_they(TRUE)] [p_have()] pale skin.\n" if(bleedsuppress) msg += "[p_they(TRUE)] [p_are()] bandaged with something.\n" else if(bleed_rate) - var/bleed_message = !isSynthetic() ? "bleeding" : "leaking" + var/bleed_message = !ismachine(src) ? "bleeding" : "leaking" msg += "[p_they(TRUE)] [p_are()] [bleed_message]!\n" if(reagents.has_reagent("teslium")) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index a849235af64..dc8fc2ecc59 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -84,7 +84,7 @@ emp_act E.heal_damage(rembrute,0,0,1) rembrute = nrembrute user.visible_message("[user] patches some dents on [src]'s [E.name] with [I].") - if(bleed_rate && isSynthetic()) + if(bleed_rate && ismachine(src)) bleed_rate = 0 user.visible_message("[user] patches some leaks on [src] with [I].") if(IgniteMob()) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 5030c5c4170..91380e61cf4 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -697,7 +697,7 @@ alcohol_strength /= sober_str var/obj/item/organ/internal/liver/L - if(!isSynthetic()) + if(!ismachine(src)) L = get_int_organ(/obj/item/organ/internal/liver) if(L) alcohol_strength *= L.alcohol_intensity @@ -719,7 +719,7 @@ AdjustConfused(3 / sober_str) if(alcohol_strength >= blur_start) //blurry eyes EyeBlurry(10 / sober_str) - if(!isSynthetic()) //stuff only for non-synthetics + if(!ismachine(src)) //stuff only for non-synthetics if(alcohol_strength >= vomit_start) //vomiting if(prob(8)) fakevomit() diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 2cce48d51c2..fd8756a5c25 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -376,7 +376,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //base icons var/icon/hair_standing = new /icon('icons/mob/human_face.dmi',"bald_s") - if(head_organ.h_style && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic()))) + if(head_organ.h_style && !(head && (head.flags & BLOCKHEADHAIR) && !(ismachine(src)))) var/datum/sprite_accessory/hair/hair_style = GLOB.hair_styles_full_list[head_organ.h_style] if(hair_style && hair_style.species_allowed) if((head_organ.dna.species.name in hair_style.species_allowed) || (head_organ.dna.species.bodyflags & ALL_RPARTS)) //If the head's species is in the list of allowed species for the hairstyle, or the head's species is one flagged to have bodies comprised wholly of cybernetics... diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index fb633f116bd..69fe7736567 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -61,7 +61,7 @@ proc/get_radio_key_from_channel(var/channel) return default_language /mob/living/proc/handle_speech_problems(list/message_pieces, var/verb) - var/robot = isSynthetic() + var/robot = ismachine(src) for(var/datum/multilingual_say_piece/S in message_pieces) if(S.speaking && S.speaking.flags & NO_STUTTER) continue diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm index 26b5683d1a3..2fab9cf41cb 100644 --- a/code/modules/mob/living/silicon/robot/component.dm +++ b/code/modules/mob/living/silicon/robot/component.dm @@ -253,7 +253,7 @@ proc/robot_healthscan(mob/user, mob/living/M) to_chat(user, "You can't analyze non-robotic things!") return - + switch(scan_type) if("robot") var/BU = M.getFireLoss() > 50 ? "[M.getFireLoss()]" : M.getFireLoss() @@ -269,7 +269,7 @@ proc/robot_healthscan(mob/user, mob/living/M) to_chat(user, "Localized Damage:") if(!LAZYLEN(damaged) && !LAZYLEN(missing)) to_chat(user, "\t Components are OK.") - else + else if(LAZYLEN(damaged)) for(var/datum/robot_component/org in damaged) user.show_message(text("\t []: [][] - [] - [] - []", \ @@ -282,7 +282,7 @@ proc/robot_healthscan(mob/user, mob/living/M) if(LAZYLEN(missing)) for(var/datum/robot_component/org in missing) user.show_message("\t [capitalize(org.name)]: MISSING") - + if(H.emagged && prob(5)) to_chat(user, "\t ERROR: INTERNAL SYSTEMS COMPROMISED") @@ -313,7 +313,7 @@ proc/robot_healthscan(mob/user, mob/living/M) if(!organ_found) to_chat(user, "No prosthetics located.") - if(H.isSynthetic()) + if(ismachine(H)) to_chat(user, "Internal Fluid Level:[H.blood_volume]/[H.max_blood]") if(H.bleed_rate) to_chat(user, "Warning:External component leak detected!") diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index df2a39c0930..63175a68024 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -12,14 +12,6 @@ return 1 return 0 -/mob/proc/isSynthetic() - return 0 - -/mob/living/carbon/human/isSynthetic() - if(ismachine(src)) - return TRUE - return FALSE - /mob/proc/get_screen_colour() /mob/proc/update_client_colour(var/time = 10) //Update the mob's client.color with an animation the specified time in length. diff --git a/code/modules/surgery/organs/blood.dm b/code/modules/surgery/organs/blood.dm index e01c75dcbd0..6114ca9277e 100644 --- a/code/modules/surgery/organs/blood.dm +++ b/code/modules/surgery/organs/blood.dm @@ -54,7 +54,7 @@ var/obj/item/organ/external/BP = X var/brutedamage = BP.brute_dam - if(BP.is_robotic() && !isSynthetic()) + if(BP.is_robotic() && !ismachine(src)) continue //We want an accurate reading of .len diff --git a/code/modules/surgery/organs/organ_icon.dm b/code/modules/surgery/organs/organ_icon.dm index c2df537e771..6a518012441 100644 --- a/code/modules/surgery/organs/organ_icon.dm +++ b/code/modules/surgery/organs/organ_icon.dm @@ -138,7 +138,7 @@ GLOBAL_LIST_EMPTY(limb_icon_cache) add_overlay(facial_s) if(h_style) - if(!owner.isSynthetic() || (owner.isSynthetic() && ((owner.head && (owner.head.flags & BLOCKHEADHAIR)) || (owner.wear_mask && (owner.wear_mask.flags & BLOCKHEADHAIR))))) + if(!ismachine(owner) || (ismachine(owner) && ((owner.head && (owner.head.flags & BLOCKHEADHAIR)) || (owner.wear_mask && (owner.wear_mask.flags & BLOCKHEADHAIR))))) var/datum/sprite_accessory/hair_style = GLOB.hair_styles_full_list[h_style] if(hair_style && ((dna.species.name in hair_style.species_allowed) || (dna.species.bodyflags & ALL_RPARTS))) var/icon/hair_s = new /icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s") From 3b59c7ca27b1a810708f85a8735aa78eb0e36252 Mon Sep 17 00:00:00 2001 From: AffectedArc07 Date: Tue, 30 Jun 2020 13:51:52 +0100 Subject: [PATCH 09/20] Fixes TGUI aghost interactions + disposals --- code/modules/recycling/disposal.dm | 7 ++----- code/modules/tgui/states/default.dm | 5 +++++ code/modules/tgui/states/observer.dm | 2 ++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 733add1131c..7584a9cbfe3 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -271,7 +271,7 @@ /obj/machinery/disposal/tgui_data(mob/user) var/list/data = list() - + data["isAI"] = isAI(user) data["flushing"] = flush data["mode"] = mode @@ -290,15 +290,12 @@ to_chat(usr, "The disposal units power is disabled.") return - if(..()) - return - if(stat & BROKEN) return src.add_fingerprint(usr) - if(usr.stat || usr.restrained() || src.flushing) + if(src.flushing) return if(istype(src.loc, /turf)) diff --git a/code/modules/tgui/states/default.dm b/code/modules/tgui/states/default.dm index a32474eef66..4da729aa7e5 100644 --- a/code/modules/tgui/states/default.dm +++ b/code/modules/tgui/states/default.dm @@ -56,3 +56,8 @@ GLOBAL_DATUM_INIT(tgui_default_state, /datum/tgui_state/default, new) return STATUS_INTERACTIVE else return ..() + +/mob/dead/observer/default_can_use_tgui_topic() + if(can_admin_interact()) + return STATUS_INTERACTIVE // Admins are more equal + return STATUS_UPDATE // Ghosts can view updates diff --git a/code/modules/tgui/states/observer.dm b/code/modules/tgui/states/observer.dm index b7c81c36e5d..bf98f444654 100644 --- a/code/modules/tgui/states/observer.dm +++ b/code/modules/tgui/states/observer.dm @@ -9,5 +9,7 @@ GLOBAL_DATUM_INIT(tgui_observer_state, /datum/tgui_state/observer_state, new) /datum/tgui_state/observer_state/can_use_topic(src_object, mob/user) if(isobserver(user)) return STATUS_INTERACTIVE + if(check_rights(R_ADMIN, 0, src)) + return STATUS_INTERACTIVE return STATUS_CLOSE From 07740f09220d9c1b705002eb3e605fd98a5b70d8 Mon Sep 17 00:00:00 2001 From: denghis1 <63977635+denghis1@users.noreply.github.com> Date: Tue, 30 Jun 2020 22:00:12 +0200 Subject: [PATCH 10/20] Fixed headcrab Bug eating while being dead. Fixed name while eating There was a bug with headcrabs eating while being dead. Testing uncovered that headcrabs sometimes said the wrong name while consuming simple mobs, this has also been fixed. --- code/modules/mob/living/simple_animal/hostile/headcrab.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/simple_animal/hostile/headcrab.dm b/code/modules/mob/living/simple_animal/hostile/headcrab.dm index ced4a61d8c5..5dd0dbdaa9d 100644 --- a/code/modules/mob/living/simple_animal/hostile/headcrab.dm +++ b/code/modules/mob/living/simple_animal/hostile/headcrab.dm @@ -25,7 +25,7 @@ var/list/human_overlays = list() /mob/living/simple_animal/hostile/headcrab/Life(seconds, times_fired) - if(..()) + if(..() && src.stat != DEAD) if(!is_zombie && isturf(src.loc)) for(var/mob/living/carbon/human/H in oview(src, 1)) //Only for corpse right next to/on same tile if(H.stat == DEAD || (!H.check_death_method() && H.health <= HEALTH_THRESHOLD_DEAD)) @@ -35,7 +35,7 @@ if(cycles >= 4) for(var/mob/living/simple_animal/K in oview(src, 1)) //Only for corpse right next to/on same tile if(K.stat == DEAD || (!K.check_death_method() && K.health <= HEALTH_THRESHOLD_DEAD)) - visible_message("[src] consumes [target] whole!") + visible_message("[src] consumes [K.name] whole!") if(health < maxHealth) health += 10 qdel(K) From c1cfa53c0a880a33577f0904a8f19a4090fac4bf Mon Sep 17 00:00:00 2001 From: denghis1 <63977635+denghis1@users.noreply.github.com> Date: Tue, 30 Jun 2020 22:28:50 +0200 Subject: [PATCH 11/20] Changes the syntax as requested by farie82 Good to have the code following proper standards --- code/modules/mob/living/simple_animal/hostile/headcrab.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/simple_animal/hostile/headcrab.dm b/code/modules/mob/living/simple_animal/hostile/headcrab.dm index 5dd0dbdaa9d..08eb7128055 100644 --- a/code/modules/mob/living/simple_animal/hostile/headcrab.dm +++ b/code/modules/mob/living/simple_animal/hostile/headcrab.dm @@ -25,7 +25,7 @@ var/list/human_overlays = list() /mob/living/simple_animal/hostile/headcrab/Life(seconds, times_fired) - if(..() && src.stat != DEAD) + if(..() && !stat) if(!is_zombie && isturf(src.loc)) for(var/mob/living/carbon/human/H in oview(src, 1)) //Only for corpse right next to/on same tile if(H.stat == DEAD || (!H.check_death_method() && H.health <= HEALTH_THRESHOLD_DEAD)) @@ -35,7 +35,7 @@ if(cycles >= 4) for(var/mob/living/simple_animal/K in oview(src, 1)) //Only for corpse right next to/on same tile if(K.stat == DEAD || (!K.check_death_method() && K.health <= HEALTH_THRESHOLD_DEAD)) - visible_message("[src] consumes [K.name] whole!") + visible_message("[src] consumes [K] whole!") if(health < maxHealth) health += 10 qdel(K) From bb45cd30b72ff6c099dc57af15c1d6963b5ddc0e Mon Sep 17 00:00:00 2001 From: Kyep Date: Tue, 30 Jun 2020 15:20:16 -0700 Subject: [PATCH 12/20] Fixes #13734 - generalist borg zipties --- code/modules/mob/living/silicon/robot/robot_modules.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index c6dac721d27..8e8c67693c5 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -121,7 +121,7 @@ // if station is fine, assist with constructing station goal room, cleaning, and repairing cables chewed by rats // if medical crisis, assist by providing basic healthcare, retrieving corpses, and monitoring crew lifesigns // if eng crisis, assist by helping repair hull breaches - // if sec crisis, assist by opening doors for sec and providing a backup stunbaton on patrols + // if sec crisis, assist by opening doors for sec and providing backup zipties on patrols name = "generalist robot module" module_type = "Standard" subsystems = list(/mob/living/silicon/proc/subsystem_power_monitor, /mob/living/silicon/proc/subsystem_crew_monitor) @@ -135,7 +135,7 @@ /obj/item/robot_module/standard/New() ..() // sec - modules += new /obj/item/restraints/handcuffs/cable/zipties(src) + modules += new /obj/item/restraints/handcuffs/cable/zipties/cyborg(src) // janitorial modules += new /obj/item/soap/nanotrasen(src) modules += new /obj/item/lightreplacer/cyborg(src) From c69574b039340f3e8941c7541a3cb89caec6e555 Mon Sep 17 00:00:00 2001 From: Aidenzack1 Date: Tue, 30 Jun 2020 15:37:35 -0700 Subject: [PATCH 13/20] AFK grammer fix Fixes the grammer of the AFK warning message from "You are have been despawned after being AFK" to "You have been despawned after being AFK" --- code/controllers/subsystem/afk.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/controllers/subsystem/afk.dm b/code/controllers/subsystem/afk.dm index 037b9a2bd0a..951a7fb1786 100644 --- a/code/controllers/subsystem/afk.dm +++ b/code/controllers/subsystem/afk.dm @@ -49,7 +49,7 @@ SUBSYSTEM_DEF(afk) if(mins_afk >= config.auto_cryo_afk && A.can_get_auto_cryod) if(A.fast_despawn) toRemove += H.ckey - warn(H, "You are have been despawned after being AFK for [mins_afk] minutes. You have been despawned instantly due to you being in a secure area.") + warn(H, "You have been despawned after being AFK for [mins_afk] minutes. You have been despawned instantly due to you being in a secure area.") log_afk_action(H, mins_afk, T, "despawned", "AFK in a fast despawn area") force_cryo_human(H) else @@ -67,7 +67,7 @@ SUBSYSTEM_DEF(afk) else if(afk_players[H.ckey] != AFK_ADMINS_WARNED && mins_afk >= config.auto_despawn_afk) log_afk_action(H, mins_afk, T, "despawned") - warn(H, "You are have been despawned after being AFK for [mins_afk] minutes.") + warn(H, "You have been despawned after being AFK for [mins_afk] minutes.") toRemove += H.ckey force_cryo_human(H) From a3baf26aadd045c08798aaa799610ec546202cd3 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Tue, 30 Jun 2020 19:42:35 -0400 Subject: [PATCH 14/20] Makes Blood GC (#13723) --- .../mob/living/simple_animal/bot/bot.dm | 32 ++++++++++++------- .../mob/living/simple_animal/bot/cleanbot.dm | 4 +-- .../mob/living/simple_animal/bot/floorbot.dm | 4 +-- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 5c5300a2579..cb45fd98e8b 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -63,6 +63,7 @@ var/new_destination // pending new destination (waiting for beacon response) var/destination // destination description tag var/next_destination // the next destination in the patrol route + var/ignorelistcleanuptimer = 1 // This ticks up every automated action, at 300 we clean the ignore list var/robot_arm = /obj/item/robot_parts/r_arm var/blockcount = 0 //number of times retried a blocked path @@ -254,6 +255,15 @@ /mob/living/simple_animal/bot/handle_automated_action() diag_hud_set_botmode() + if(ignorelistcleanuptimer % 300 == 0) // Every 300 actions, clean up the ignore list from old junk + for(var/uid in ignore_list) + var/atom/referredatom = locateUID(uid) + if(!referredatom || QDELETED(referredatom)) + ignore_list -= uid + ignorelistcleanuptimer = 1 + else + ignorelistcleanuptimer++ + if(!on) return @@ -439,14 +449,15 @@ Example usage: patient = scan(/mob/living/carbon/human, oldpatient, 1) The proc would return a human next to the bot to be set to the patient var. Pass the desired type path itself, declaring a temporary var beforehand is not required. */ -/mob/living/simple_animal/bot/proc/scan(scan_type, old_target, scan_range = DEFAULT_SCAN_RANGE) +/mob/living/simple_animal/bot/proc/scan(atom/scan_type, atom/old_target, scan_range = DEFAULT_SCAN_RANGE) var/final_result for(var/scan in shuffle(view(scan_range, src))) //Search for something in range! - if(!istype(scan, scan_type)) //Check that the thing we found is the type we want! + var/atom/A = scan + if(!istype(A, scan_type)) //Check that the thing we found is the type we want! continue //If not, keep searching! - if( (scan in ignore_list) || (scan == old_target) ) //Filter for blacklisted elements, usually unreachable or previously processed oness + if((A.UID() in ignore_list) || (A == old_target) ) //Filter for blacklisted elements, usually unreachable or previously processed oness continue - var/scan_result = process_scan(scan) //Some bots may require additional processing when a result is selected. + var/scan_result = process_scan(A) //Some bots may require additional processing when a result is selected. if(scan_result) final_result = scan_result else @@ -454,17 +465,16 @@ Pass the desired type path itself, declaring a temporary var beforehand is not r return final_result //When the scan finds a target, run bot specific processing to select it for the next step. Empty by default. -/mob/living/simple_animal/bot/proc/process_scan(scan_target) +/mob/living/simple_animal/bot/proc/process_scan(atom/scan_target) return scan_target -/mob/living/simple_animal/bot/proc/add_to_ignore(subject) +/mob/living/simple_animal/bot/proc/add_to_ignore(atom/A) if(ignore_list.len < 50) //This will help keep track of them, so the bot is always trying to reach a blocked spot. - ignore_list |= subject - else if(ignore_list.len >= subject) //If the list is full, insert newest, delete oldest. - ignore_list -= ignore_list[1] - ignore_list |= subject - + ignore_list |= A.UID() + else //If the list is full, insert newest, delete oldest. + ignore_list.Cut(1, 2) + ignore_list |= A.UID() /* Movement proc for stepping a bot through a path generated through A-star. Pass a positive integer as an argument to override a bot's default speed. diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index f9747238138..4cb4a532d6b 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -50,7 +50,7 @@ /mob/living/simple_animal/bot/cleanbot/bot_reset() ..() - ignore_list = list() //Allows the bot to clean targets it previously ignored due to being unreachable. + ignore_list.Cut() //Allows the bot to clean targets it previously ignored due to being unreachable. target = null oldloc = null @@ -106,7 +106,7 @@ audible_message("[src] makes an excited beeping booping sound!") if(!target) //Search for cleanables it can see. - target = scan(/obj/effect/decal/cleanable/) + target = scan(/obj/effect/decal/cleanable) if(!target && auto_patrol) //Search for cleanables it can see. if(mode == BOT_IDLE || mode == BOT_START_PATROL) diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index 5b0ea28a72a..df96cae3b6b 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -56,7 +56,7 @@ ..() target = null oldloc = null - ignore_list = list() + ignore_list.Cut() nagged = 0 anchored = FALSE update_icon() @@ -270,7 +270,7 @@ return 1 //Floorbots, having several functions, need sort out special conditions here. -/mob/living/simple_animal/bot/floorbot/process_scan(scan_target) +/mob/living/simple_animal/bot/floorbot/process_scan(atom/scan_target) var/result var/turf/simulated/floor/F switch(process_type) From 641654b75f3946bab39c99fc0755dc7fd9fb17da Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Tue, 30 Jun 2020 19:43:01 -0400 Subject: [PATCH 15/20] Attempts to Soft Delete Mobs (#13717) --- code/modules/mob/mob.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index c8a02807e1a..02d6420dfe5 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -20,8 +20,7 @@ AA.viewers -= src viewing_alternate_appearances = null logs.Cut() - ..() - return QDEL_HINT_HARDDEL + return ..() /mob/Initialize() GLOB.mob_list += src From 0dea89602334334be2c3dfe6046bf2909ff54e14 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Tue, 30 Jun 2020 19:47:09 -0400 Subject: [PATCH 16/20] Minor Turf Refactor (#13690) * Turf GC * might as well do this * additions * Bay being bay --- code/LINDA/LINDA_fire.dm | 2 +- code/LINDA/LINDA_turf_tile.dm | 2 +- code/game/machinery/alarm.dm | 18 ++--- code/game/mecha/mech_bay.dm | 4 +- .../objects/effects/spawners/vaultspawner.dm | 3 +- code/game/turfs/simulated.dm | 6 -- code/game/turfs/simulated/floor.dm | 4 +- .../game/turfs/simulated/floor/fancy_floor.dm | 29 ++++---- code/game/turfs/simulated/floor/lava.dm | 3 - .../game/turfs/simulated/floor/light_floor.dm | 4 +- code/game/turfs/simulated/floor/mineral.dm | 32 ++++----- code/game/turfs/simulated/floor/misc_floor.dm | 20 ++---- .../turfs/simulated/floor/plasteel_floor.dm | 8 +-- code/game/turfs/simulated/floor/plating.dm | 32 ++++----- code/game/turfs/simulated/walls_misc.dm | 9 +-- code/game/turfs/space/space.dm | 11 ++- code/game/turfs/space/transit.dm | 4 +- code/game/turfs/turf.dm | 69 ++++++++++++------- code/game/turfs/unsimulated.dm | 4 +- code/game/turfs/unsimulated/beach.dm | 18 ++--- code/game/turfs/unsimulated/floor.dm | 8 +-- 21 files changed, 144 insertions(+), 146 deletions(-) diff --git a/code/LINDA/LINDA_fire.dm b/code/LINDA/LINDA_fire.dm index 6ec505d9f9a..30c56f93cc8 100644 --- a/code/LINDA/LINDA_fire.dm +++ b/code/LINDA/LINDA_fire.dm @@ -176,7 +176,7 @@ if(istype(loc, /turf/simulated)) var/turf/simulated/T = loc - if(T.to_be_destroyed) + if(T.to_be_destroyed && !T.changing_turf) var/chance_of_deletion if(T.heat_capacity) //beware of division by zero chance_of_deletion = T.max_fire_temperature_sustained / T.heat_capacity * 8 //there is no problem with prob(23456), min() was redundant --rastaf0 diff --git a/code/LINDA/LINDA_turf_tile.dm b/code/LINDA/LINDA_turf_tile.dm index c39226f37e6..acfa1983f72 100644 --- a/code/LINDA/LINDA_turf_tile.dm +++ b/code/LINDA/LINDA_turf_tile.dm @@ -74,8 +74,8 @@ air.temperature = temperature /turf/simulated/Destroy() - visibilityChanged() QDEL_NULL(active_hotspot) + QDEL_NULL(wet_overlay) return ..() /turf/simulated/assume_air(datum/gas_mixture/giver) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 6174f4a497d..9fda2cfe45c 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -322,16 +322,18 @@ apply_mode() -/obj/machinery/alarm/proc/handle_heating_cooling(var/datum/gas_mixture/environment, var/datum/tlv/cur_tlv, var/turf/simulated/location) +/obj/machinery/alarm/proc/handle_heating_cooling(datum/gas_mixture/environment, datum/tlv/cur_tlv, turf/simulated/location) cur_tlv = TLV["temperature"] //Handle temperature adjustment here. if(environment.temperature < target_temperature - 2 || environment.temperature > target_temperature + 2 || regulating_temperature) //If it goes too far, we should adjust ourselves back before stopping. if(!cur_tlv.get_danger_level(target_temperature)) + var/datum/gas_mixture/gas = location.remove_air(0.25 * environment.total_moles()) + if(!gas) + return if(!regulating_temperature) regulating_temperature = 1 - visible_message("\The [src] clicks as it starts [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\ - "You hear a click and a faint electronic hum.") + visible_message("\The [src] clicks as it starts [environment.temperature > target_temperature ? "cooling" : "heating"] the room.", "You hear a click and a faint electronic hum.") if(target_temperature > MAX_TEMPERATURE) target_temperature = MAX_TEMPERATURE @@ -339,9 +341,8 @@ if(target_temperature < MIN_TEMPERATURE) target_temperature = MIN_TEMPERATURE - var/datum/gas_mixture/gas = location.remove_air(0.25*environment.total_moles()) var/heat_capacity = gas.heat_capacity() - var/energy_used = max( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE) + var/energy_used = max(abs(heat_capacity * (gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE) //Use power. Assuming that each power unit represents 1000 watts.... use_power(energy_used/1000, ENVIRON) @@ -349,16 +350,15 @@ //We need to cool ourselves. if(heat_capacity) if(environment.temperature > target_temperature) - gas.temperature -= energy_used/heat_capacity + gas.temperature -= energy_used / heat_capacity else - gas.temperature += energy_used/heat_capacity + gas.temperature += energy_used / heat_capacity environment.merge(gas) if(abs(environment.temperature - target_temperature) <= 0.5) regulating_temperature = 0 - visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\ - "You hear a click as a faint electronic humming stops.") + visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.", "You hear a click as a faint electronic humming stops.") /obj/machinery/alarm/update_icon() if(wiresexposed) diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm index 04322c63093..896ce886887 100644 --- a/code/game/mecha/mech_bay.dm +++ b/code/game/mecha/mech_bay.dm @@ -5,8 +5,8 @@ /turf/simulated/floor/mech_bay_recharge_floor/airless icon_state = "recharge_floor_asteroid" - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB /obj/machinery/mech_bay_recharge_port diff --git a/code/game/objects/effects/spawners/vaultspawner.dm b/code/game/objects/effects/spawners/vaultspawner.dm index 0d882cc9bd2..a78c6111eb7 100644 --- a/code/game/objects/effects/spawners/vaultspawner.dm +++ b/code/game/objects/effects/spawners/vaultspawner.dm @@ -21,6 +21,7 @@ if(i == lowBoundX || i == hiBoundX || j == lowBoundY || j == hiBoundY) new /turf/simulated/wall/vault(locate(i,j,z),type) else - new /turf/simulated/floor/vault(locate(i,j,z),type) + var/turf/T = new /turf/simulated/floor/vault(locate(i, j, z)) + T.icon_state = "[type]vault" qdel(src) diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 19717991593..6bc1c4ba142 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -8,12 +8,6 @@ nitrogen = MOLES_N2STANDARD var/to_be_destroyed = 0 //Used for fire, if a melting temperature was reached, it will be destroyed var/max_fire_temperature_sustained = 0 //The max temperature of the fire which it was subjected to - var/dirtoverlay = null - -/turf/simulated/New() - ..() - levelupdate() - visibilityChanged() /turf/simulated/proc/break_tile() return diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 55b4f336917..614b8232b0b 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -31,8 +31,8 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama var/list/burnt_states = list("floorscorched1", "floorscorched2") var/list/prying_tool_list = list(TOOL_CROWBAR) //What tool/s can we use to pry up the tile? -/turf/simulated/floor/New() - ..() +/turf/simulated/floor/Initialize(mapload) + . = ..() if(icon_state in GLOB.icons_to_ignore_at_floor_init) //so damaged/burned tiles or plating icons aren't saved as the default icon_regular_floor = "floor" else diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm index f8dc414ef85..bfbfa70331e 100644 --- a/code/game/turfs/simulated/floor/fancy_floor.dm +++ b/code/game/turfs/simulated/floor/fancy_floor.dm @@ -49,9 +49,9 @@ floor_tile = /obj/item/stack/tile/grass broken_states = list("sand") -/turf/simulated/floor/grass/Initialize() +/turf/simulated/floor/grass/Initialize(mapload) + . = ..() update_icon() - ..() /turf/simulated/floor/grass/update_icon() icon_state = "grass[pick("1","2","3","4")]" @@ -80,10 +80,9 @@ ) -/turf/simulated/floor/carpet/New() - ..() - if(broken || burnt) - make_plating() +/turf/simulated/floor/carpet/Initialize(mapload) + . = ..() + update_icon() /turf/simulated/floor/carpet/update_icon() if(!..()) @@ -119,18 +118,18 @@ broken_states = list("damaged") plane = PLANE_SPACE -/turf/simulated/floor/fakespace/New() - ..() - icon_state = "[rand(0,25)]" - -/turf/simulated/floor/carpet/arcade - icon = 'icons/goonstation/turf/floor.dmi' - icon_state = "arcade" - floor_tile = /obj/item/stack/tile/arcade_carpet - smooth = SMOOTH_FALSE +/turf/simulated/floor/fakespace/Initialize(mapload) + . = ..() + icon_state = SPACE_ICON_STATE /turf/simulated/floor/fakespace/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir) underlay_appearance.icon = 'icons/turf/space.dmi' underlay_appearance.icon_state = SPACE_ICON_STATE underlay_appearance.plane = PLANE_SPACE return TRUE + +/turf/simulated/floor/carpet/arcade + icon = 'icons/goonstation/turf/floor.dmi' + icon_state = "arcade" + floor_tile = /obj/item/stack/tile/arcade_carpet + smooth = SMOOTH_FALSE diff --git a/code/game/turfs/simulated/floor/lava.dm b/code/game/turfs/simulated/floor/lava.dm index b32580b9bab..14a08639132 100644 --- a/code/game/turfs/simulated/floor/lava.dm +++ b/code/game/turfs/simulated/floor/lava.dm @@ -8,9 +8,6 @@ light_power = 0.75 light_color = LIGHT_COLOR_LAVA -/turf/simulated/floor/plating/lava/New() - ..() - /turf/simulated/floor/plating/lava/ex_act() return diff --git a/code/game/turfs/simulated/floor/light_floor.dm b/code/game/turfs/simulated/floor/light_floor.dm index 2c24a422343..8276c0de33f 100644 --- a/code/game/turfs/simulated/floor/light_floor.dm +++ b/code/game/turfs/simulated/floor/light_floor.dm @@ -20,8 +20,8 @@ var/state = LIGHTFLOOR_ON var/can_modify_colour = TRUE -/turf/simulated/floor/light/New() - ..() +/turf/simulated/floor/light/Initialize(mapload) + . = ..() update_icon() /turf/simulated/floor/light/update_icon() diff --git a/code/game/turfs/simulated/floor/mineral.dm b/code/game/turfs/simulated/floor/mineral.dm index ffb1cce0b5c..dd975dc80d9 100644 --- a/code/game/turfs/simulated/floor/mineral.dm +++ b/code/game/turfs/simulated/floor/mineral.dm @@ -14,8 +14,8 @@ icon_state = "" var/list/icons = list() -/turf/simulated/floor/mineral/New() - ..() +/turf/simulated/floor/mineral/Initialize(mapload) + . = ..() broken_states = list("[initial(icon_state)]_dam") /turf/simulated/floor/mineral/update_icon() @@ -97,24 +97,24 @@ broken_states = list("titanium_dam1","titanium_dam2","titanium_dam3","titanium_dam4","titanium_dam5") /turf/simulated/floor/mineral/titanium/airless - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB /turf/simulated/floor/mineral/titanium/blue icon_state = "titanium_blue" /turf/simulated/floor/mineral/titanium/blue/airless - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB /turf/simulated/floor/mineral/titanium/yellow icon_state = "titanium_yellow" /turf/simulated/floor/mineral/titanium/yellow/airless - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB /turf/simulated/floor/mineral/titanium/purple @@ -122,8 +122,8 @@ floor_tile = /obj/item/stack/tile/mineral/titanium/purple /turf/simulated/floor/mineral/titanium/purple/airless - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB //PLASTITANIUM (syndieshuttle) @@ -137,8 +137,8 @@ icon_state = "plastitanium_red" /turf/simulated/floor/mineral/plastitanium/red/airless - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB /turf/simulated/floor/mineral/plastitanium/red/brig @@ -179,8 +179,8 @@ spam_flag = world.time + 10 /turf/simulated/floor/mineral/bananium/airless - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB @@ -254,8 +254,8 @@ floor_tile = /obj/item/stack/tile/mineral/abductor icons = list("alienpod1", "alienpod2", "alienpod3", "alienpod4", "alienpod5", "alienpod6", "alienpod7", "alienpod8", "alienpod9") -/turf/simulated/floor/mineral/abductor/New() - ..() +/turf/simulated/floor/mineral/abductor/Initialize(mapload) + . = ..() icon_state = "alienpod[rand(1,9)]" /turf/simulated/floor/mineral/abductor/break_tile() diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm index 95d5f816aa4..83835cd947f 100644 --- a/code/game/turfs/simulated/floor/misc_floor.dm +++ b/code/game/turfs/simulated/floor/misc_floor.dm @@ -3,19 +3,11 @@ icon_state = "rockvault" smooth = SMOOTH_FALSE -/turf/simulated/floor/vault/New(location, vtype) - ..() - icon_state = "[vtype]vault" - /turf/simulated/wall/vault icon = 'icons/turf/walls.dmi' icon_state = "rockvault" smooth = SMOOTH_FALSE -/turf/simulated/wall/vault/New(location, vtype) - ..() - icon_state = "[vtype]vault" - /turf/simulated/floor/bluegrid icon = 'icons/turf/floors.dmi' icon_state = "bcircuit" @@ -35,12 +27,12 @@ /turf/simulated/floor/greengrid/airless icon_state = "gcircuit" name = "airless floor" - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB -/turf/simulated/floor/greengrid/airless/New() - ..() +/turf/simulated/floor/greengrid/airless/Initialize(mapload) + . = ..() name = "floor" /turf/simulated/floor/redgrid @@ -78,8 +70,8 @@ mouse_opacity = MOUSE_OPACITY_TRANSPARENT var/obj/machinery/poolcontroller/linkedcontroller = null -/turf/simulated/floor/beach/water/New() - ..() +/turf/simulated/floor/beach/water/Initialize(mapload) + . = ..() var/image/overlay_image = image('icons/misc/beach.dmi', icon_state = "water5", layer = ABOVE_MOB_LAYER) overlay_image.plane = GAME_PLANE overlays += overlay_image diff --git a/code/game/turfs/simulated/floor/plasteel_floor.dm b/code/game/turfs/simulated/floor/plasteel_floor.dm index ee19b4eeeb5..116d57dc1ef 100644 --- a/code/game/turfs/simulated/floor/plasteel_floor.dm +++ b/code/game/turfs/simulated/floor/plasteel_floor.dm @@ -12,12 +12,12 @@ /turf/simulated/floor/plasteel/airless name = "airless floor" - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB -/turf/simulated/floor/plasteel/airless/New() - ..() +/turf/simulated/floor/plasteel/airless/Initialize(mapload) + . = ..() name = "floor" /turf/simulated/floor/plasteel/airless/indestructible // For bomb testing range diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index c692135dc44..a6dbe0de281 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -14,17 +14,17 @@ "xeno" = list('sound/effects/footstep/plating_xeno.ogg') ) -/turf/simulated/floor/plating/New() - ..() +/turf/simulated/floor/plating/Initialize(mapload) + . = ..() icon_plating = icon_state update_icon() -/turf/simulated/floor/plating/damaged/New() - ..() +/turf/simulated/floor/plating/damaged/Initialize(mapload) + . = ..() break_tile() -/turf/simulated/floor/plating/burnt/New() - ..() +/turf/simulated/floor/plating/burnt/Initialize(mapload) + . = ..() burn_tile() /turf/simulated/floor/plating/update_icon() @@ -113,12 +113,12 @@ /turf/simulated/floor/plating/airless icon_state = "plating" name = "airless plating" - oxygen = 0.01 - nitrogen = 0.01 + oxygen = 0 + nitrogen = 0 temperature = TCMB -/turf/simulated/floor/plating/airless/New() - ..() +/turf/simulated/floor/plating/airless/Initialize(mapload) + . = ..() name = "plating" /turf/simulated/floor/engine @@ -190,8 +190,8 @@ name = "engraved floor" icon_state = "cult" -/turf/simulated/floor/engine/cult/New() - ..() +/turf/simulated/floor/engine/cult/Initialize(mapload) + . = ..() if(SSticker.mode)//only do this if the round is going..otherwise..fucking asteroid.. icon_state = SSticker.cultdat.cult_floor_icon_state @@ -275,8 +275,8 @@ icon = 'icons/turf/floors/ironsand.dmi' icon_state = "ironsand1" -/turf/simulated/floor/plating/ironsand/New() - ..() +/turf/simulated/floor/plating/ironsand/Initialize(mapload) + . = ..() icon_state = "ironsand[rand(1,15)]" /turf/simulated/floor/plating/ironsand/remove_plating() @@ -359,8 +359,8 @@ name = "alien floor" icon_state = "alienpod1" -/turf/simulated/floor/plating/abductor/New() - ..() +/turf/simulated/floor/plating/abductor/Initialize(mapload) + . = ..() icon_state = "alienpod[rand(1,9)]" /turf/simulated/floor/plating/ice diff --git a/code/game/turfs/simulated/walls_misc.dm b/code/game/turfs/simulated/walls_misc.dm index f34465fd60f..56908a7ecae 100644 --- a/code/game/turfs/simulated/walls_misc.dm +++ b/code/game/turfs/simulated/walls_misc.dm @@ -9,8 +9,8 @@ sheet_amount = 1 girder_type = /obj/structure/girder/cult -/turf/simulated/wall/cult/New() - ..() +/turf/simulated/wall/cult/Initialize(mapload) + . = ..() if(SSticker.mode)//game hasn't started offically don't do shit.. new /obj/effect/temp_visual/cult/turf(src) icon_state = SSticker.cultdat.cult_wall_icon_state @@ -72,10 +72,7 @@ realappearance.linked = src /turf/simulated/wall/clockwork/Destroy() - if(realappearance) - qdel(realappearance) - realappearance = null - + QDEL_NULL(realappearance) return ..() /turf/simulated/wall/clockwork/ReplaceWithLattice() diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index f78f520cfd3..1a8ccdae550 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -21,6 +21,11 @@ /turf/space/Initialize(mapload) if(!istype(src, /turf/space/transit)) icon_state = SPACE_ICON_STATE + vis_contents.Cut() //removes inherited overlays + + if(initialized) + stack_trace("Warning: [src]([type]) initialized multiple times!") + initialized = TRUE var/area/A = loc if(!IS_DYNAMIC_LIGHTING(src) && IS_DYNAMIC_LIGHTING(A)) @@ -34,12 +39,6 @@ return INITIALIZE_HINT_NORMAL -/turf/space/Destroy(force) - if(force) - . = ..() - else - return QDEL_HINT_LETMELIVE - /turf/space/BeforeChange() ..() var/datum/space_level/S = GLOB.space_manager.get_zlev(z) diff --git a/code/game/turfs/space/transit.dm b/code/game/turfs/space/transit.dm index 2a14230d467..a96cbae1269 100644 --- a/code/game/turfs/space/transit.dm +++ b/code/game/turfs/space/transit.dm @@ -125,9 +125,9 @@ /turf/space/transit/attackby() return -/turf/space/transit/New() +/turf/space/transit/Initialize(mapload) + . = ..() update_icon() - ..() /turf/space/transit/proc/update_icon() var/p = 9 diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index d1541dcc4fa..e174634123d 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -31,21 +31,29 @@ var/image/obscured //camerachunks + var/changing_turf = FALSE + var/list/blueprint_data //for the station blueprints, images of objects eg: pipes var/list/footstep_sounds var/shoe_running_volume = 50 var/shoe_walking_volume = 20 -/turf/New() - ..() +/turf/Initialize(mapload) + if(initialized) + stack_trace("Warning: [src]([type]) initialized multiple times!") + initialized = TRUE + + // by default, vis_contents is inherited from the turf that was here before + vis_contents.Cut() + + levelupdate() + if(smooth) + queue_smooth(src) + visibilityChanged() + for(var/atom/movable/AM in src) Entered(AM) - if(smooth && SSticker && SSticker.current_state == GAME_STATE_PLAYING) - queue_smooth(src) - -/turf/Initialize(mapload) - . = ..() var/area/A = loc if(!IS_DYNAMIC_LIGHTING(src) && IS_DYNAMIC_LIGHTING(A)) @@ -54,9 +62,11 @@ if(light_power && light_range) update_light() - if (opacity) + if(opacity) has_opaque_atom = TRUE + return INITIALIZE_HINT_NORMAL + /hook/startup/proc/smooth_world() var/watch = start_watch() log_startup_progress("Smoothing atoms...") @@ -70,16 +80,29 @@ log_startup_progress(" Smoothed atoms in [stop_watch(watch)]s.") return TRUE -/turf/Destroy() -// Adds the adjacent turfs to the current atmos processing - if(SSair) - for(var/direction in GLOB.cardinal) - if(atmos_adjacent_turfs & direction) - var/turf/simulated/T = get_step(src, direction) - if(istype(T)) - SSair.add_to_active(T) +/turf/Destroy(force) + . = QDEL_HINT_IWILLGC + if(!changing_turf) + stack_trace("Incorrect turf deletion") + changing_turf = FALSE + if(force) + ..() + //this will completely wipe turf state + var/turf/B = new world.turf(src) + for(var/A in B.contents) + qdel(A) + return + // Adds the adjacent turfs to the current atmos processing + for(var/direction in GLOB.cardinal) + if(atmos_adjacent_turfs & direction) + var/turf/simulated/T = get_step(src, direction) + if(istype(T)) + SSair.add_to_active(T) + SSair.remove_from_active(src) + visibilityChanged() + QDEL_LIST(blueprint_data) + initialized = FALSE ..() - return QDEL_HINT_HARDDEL_NOW /turf/attack_hand(mob/user as mob) user.Move_Pulled(src) @@ -209,10 +232,10 @@ var/old_corners = corners BeforeChange() - if(SSair) - SSair.remove_from_active(src) var/old_baseturf = baseturf + changing_turf = TRUE + qdel(src) //Just get the side effects and call Destroy var/turf/W = new path(src) W.baseturf = old_baseturf @@ -225,7 +248,6 @@ if(SSlighting.initialized) recalc_atom_opacity() lighting_object = old_lighting_object - affecting_lights = old_affecting_lights corners = old_corners if(old_opacity != opacity || dynamic_lighting != old_dynamic_lighting) @@ -524,12 +546,9 @@ I.appearance = AM.appearance I.appearance_flags = RESET_COLOR|RESET_ALPHA|RESET_TRANSFORM I.loc = src - I.dir = AM.dir + I.setDir(AM.dir) I.alpha = 128 - - if(!blueprint_data) - blueprint_data = list() - blueprint_data += I + LAZYADD(blueprint_data, I) /turf/proc/add_blueprints_preround(atom/movable/AM) if(!SSticker || SSticker.current_state != GAME_STATE_PLAYING) diff --git a/code/game/turfs/unsimulated.dm b/code/game/turfs/unsimulated.dm index 688dc778ce3..02af9173e2b 100644 --- a/code/game/turfs/unsimulated.dm +++ b/code/game/turfs/unsimulated.dm @@ -40,6 +40,6 @@ nitrogen = 0 temperature = TCMB -/turf/unsimulated/floor/plating/airless/New() - ..() +/turf/unsimulated/floor/plating/airless/Initialize(mapload) + . = ..() name = "plating" diff --git a/code/game/turfs/unsimulated/beach.dm b/code/game/turfs/unsimulated/beach.dm index f6a3a62c324..a7c73971e99 100644 --- a/code/game/turfs/unsimulated/beach.dm +++ b/code/game/turfs/unsimulated/beach.dm @@ -3,9 +3,9 @@ icon = 'icons/misc/beach.dmi' var/water_overlay_image = null mouse_opacity = MOUSE_OPACITY_TRANSPARENT - -/turf/unsimulated/beach/New() - ..() + +/turf/unsimulated/beach/Initialize(mapload) + . = ..() if(water_overlay_image) var/image/overlay_image = image('icons/misc/beach.dmi', icon_state = water_overlay_image, layer = ABOVE_MOB_LAYER) overlay_image.plane = GAME_PLANE @@ -15,10 +15,10 @@ name = "Sand" icon_state = "desert" mouse_opacity = MOUSE_OPACITY_ICON - -/turf/unsimulated/beach/sand/New() //adds some aesthetic randomness to the beach sand + +/turf/unsimulated/beach/sand/Initialize(mapload) + . = ..() //adds some aesthetic randomness to the beach sand icon_state = pick("desert", "desert0", "desert1", "desert2", "desert3", "desert4") - ..() /turf/unsimulated/beach/sand/dense //for boundary "walls" density = 1 @@ -42,7 +42,7 @@ /turf/unsimulated/beach/water/Entered(atom/movable/AM, atom/OldLoc) . = ..() if(!linkedcontroller) - return + return if(ismob(AM)) linkedcontroller.mobinpool += AM @@ -79,8 +79,8 @@ /turf/unsimulated/beach/water/edge_drop) var/obj/effect/beach_drop_overlay/water_overlay -/turf/unsimulated/beach/water/drop/New() - ..() +/turf/unsimulated/beach/water/drop/Initialize(mapload) + . = ..() water_overlay = new(src) /turf/unsimulated/beach/water/drop/Destroy() diff --git a/code/game/turfs/unsimulated/floor.dm b/code/game/turfs/unsimulated/floor.dm index 28f4e359223..750ebe015ae 100644 --- a/code/game/turfs/unsimulated/floor.dm +++ b/code/game/turfs/unsimulated/floor.dm @@ -7,8 +7,8 @@ name = "grass patch" icon_state = "grass1" -/turf/unsimulated/floor/grass/New() - ..() +/turf/unsimulated/floor/grass/Initialize(mapload) + . = ..() icon_state = "grass[rand(1,4)]" /turf/unsimulated/floor/snow @@ -20,8 +20,8 @@ name = "alien floor" icon_state = "alienpod1" -/turf/unsimulated/floor/abductor/New() - ..() +/turf/unsimulated/floor/abductor/Initialize(mapload) + . = ..() icon_state = "alienpod[rand(1,9)]" /turf/unsimulated/floor/vox From e438ff4d36aaa39f8ea9e5c66bc63cea597181d9 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Tue, 30 Jun 2020 19:52:28 -0400 Subject: [PATCH 17/20] Makes Mobs Lazier and Removes Hard References (#13693) * Makes Mobs Lazier and Removes Hard References * fluff --- code/_onclick/item_attack.dm | 4 +- code/datums/mind.dm | 1 - code/datums/spells/summonitem.dm | 2 - code/defines/procs/statistics.dm | 10 ++- .../miniantags/abduction/abduction_gear.dm | 4 +- code/game/gamemodes/objective.dm | 16 +--- code/game/mecha/equipment/weapons/weapons.dm | 4 - .../objects/items/weapons/dna_injector.dm | 4 - code/game/objects/items/weapons/stunbaton.dm | 4 +- code/modules/admin/verbs/onlyoneteam.dm | 9 ++- .../kitchen_machinery/gibber.dm | 5 -- .../carbon/alien/humanoid/alien_powers.dm | 11 +-- code/modules/mob/living/carbon/carbon.dm | 75 ++++++++---------- .../mob/living/carbon/carbon_defines.dm | 5 +- code/modules/mob/living/carbon/human/death.dm | 10 +-- .../mob/living/carbon/human/human_defense.dm | 5 -- .../mob/living/carbon/human/human_defines.dm | 1 - .../living/carbon/human/species/_species.dm | 18 +---- code/modules/mob/living/carbon/life.dm | 15 ++-- code/modules/mob/living/life.dm | 6 -- code/modules/mob/living/living.dm | 3 - .../living/simple_animal/hostile/headslug.dm | 2 +- code/modules/mob/mob.dm | 1 + code/modules/mob/mob_defines.dm | 35 ++++---- code/modules/mob/mob_grab.dm | 2 +- code/modules/projectiles/guns/dartgun.dm | 5 -- .../reagents/reagent_containers/borghydro.dm | 2 - .../reagent_containers/glass_containers.dm | 4 - .../reagents/reagent_containers/patch.dm | 2 +- code/modules/recycling/disposal.dm | 5 +- icons/effects/hit_blips.dmi | Bin 1028 -> 0 bytes 31 files changed, 99 insertions(+), 171 deletions(-) delete mode 100644 icons/effects/hit_blips.dmi diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 6f38814758a..f88244c0cd8 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -75,8 +75,8 @@ if(hitsound) playsound(loc, hitsound, get_clamped_volume(), 1, -1) - user.lastattacked = M - M.lastattacker = user + M.lastattacker = user.real_name + M.lastattackerckey = user.ckey user.do_attack_animation(M) . = M.attacked_by(src, user, def_zone) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 7d3a73abf24..dadc8bc6e31 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -39,7 +39,6 @@ var/role_alt_title var/datum/job/assigned_job - var/list/kills = list() var/list/datum/objective/objectives = list() var/list/datum/objective/special_verbs = list() var/list/targets = list() diff --git a/code/datums/spells/summonitem.dm b/code/datums/spells/summonitem.dm index 2a8e1d94526..a0c41b57001 100644 --- a/code/datums/spells/summonitem.dm +++ b/code/datums/spells/summonitem.dm @@ -75,8 +75,6 @@ B.transfer_identity(C) C.death() add_attack_logs(target, C, "Magically debrained INTENT: [uppertext(target.a_intent)]")*/ - if(C.stomach_contents && (item_to_retrieve in C.stomach_contents)) - C.stomach_contents -= item_to_retrieve for(var/X in C.bodyparts) var/obj/item/organ/external/part = X if(item_to_retrieve in part.embedded_objects) diff --git a/code/defines/procs/statistics.dm b/code/defines/procs/statistics.dm index 094e4f9ca2b..8f3eeeaa6fa 100644 --- a/code/defines/procs/statistics.dm +++ b/code/defines/procs/statistics.dm @@ -29,8 +29,9 @@ var/laname var/lakey if(H.lastattacker) - laname = sanitizeSQL(H.lastattacker:real_name) - lakey = sanitizeSQL(H.lastattacker:key) + laname = sanitizeSQL(H.lastattacker) + if(H.lastattackerckey) + lakey = sanitizeSQL(H.lastattackerckey) var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss") var/coord = "[H.x], [H.y], [H.z]" // to_chat(world, "INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.bruteloss], [H.getFireLoss()], [H.getBrainLoss()], [H.getOxyLoss()])") @@ -64,8 +65,9 @@ var/laname var/lakey if(H.lastattacker) - laname = sanitizeSQL(H.lastattacker:real_name) - lakey = sanitizeSQL(H.lastattacker:key) + laname = sanitizeSQL(H.lastattacker) + if(H.lastattackerckey) + lakey = sanitizeSQL(H.lastattackerckey) var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss") var/coord = "[H.x], [H.y], [H.z]" // to_chat(world, "INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.bruteloss], [H.getFireLoss()], [H.brainloss], [H.getOxyLoss()])") diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index c7ca587b34f..a0519fcbe56 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -480,8 +480,8 @@ Congratulations! You are now trained for invasive xenobiology research!"} H.update_inv_r_hand() /obj/item/abductor_baton/proc/StunAttack(mob/living/L,mob/living/user) - user.lastattacked = L - L.lastattacker = user + L.lastattacker = user.real_name + L.lastattackerckey = user.ckey L.Stun(7) L.Weaken(7) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 0da5d8a3a0a..c6f6218e969 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -573,9 +573,10 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective) // /vg/; Vox Inviolate for humans :V /datum/objective/minimize_casualties explanation_text = "Minimise casualties." + /datum/objective/minimize_casualties/check_completion() - if(owner.kills.len>5) return 0 - return 1 + return TRUE + //Vox heist objectives. @@ -781,16 +782,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective) explanation_text = "Follow the Inviolate. Minimise death and loss of resources." /datum/objective/heist/inviolate_death/check_completion() - var/vox_allowed_kills = 3 // The number of people the vox can accidently kill. Mostly a counter to people killing themselves if a raider touches them to force fail. - var/vox_total_kills = 0 - - var/datum/game_mode/heist/H = SSticker.mode - for(var/datum/mind/raider in H.raiders) - vox_total_kills += raider.kills.len // Kills are listed in the mind; uses this to calculate vox kills - - if(vox_total_kills > vox_allowed_kills) return 0 - return 1 - + return TRUE // Traders // These objectives have no check_completion, they exist only to tell Sol Traders what to aim for. diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 7dac9de2b9a..9acdcba48de 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -166,10 +166,6 @@ var/mob/M = A if(istype(firer, /mob)) add_attack_logs(firer, M, "Mecha-shot with [src]") - if(!iscarbon(firer)) - M.LAssailant = null - else - M.LAssailant = firer else add_attack_logs(null, M, "Mecha-shot with [src]") if(life <= 0) diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 8f11f65fe71..45047e97156 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -147,10 +147,6 @@ to_chat(user, "You inject yourself with [src].") add_attack_logs(user, M, attack_log, ATKLOG_ALL) - if(!iscarbon(user)) - M.LAssailant = null - else - M.LAssailant = user inject(M, user) used = TRUE diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 6782057d928..a39050cba47 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -189,8 +189,8 @@ L.apply_effect(STUTTER, stunforce) if(user) - user.lastattacked = L - L.lastattacker = user + L.lastattacker = user.real_name + L.lastattackerckey = user.ckey L.visible_message("[user] has stunned [L] with [src]!", \ "[user] has stunned you with [src]!") add_attack_logs(user, L, "stunned") diff --git a/code/modules/admin/verbs/onlyoneteam.dm b/code/modules/admin/verbs/onlyoneteam.dm index 9575cc5b340..974b65e05d2 100644 --- a/code/modules/admin/verbs/onlyoneteam.dm +++ b/code/modules/admin/verbs/onlyoneteam.dm @@ -73,9 +73,11 @@ ..() if((ishuman(hit_atom))) var/mob/living/carbon/human/H = hit_atom - if(H.r_hand == src) return - if(H.l_hand == src) return - var/mob/A = H.LAssailant + if(H.r_hand == src) + return + if(H.l_hand == src) + return + var/mob/A = thrownby if((H in GLOB.team_alpha) && (A in GLOB.team_alpha)) to_chat(A, "He's on your team!") return @@ -89,4 +91,3 @@ playsound(src, 'sound/items/dodgeball.ogg', 50, 1) visible_message("[H] HAS BEEN ELIMINATED!") H.melt() - return diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index 7d17ac07720..db078675db1 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -278,11 +278,6 @@ if(!UserOverride) add_attack_logs(user, occupant, "Gibbed in [src]", !!occupant.ckey ? ATKLOG_FEW : ATKLOG_ALL) - if(!iscarbon(user)) - occupant.LAssailant = null - else - occupant.LAssailant = user - else //this looks ugly but it's better than a copy-pasted startgibbing proc override occupant.create_attack_log("Was gibbed by an autogibber (\the [src])") add_attack_logs(src, occupant, "gibbed") diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm index fec3012529e..58bdb3a9ecc 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm @@ -136,14 +136,11 @@ Doesn't work on other aliens/AI.*/ set category = "Alien" if(powerc()) - if(stomach_contents.len) + if(LAZYLEN(stomach_contents)) for(var/mob/M in src) - if(M in stomach_contents) - stomach_contents.Remove(M) - M.forceMove(loc) - //Paralyse(10) - src.visible_message("[src] hurls out the contents of [p_their()] stomach!") - return + LAZYREMOVE(stomach_contents, M) + M.forceMove(drop_location()) + visible_message("[src] hurls out the contents of [p_their()] stomach!") /mob/living/carbon/proc/getPlasma() var/obj/item/organ/internal/xenos/plasmavessel/vessel = get_int_organ(/obj/item/organ/internal/xenos/plasmavessel) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 3aef7135679..78c7d8f47d3 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -22,8 +22,7 @@ return ..() /mob/living/carbon/handle_atom_del(atom/A) - if(A in processing_patches) - processing_patches -= A + LAZYREMOVE(processing_patches, A) return ..() /mob/living/carbon/blob_act(obj/structure/blob/B) @@ -51,41 +50,40 @@ /mob/living/carbon/var/last_stomach_attack //defining this here because no one would look in carbon_defines for it -/mob/living/carbon/relaymove(var/mob/user, direction) - if(user in src.stomach_contents) - if(last_stomach_attack + STOMACH_ATTACK_DELAY > world.time) return +/mob/living/carbon/relaymove(mob/user, direction) + if(LAZYLEN(stomach_contents)) + if(user in stomach_contents) + if(last_stomach_attack + STOMACH_ATTACK_DELAY > world.time) + return - last_stomach_attack = world.time - for(var/mob/M in hearers(4, src)) - if(M.client) - M.show_message(text("You hear something rumbling inside [src]'s stomach..."), 2) - - var/obj/item/I = user.get_active_hand() - if(I && I.force) - var/d = rand(round(I.force / 4), I.force) - - if(istype(src, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = src - var/obj/item/organ/external/organ = H.get_organ("chest") - if(istype(organ)) - if(organ.receive_damage(d, 0)) - H.UpdateDamageIcon() - - H.updatehealth("stomach attack") - - else - src.take_organ_damage(d) - - for(var/mob/M in viewers(user, null)) + last_stomach_attack = world.time + for(var/mob/M in hearers(4, src)) if(M.client) - M.show_message(text("[user] attacks [src]'s stomach wall with the [I.name]!"), 2) - playsound(user.loc, 'sound/effects/attackblob.ogg', 50, 1) + M.show_message(text("You hear something rumbling inside [src]'s stomach..."), 2) - if(prob(src.getBruteLoss() - 50)) - for(var/atom/movable/A in stomach_contents) - A.forceMove(drop_location()) - stomach_contents.Remove(A) - src.gib() + var/obj/item/I = user.get_active_hand() + if(I && I.force) + var/d = rand(round(I.force / 4), I.force) + + if(istype(src, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = src + var/obj/item/organ/external/organ = H.get_organ("chest") + if(istype(organ)) + if(organ.receive_damage(d, 0)) + H.UpdateDamageIcon() + + H.updatehealth("stomach attack") + + else + take_organ_damage(d) + + for(var/mob/M in viewers(user, null)) + if(M.client) + M.show_message(text("[user] attacks [src]'s stomach wall with the [I.name]!"), 2) + playsound(user.loc, 'sound/effects/attackblob.ogg', 50, 1) + + if(prob(getBruteLoss() - 50)) + gib() #undef STOMACH_ATTACK_DELAY @@ -140,9 +138,8 @@ I.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5) for(var/mob/M in src) - if(M in src.stomach_contents) - src.stomach_contents.Remove(M) - M.forceMove(get_turf(src)) + LAZYREMOVE(stomach_contents, M) + M.forceMove(drop_location()) visible_message("[M] bursts out of [src]!") /mob/living/carbon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = FALSE, override = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE) @@ -1069,10 +1066,6 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven /mob/living/carbon/proc/forceFedAttackLog(var/obj/item/reagent_containers/food/toEat, mob/user) add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagents.log_list(toEat)]", toEat.reagents.harmless_helper() ? ATKLOG_ALMOSTALL : null) - if(!iscarbon(user)) - LAssailant = null - else - LAssailant = user /*TO DO - If/when stomach organs are introduced, override this at the human level sending the item to the stomach diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 97ecf4dd08b..667fd86204e 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -1,11 +1,10 @@ /mob/living/carbon gender = MALE pressure_resistance = 15 - var/list/stomach_contents = list() - var/list/processing_patches = list() + var/list/stomach_contents + var/list/processing_patches var/list/internal_organs = list() var/list/internal_organs_slot = list() //Same as above, but stores "slot ID" - "organ" pairs for easy access. - var/antibodies = 0 var/life_tick = 0 // The amount of life ticks that have processed on this mob. diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 6b7a0a2b15d..ef18b04f468 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -32,9 +32,8 @@ E.droplimb(DROPLIMB_SHARP) for(var/mob/M in src) - if(M in stomach_contents) - stomach_contents.Remove(M) - M.forceMove(get_turf(src)) + LAZYREMOVE(stomach_contents, M) + M.forceMove(drop_location()) visible_message("[M] bursts out of [src]!") if(!isSynthetic()) @@ -106,11 +105,6 @@ //Handle species-specific deaths. dna.species.handle_death(gibbed, src) - if(ishuman(LAssailant)) - var/mob/living/carbon/human/H=LAssailant - if(H.mind) - H.mind.kills += "[key_name(src)]" - if(SSticker && SSticker.mode) // log_world("k") sql_report_death(src) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index a849235af64..e3c7dc58a41 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -387,11 +387,6 @@ emp_act to_chat(user, "You hack off a chunk of meat from [name]") if(!meatleft) add_attack_logs(user, src, "Chopped up into meat") - if(!iscarbon(user)) - LAssailant = null - else - LAssailant = user - qdel(src) var/obj/item/organ/external/affecting = get_organ(ran_zone(user.zone_selected)) diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 60b6da987dd..3d365afa940 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -37,7 +37,6 @@ GLOBAL_DATUM_INIT(default_martial_art, /datum/martial_art, new()) var/obj/item/s_store = null var/icon/stand_icon = null - var/icon/lying_icon = null var/voice = "" //Instead of new say code calling GetVoice() over and over and over, we're just going to ask this variable, which gets updated in Life() diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 21695e25e78..2114299f939 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -352,21 +352,6 @@ if(organ.receive_damage(damage, 0, sharp, used_weapon)) H.UpdateDamageIcon() - if(H.LAssailant && ishuman(H.LAssailant)) //superheros still get the comical hit markers - var/mob/living/carbon/human/A = H.LAssailant - if(A.mind && (A.mind in (SSticker.mode.superheroes) || SSticker.mode.supervillains || SSticker.mode.greyshirts)) - var/list/attack_bubble_recipients = list() - var/mob/living/user - for(var/mob/O in viewers(user, src)) - if(O.client && O.has_vision(information_only=TRUE)) - attack_bubble_recipients.Add(O.client) - spawn(0) - var/image/dmgIcon = image('icons/effects/hit_blips.dmi', src, "dmg[rand(1,2)]",MOB_LAYER+1) - dmgIcon.pixel_x = (!H.lying) ? rand(-3,3) : rand(-11,12) - dmgIcon.pixel_y = (!H.lying) ? rand(-11,9) : rand(-10,1) - flick_overlay(dmgIcon, attack_bubble_recipients, 9) - - if(BURN) H.damageoverlaytemp = 20 damage = damage * burn_mod @@ -443,6 +428,9 @@ else target.LAssailant = user + target.lastattacker = user.real_name + target.lastattackerckey = user.ckey + var/damage = rand(user.dna.species.punchdamagelow, user.dna.species.punchdamagehigh) damage += attack.damage if(!damage) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index a2df4b30e9e..c11eaca5293 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -11,6 +11,10 @@ if(stat != DEAD) handle_organs() + //stuff in the stomach + if(LAZYLEN(stomach_contents)) + handle_stomach(times_fired) + . = ..() if(QDELETED(src)) @@ -254,14 +258,15 @@ if(times_fired % 20==2) //dry off a bit once every 20 ticks or so wetlevel = max(wetlevel - 1,0) -/mob/living/carbon/handle_stomach(times_fired) - for(var/mob/living/M in stomach_contents) +/mob/living/carbon/proc/handle_stomach(times_fired) + for(var/thing in stomach_contents) + var/mob/living/M = thing if(M.loc != src) - stomach_contents.Remove(M) + LAZYREMOVE(stomach_contents, M) continue if(stat != DEAD) if(M.stat == DEAD) - stomach_contents.Remove(M) + LAZYREMOVE(stomach_contents, M) qdel(M) continue if(times_fired % 3 == 1) @@ -476,7 +481,7 @@ P.reagents.remove_any(applied_amount * 0.5) else if(!P.reagents || P.reagents.total_volume <= 0) - processing_patches -= P + LAZYREMOVE(processing_patches, P) qdel(P) /mob/living/carbon/proc/handle_germs() diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 6d020ccdad1..3062ef461f9 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -58,9 +58,6 @@ handle_fire() - //stuff in the stomach - handle_stomach(times_fired) - update_gravity(mob_has_gravity()) if(pulling) @@ -117,9 +114,6 @@ /mob/living/proc/handle_environment(datum/gas_mixture/environment) return -/mob/living/proc/handle_stomach(times_fired) - return - /mob/living/proc/update_pulling() if(incapacitated()) stop_pulling() diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 9f768ffc76d..f3d23ca3f51 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -682,9 +682,6 @@ *///////////////////// /mob/living/proc/resist_grab() var/resisting = 0 - for(var/obj/O in requests) - qdel(O) - resisting++ for(var/X in grabbed_by) var/obj/item/grab/G = X resisting++ diff --git a/code/modules/mob/living/simple_animal/hostile/headslug.dm b/code/modules/mob/living/simple_animal/hostile/headslug.dm index 801514a3256..6800598fc7f 100644 --- a/code/modules/mob/living/simple_animal/hostile/headslug.dm +++ b/code/modules/mob/living/simple_animal/hostile/headslug.dm @@ -72,7 +72,7 @@ /obj/item/organ/internal/body_egg/changeling_egg/proc/Pop() var/mob/living/carbon/human/monkey/M = new(owner) - owner.stomach_contents += M + LAZYADD(owner.stomach_contents, M) for(var/obj/item/organ/internal/I in src) I.insert(M, 1) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 02d6420dfe5..2796a1f40c9 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -20,6 +20,7 @@ AA.viewers -= src viewing_alternate_appearances = null logs.Cut() + LAssailant = null return ..() /mob/Initialize() diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index dc77610b97e..1477be47d89 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -31,8 +31,8 @@ var/use_me = 1 //Allows all mobs to use the me verb by default, will have to manually specify they cannot var/damageoverlaytemp = 0 var/computer_id = null - var/lastattacker = null - var/lastattacked = null + var/lastattacker = null // real name of the person doing the attacking + var/lastattackerckey = null // their ckey var/list/attack_log_old = list( ) var/list/debug_log = null @@ -50,7 +50,6 @@ var/med_record = "" var/sec_record = "" var/gen_record = "" - var/bhunger = 0 //Carbon var/lying = 0 var/lying_prev = 0 var/lastpuke = 0 @@ -61,8 +60,7 @@ var/emote_type = 1 // Define emote default type, 1 for seen emotes, 2 for heard emotes var/name_archive //For admin things like possession - var/timeofdeath = 0.0//Living - + var/timeofdeath = 0 //Living var/bodytemperature = 310.055 //98.7 F var/flying = 0 @@ -71,22 +69,22 @@ var/hunger_drain = HUNGER_FACTOR // how quickly the mob gets hungry; largely utilized by species. var/overeatduration = 0 // How long this guy is overeating //Carbon - var/intent = null//Living + var/intent = null //Living var/shakecamera = 0 - var/a_intent = INTENT_HELP//Living - var/m_intent = MOVE_INTENT_RUN//Living + var/a_intent = INTENT_HELP //Living + var/m_intent = MOVE_INTENT_RUN //Living var/lastKnownIP = null /// movable atoms buckled to this mob - var/atom/movable/buckled = null//Living + var/atom/movable/buckled = null //Living /// movable atom we are buckled to var/atom/movable/buckling - var/obj/item/l_hand = null//Living - var/obj/item/r_hand = null//Living - var/obj/item/back = null//Human/Monkey - var/obj/item/tank/internal = null//Human/Monkey - var/obj/item/storage/s_active = null//Carbon - var/obj/item/clothing/mask/wear_mask = null//Carbon + var/obj/item/l_hand = null //Living + var/obj/item/r_hand = null //Living + var/obj/item/back = null //Human + var/obj/item/tank/internal = null //Human + var/obj/item/storage/s_active = null //Carbon + var/obj/item/clothing/mask/wear_mask = null //Carbon var/datum/hud/hud_used = null @@ -95,7 +93,6 @@ var/research_scanner = 0 //For research scanner equipped mobs. Enable to show research data when examining. var/list/grabbed_by = list() - var/list/requests = list() var/lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE var/list/mapobjs = list() @@ -103,9 +100,9 @@ var/emote_cd = 0 // Used to supress emote spamming. 1 if on CD, 2 if disabled by admin (manually set), else 0 - var/job = null//Living + var/job = null //Living - var/datum/dna/dna = null//Carbon + var/datum/dna/dna = null //Carbon var/radiation = 0 //Carbon var/list/mutations = list() //Carbon -- Doohl @@ -179,8 +176,6 @@ var/turf/listed_turf = null //the current turf being examined in the stat panel var/list/shouldnt_see = list() //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes - var/kills = 0 - var/stance_damage = 0 //Whether this mob's ability to stand has been affected var/list/active_genes = list() diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 640ffb09d4f..64444864804 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -408,7 +408,7 @@ add_attack_logs(attacker, affecting, "Devoured") affecting.forceMove(user) - attacker.stomach_contents.Add(affecting) + LAZYADD(attacker.stomach_contents, affecting) qdel(src) /obj/item/grab/proc/checkvalid(var/mob/attacker, var/mob/prey) //does all the checking for the attack proc to see if a mob can eat another with the grab diff --git a/code/modules/projectiles/guns/dartgun.dm b/code/modules/projectiles/guns/dartgun.dm index 0a50b844f4a..8c46e542b4a 100644 --- a/code/modules/projectiles/guns/dartgun.dm +++ b/code/modules/projectiles/guns/dartgun.dm @@ -175,11 +175,6 @@ for(var/datum/reagent/A in D.reagents.reagent_list) R += A.id + " (" R += num2text(A.volume) + ")," - if(istype(M, /mob)) - if(!iscarbon(user)) - M.LAssailant = null - else - M.LAssailant = user add_attack_logs(user, M, "Shot with dartgun containing [R]") diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 6012f480072..8338253fc6c 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -97,9 +97,7 @@ var/contained = injected.name var/trans = R.trans_to(M, amount_per_transfer_from_this) add_attack_logs(user, M, "Injected with [name] containing [contained], transfered [trans] units", injected.harmless ? ATKLOG_ALMOSTALL : null) - M.LAssailant = user to_chat(user, "[trans] units injected. [R.total_volume] units remaining.") - return /obj/item/reagent_containers/borghypo/attack_self(mob/user) playsound(loc, 'sound/effects/pop.ogg', 50, 0) //Change the mode diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm index 6f32411a261..1e42899111b 100644 --- a/code/modules/reagents/reagent_containers/glass_containers.dm +++ b/code/modules/reagents/reagent_containers/glass_containers.dm @@ -43,10 +43,6 @@ M.visible_message("[user] splashes the contents of [src] onto [M]!", \ "[user] splashes the contents of [src] onto [M]!") add_attack_logs(user, M, "Splashed with [name] containing [contained]", !!M.ckey ? null : ATKLOG_ALL) - if(!iscarbon(user)) - M.LAssailant = null - else - M.LAssailant = user reagents.reaction(M, REAGENT_TOUCH) reagents.clear_reagents() diff --git a/code/modules/reagents/reagent_containers/patch.dm b/code/modules/reagents/reagent_containers/patch.dm index 582e157004c..17112901b29 100644 --- a/code/modules/reagents/reagent_containers/patch.dm +++ b/code/modules/reagents/reagent_containers/patch.dm @@ -20,7 +20,7 @@ if(M.eat(src, user)) user.drop_item() forceMove(M) - M.processing_patches += src + LAZYADD(M.processing_patches, src) return TRUE return FALSE diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 7584a9cbfe3..13d88100042 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -207,7 +207,10 @@ else if(target != user && !user.restrained() && !user.stat && !user.IsWeakened() && !user.stunned && !user.paralysis) msg = "[user.name] stuffs [target.name] into the [src]!" to_chat(user, "You stuff [target.name] into the [src]!") - + if(!iscarbon(user)) + target.LAssailant = null + else + target.LAssailant = user add_attack_logs(user, target, "Disposal'ed", !!target.ckey ? null : ATKLOG_ALL) else return diff --git a/icons/effects/hit_blips.dmi b/icons/effects/hit_blips.dmi deleted file mode 100644 index 49bb109799b4b3f5735176d54b53b497196bb4cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1028 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGo%~c^0B`&GO$wiq3C7Jno3=9=> zg2M`mO22;zF8KKMiI%sn*10q1gExd4Tr__0Nawtd=1GR4p57f6#zDrHjlC4+JeqW5 zQiwvZrmFeffX;4X)y*p;PMAJ<VV@SoVw{tf7J$4XiGuQBHf3bcs=S$AL zD_2xBRyQnuocQ7a<2%+BD;~|e5TEhlh5yd3M>W=+>}z#?>%~ox2NX@BSJ$>&N3?yJp~oy7MYmbx%4MX>rK$~Mbj3pN{y`8zIflR+A6jc=XN|XU9fJ$ zxn__1+n+b=ON&{q{!oC!|G*zH76uju1_fYfF`|WA15gYirLa^-s(kjbj+f_Ni#CK- zCtS9e{h9OZ^}^N9uA6ecm*RMAr{`ha8ho#&!g;fo{ffT*^L!>XUEjDW?R4eNeKQ;+ zj?Y+NUL$b9-b?0dX`uRbg-d>^-DY2R%?$7TW)_(sliYOggIj9%j<0Q;J3U{XU4KY2 z>2q6Tb(KaYZ@6&X{5d>91*VUjFSp;ZOlEVaer#TO{yfV}!D)Yg&Z=YCBXjtzQ}t$^ zs~(qMTrNqNT6eEI(Q?}oM{W+Qww}nfmWD6&r5gB_F`qhmC3cFd;T1#OCWmmFbkkDx zJG-}KE0oM*EVZ=UI?Lho&MBK0WR<*d-C^Uqjq8`jFX z!?sKbhPKVZ4D&N3yWnBNz^D)vIgPPF5)oXWkd*zh-^`=7f?>CmbY1$3`b~dVGGv(F zT6b~ouJC&O;DFgzoTL_UFoRT{kYMmW-^h66%L!%$$Cl)}^9-}h)F)K+F#I`v=R@)7 nwO&^mq!R5;2O!7M* Date: Tue, 30 Jun 2020 19:58:12 -0400 Subject: [PATCH 18/20] Fixes Random Drugs failing Travis and Maint Loot (#13719) --- code/game/objects/effects/spawners/lootdrop.dm | 4 ++-- code/game/objects/items/contraband.dm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/objects/effects/spawners/lootdrop.dm b/code/game/objects/effects/spawners/lootdrop.dm index ec717b3db32..4978a4ee314 100644 --- a/code/game/objects/effects/spawners/lootdrop.dm +++ b/code/game/objects/effects/spawners/lootdrop.dm @@ -6,7 +6,7 @@ var/lootdoubles = 1 //if the same item can be spawned twice var/list/loot //a list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect) -/obj/effect/spawner/lootdrop/Initialize(mapload) +/obj/effect/spawner/lootdrop/New() ..() if(loot && loot.len) for(var/i = lootcount, i > 0, i--) @@ -17,7 +17,7 @@ if(lootspawn) new lootspawn(loc) - return INITIALIZE_HINT_QDEL + qdel(src) /obj/effect/spawner/lootdrop/armory_contraband name = "armory contraband gun spawner" diff --git a/code/game/objects/items/contraband.dm b/code/game/objects/items/contraband.dm index 77aef9bb71d..5246652aa0e 100644 --- a/code/game/objects/items/contraband.dm +++ b/code/game/objects/items/contraband.dm @@ -56,7 +56,7 @@ desc = "Huh." allow_wrap = FALSE -/obj/item/storage/pill_bottle/random_drug_bottle/New() - ..() +/obj/item/storage/pill_bottle/random_drug_bottle/Initialize(mapload) + . = ..() for(var/i in 1 to 5) new /obj/item/reagent_containers/food/pill/random_drugs(src) From 3e6ad37661fd31bbd4efc325d9b1641293b2689c Mon Sep 17 00:00:00 2001 From: Gatchapod Date: Wed, 1 Jul 2020 05:25:49 +0200 Subject: [PATCH 19/20] renaming it is a good idea, too --- code/__DEFINES/mobs.dm | 2 +- code/_onclick/observer.dm | 2 +- code/datums/diseases/critical.dm | 2 +- code/game/gamemodes/changeling/powers/tiny_prick.dm | 2 +- code/game/gamemodes/miniantags/bot_swarm/swarmer.dm | 2 +- code/game/gamemodes/wizard/artefact.dm | 2 +- code/game/jobs/job/support.dm | 4 ++-- code/game/objects/items/devices/scanners.dm | 2 +- code/game/objects/items/stacks/nanopaste.dm | 2 +- code/modules/customitems/item_defines.dm | 2 +- code/modules/mob/living/carbon/human/death.dm | 4 ++-- code/modules/mob/living/carbon/human/emote.dm | 4 ++-- code/modules/mob/living/carbon/human/examine.dm | 8 ++++---- code/modules/mob/living/carbon/human/human.dm | 4 ++-- code/modules/mob/living/carbon/human/human_defense.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 6 +++--- code/modules/mob/living/carbon/human/update_icons.dm | 2 +- code/modules/mob/living/say.dm | 2 +- code/modules/mob/living/silicon/robot/component.dm | 2 +- code/modules/projectiles/projectile/magic.dm | 2 +- code/modules/surgery/limb_reattach.dm | 2 +- code/modules/surgery/organs/blood.dm | 2 +- code/modules/surgery/organs/organ_icon.dm | 2 +- 23 files changed, 32 insertions(+), 32 deletions(-) diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index e1e15a926d6..719274857ec 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -196,7 +196,7 @@ #define isslimeperson(A) (is_species(A, /datum/species/slime)) #define isgrey(A) (is_species(A, /datum/species/grey)) #define isdiona(A) (is_species(A, /datum/species/diona)) -#define ismachine(A) (is_species(A, /datum/species/machine)) +#define ismachineperson(A) (is_species(A, /datum/species/machine)) #define isdrask(A) (is_species(A, /datum/species/drask)) #define isanimal(A) (istype((A), /mob/living/simple_animal)) diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm index 80a9651f6ea..3452400edbb 100644 --- a/code/_onclick/observer.dm +++ b/code/_onclick/observer.dm @@ -63,7 +63,7 @@ if(!istype(user)) // Make sure user is actually an observer. Revenents also use attack_ghost, but do not have the health_scan var. return if(user.client && user.health_scan) - if(issilicon(src) || ismachine(src)) + if(issilicon(src) || ismachineperson(src)) robot_healthscan(user, src) else if(ishuman(src)) healthscan(user, src, 1, TRUE) diff --git a/code/datums/diseases/critical.dm b/code/datums/diseases/critical.dm index 3afb48ce534..e8486a8f408 100644 --- a/code/datums/diseases/critical.dm +++ b/code/datums/diseases/critical.dm @@ -159,7 +159,7 @@ var/mob/living/carbon/human/H = affected_mob if(NO_HUNGER in H.dna.species.species_traits) return TRUE - if(ismachine(H)) + if(ismachineperson(H)) return TRUE return ..() diff --git a/code/game/gamemodes/changeling/powers/tiny_prick.dm b/code/game/gamemodes/changeling/powers/tiny_prick.dm index 77c041ed555..fbfb75b8b6a 100644 --- a/code/game/gamemodes/changeling/powers/tiny_prick.dm +++ b/code/game/gamemodes/changeling/powers/tiny_prick.dm @@ -36,7 +36,7 @@ to_chat(user, "We haven't prepared our sting yet!") if(!iscarbon(target)) return - if(ismachine(target)) + if(ismachineperson(target)) to_chat(user, "This won't work on synthetics.") return if(!isturf(user.loc)) diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm index 35354cf7b39..cbcc15bdc15 100644 --- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm +++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm @@ -604,7 +604,7 @@ if(!istype(L, /mob/living/simple_animal/hostile/swarmer)) playsound(loc,'sound/effects/snap.ogg',50, 1, -1) L.electrocute_act(0, src, 1, TRUE, TRUE) - if(isrobot(L) || ismachine(L)) + if(isrobot(L) || ismachineperson(L)) L.Weaken(5) qdel(src) ..() diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 205fd63d9c6..09b228bdd0c 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -470,7 +470,7 @@ GLOBAL_LIST_EMPTY(multiverse) M.equip_to_slot_or_del(sword, slot_r_hand) if("cyborg") - if(!ismachine(M)) + if(!ismachineperson(M)) for(var/obj/item/organ/O in M.bodyparts) O.robotize(make_tough = 1) M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses) diff --git a/code/game/jobs/job/support.dm b/code/game/jobs/job/support.dm index f2b8cf31671..09328865b59 100644 --- a/code/game/jobs/job/support.dm +++ b/code/game/jobs/job/support.dm @@ -282,14 +282,14 @@ if(visualsOnly) return - if(ismachine(H)) + if(ismachineperson(H)) var/obj/item/organ/internal/cyberimp/brain/clown_voice/implant = new implant.insert(H) H.dna.SetSEState(GLOB.clumsyblock, TRUE) genemutcheck(H, GLOB.clumsyblock, null, MUTCHK_FORCED) H.dna.default_blocks.Add(GLOB.clumsyblock) - if(!ismachine(H)) + if(!ismachineperson(H)) H.dna.SetSEState(GLOB.comicblock, TRUE) genemutcheck(H, GLOB.comicblock, null, MUTCHK_FORCED) H.dna.default_blocks.Add(GLOB.comicblock) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 0960679d89f..f20a2cc5875 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -141,7 +141,7 @@ REAGENT SCANNER // Used by the PDA medical scanner too /proc/healthscan(mob/user, mob/living/M, mode = 1, advanced = FALSE) - if(!ishuman(M) || ismachine(M)) + if(!ishuman(M) || ismachineperson(M)) //these sensors are designed for organic life to_chat(user, "Analyzing Results for ERROR:\n\t Overall Status: ERROR") to_chat(user, "\t Key: Suffocation/Toxin/Burns/Brute") diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index 79252b7bb98..ff469ba3c59 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -57,7 +57,7 @@ E.heal_damage(0, remheal, 0, 1) //Healing Burn remheal = nremheal user.visible_message("\The [user] applies some nanite paste at \the [M]'s [E.name] with \the [src].") - if(H.bleed_rate && ismachine(H)) + if(H.bleed_rate && ismachineperson(H)) H.bleed_rate = 0 else to_chat(user, "Nothing to fix here.") diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index f8d2029651d..1a5da52ffce 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -48,7 +48,7 @@ var/mob/living/carbon/human/target = M - if(ismachine(target)) + if(ismachineperson(target)) to_chat(user, "[target] has no skin, how do you expect to tattoo [target.p_them()]?") return diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index dd5947e4994..5a6da37c9c1 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -6,7 +6,7 @@ canmove = 0 icon = null invisibility = 101 - if(!ismachine(src)) + if(!ismachineperson(src)) animation = new(loc) animation.icon_state = "blank" animation.icon = 'icons/mob/mob.dmi' @@ -37,7 +37,7 @@ M.forceMove(get_turf(src)) visible_message("[M] bursts out of [src]!") - if(!ismachine(src)) + if(!ismachineperson(src)) flick("gibbed-h", animation) hgibs(loc, dna) else diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index fed50d442c9..10c2ac8f119 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -34,7 +34,7 @@ //Cooldown-inducing emotes if("ping", "pings", "buzz", "buzzes", "beep", "beeps", "yes", "no", "buzz2") var/found_machine_head = FALSE - if(ismachine(src)) //Only Machines can beep, ping, and buzz, yes, no, and make a silly sad trombone noise. + if(ismachineperson(src)) //Only Machines can beep, ping, and buzz, yes, no, and make a silly sad trombone noise. on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm found_machine_head = TRUE else @@ -947,7 +947,7 @@ if("Skrell") emotelist += "\nSkrell specific emotes :- warble(s)" - if(ismachine(src)) + if(ismachineperson(src)) emotelist += "\nMachine specific emotes :- beep(s)-(none)/mob, buzz(es)-none/mob, no-(none)/mob, ping(s)-(none)/mob, yes-(none)/mob, buzz2-(none)/mob" else var/obj/item/organ/external/head/H = get_organ("head") // If you have a robotic head, you can make beep-boop noises diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index c48fa8168de..31825ea3765 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -208,7 +208,7 @@ if(!E) wound_flavor_text["[organ_tag]"] = "[p_they(TRUE)] [p_are()] missing [p_their()] [organ_descriptor].\n" else - if(!ismachine(src)) + if(!ismachineperson(src)) if(E.is_robotic()) wound_flavor_text["[E.limb_name]"] = "[p_they(TRUE)] [p_have()] a robotic [E.name]!\n" @@ -252,7 +252,7 @@ var/temp = getBruteLoss() //no need to calculate each of these twice if(temp) - var/brute_message = !ismachine(src) ? "bruising" : "denting" + var/brute_message = !ismachineperson(src) ? "bruising" : "denting" if(temp < 30) msg += "[p_they(TRUE)] [p_have()] minor [brute_message ].\n" else @@ -301,13 +301,13 @@ else if(nutrition >= NUTRITION_LEVEL_FAT) msg += "[p_they(TRUE)] [p_are()] quite chubby.\n" - if(!ismachine(src) && blood_volume < BLOOD_VOLUME_SAFE) + if(!ismachineperson(src) && blood_volume < BLOOD_VOLUME_SAFE) msg += "[p_they(TRUE)] [p_have()] pale skin.\n" if(bleedsuppress) msg += "[p_they(TRUE)] [p_are()] bandaged with something.\n" else if(bleed_rate) - var/bleed_message = !ismachine(src) ? "bleeding" : "leaking" + var/bleed_message = !ismachineperson(src) ? "bleeding" : "leaking" msg += "[p_they(TRUE)] [p_are()] [bleed_message]!\n" if(reagents.has_reagent("teslium")) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 9df498328fa..517eb2f0ffe 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1701,14 +1701,14 @@ Eyes need to have significantly high darksight to shine unless the mob has the X /mob/living/carbon/human/forceFed(var/obj/item/reagent_containers/food/toEat, mob/user, fullness) if(!check_has_mouth()) - if(!((istype(toEat, /obj/item/reagent_containers/food/drinks) && (ismachine(src))))) + if(!((istype(toEat, /obj/item/reagent_containers/food/drinks) && (ismachineperson(src))))) to_chat(user, "Where do you intend to put \the [toEat]? \The [src] doesn't have a mouth!") return 0 return ..() /mob/living/carbon/human/selfDrink(var/obj/item/reagent_containers/food/drinks/toDrink) if(!check_has_mouth()) - if(!ismachine(src)) + if(!ismachineperson(src)) to_chat(src, "Where do you intend to put \the [src]? You don't have a mouth!") return 0 else diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index dc8fc2ecc59..975d8bcdd60 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -84,7 +84,7 @@ emp_act E.heal_damage(rembrute,0,0,1) rembrute = nrembrute user.visible_message("[user] patches some dents on [src]'s [E.name] with [I].") - if(bleed_rate && ismachine(src)) + if(bleed_rate && ismachineperson(src)) bleed_rate = 0 user.visible_message("[user] patches some leaks on [src] with [I].") if(IgniteMob()) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 91380e61cf4..90653a6750b 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -635,7 +635,7 @@ else overeatduration -= 2 - if(!ismachine(src) && nutrition < NUTRITION_LEVEL_HYPOGLYCEMIA) //Gosh damn snowflakey IPCs + if(!ismachineperson(src) && nutrition < NUTRITION_LEVEL_HYPOGLYCEMIA) //Gosh damn snowflakey IPCs var/datum/disease/D = new /datum/disease/critical/hypoglycemia ForceContractDisease(D) @@ -697,7 +697,7 @@ alcohol_strength /= sober_str var/obj/item/organ/internal/liver/L - if(!ismachine(src)) + if(!ismachineperson(src)) L = get_int_organ(/obj/item/organ/internal/liver) if(L) alcohol_strength *= L.alcohol_intensity @@ -719,7 +719,7 @@ AdjustConfused(3 / sober_str) if(alcohol_strength >= blur_start) //blurry eyes EyeBlurry(10 / sober_str) - if(!ismachine(src)) //stuff only for non-synthetics + if(!ismachineperson(src)) //stuff only for non-synthetics if(alcohol_strength >= vomit_start) //vomiting if(prob(8)) fakevomit() diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index fd8756a5c25..81907ba516f 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -376,7 +376,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //base icons var/icon/hair_standing = new /icon('icons/mob/human_face.dmi',"bald_s") - if(head_organ.h_style && !(head && (head.flags & BLOCKHEADHAIR) && !(ismachine(src)))) + if(head_organ.h_style && !(head && (head.flags & BLOCKHEADHAIR) && !(ismachineperson(src)))) var/datum/sprite_accessory/hair/hair_style = GLOB.hair_styles_full_list[head_organ.h_style] if(hair_style && hair_style.species_allowed) if((head_organ.dna.species.name in hair_style.species_allowed) || (head_organ.dna.species.bodyflags & ALL_RPARTS)) //If the head's species is in the list of allowed species for the hairstyle, or the head's species is one flagged to have bodies comprised wholly of cybernetics... diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 69fe7736567..a0a0f64fe76 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -61,7 +61,7 @@ proc/get_radio_key_from_channel(var/channel) return default_language /mob/living/proc/handle_speech_problems(list/message_pieces, var/verb) - var/robot = ismachine(src) + var/robot = ismachineperson(src) for(var/datum/multilingual_say_piece/S in message_pieces) if(S.speaking && S.speaking.flags & NO_STUTTER) continue diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm index 2fab9cf41cb..99d135df93b 100644 --- a/code/modules/mob/living/silicon/robot/component.dm +++ b/code/modules/mob/living/silicon/robot/component.dm @@ -313,7 +313,7 @@ proc/robot_healthscan(mob/user, mob/living/M) if(!organ_found) to_chat(user, "No prosthetics located.") - if(ismachine(H)) + if(ismachineperson(H)) to_chat(user, "Internal Fluid Level:[H.blood_volume]/[H.max_blood]") if(H.bleed_rate) to_chat(user, "Warning:External component leak detected!") diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index dc70eda9cec..4505d984f84 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -28,7 +28,7 @@ /obj/item/projectile/magic/death/on_hit(mob/living/carbon/C) . = ..() if(isliving(C)) - if(ismachine(C)) //speshul snowfleks deserv speshul treetment + if(ismachineperson(C)) //speshul snowfleks deserv speshul treetment C.adjustFireLoss(6969) //remember - slimes love fire else C.death() diff --git a/code/modules/surgery/limb_reattach.dm b/code/modules/surgery/limb_reattach.dm index db1ad04aef3..c43c3f373d5 100644 --- a/code/modules/surgery/limb_reattach.dm +++ b/code/modules/surgery/limb_reattach.dm @@ -32,7 +32,7 @@ if(ishuman(target)) var/mob/living/carbon/human/H = target var/obj/item/organ/external/affected = H.get_organ(user.zone_selected) - if(ismachine(target)) + if(ismachineperson(target)) // RIP bi-centennial man return 0 if(!affected) diff --git a/code/modules/surgery/organs/blood.dm b/code/modules/surgery/organs/blood.dm index 6114ca9277e..b0403d8ae49 100644 --- a/code/modules/surgery/organs/blood.dm +++ b/code/modules/surgery/organs/blood.dm @@ -54,7 +54,7 @@ var/obj/item/organ/external/BP = X var/brutedamage = BP.brute_dam - if(BP.is_robotic() && !ismachine(src)) + if(BP.is_robotic() && !ismachineperson(src)) continue //We want an accurate reading of .len diff --git a/code/modules/surgery/organs/organ_icon.dm b/code/modules/surgery/organs/organ_icon.dm index 6a518012441..2a3b94ca249 100644 --- a/code/modules/surgery/organs/organ_icon.dm +++ b/code/modules/surgery/organs/organ_icon.dm @@ -138,7 +138,7 @@ GLOBAL_LIST_EMPTY(limb_icon_cache) add_overlay(facial_s) if(h_style) - if(!ismachine(owner) || (ismachine(owner) && ((owner.head && (owner.head.flags & BLOCKHEADHAIR)) || (owner.wear_mask && (owner.wear_mask.flags & BLOCKHEADHAIR))))) + if(!ismachineperson(owner) || (ismachineperson(owner) && ((owner.head && (owner.head.flags & BLOCKHEADHAIR)) || (owner.wear_mask && (owner.wear_mask.flags & BLOCKHEADHAIR))))) var/datum/sprite_accessory/hair_style = GLOB.hair_styles_full_list[h_style] if(hair_style && ((dna.species.name in hair_style.species_allowed) || (dna.species.bodyflags & ALL_RPARTS))) var/icon/hair_s = new /icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s") From 37f1cf5ee9851f07e86bd14345734f3b306b1a4d Mon Sep 17 00:00:00 2001 From: AffectedArc07 Date: Wed, 1 Jul 2020 07:48:46 +0100 Subject: [PATCH 20/20] Fixes note search log + Minor TGUI fix --- code/modules/admin/sql_notes.dm | 4 ++-- code/modules/tgui/modules/crew_monitor.dm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/admin/sql_notes.dm b/code/modules/admin/sql_notes.dm index 2db6e09b354..a438a43eaec 100644 --- a/code/modules/admin/sql_notes.dm +++ b/code/modules/admin/sql_notes.dm @@ -187,12 +187,12 @@ log_game("SQL ERROR obtaining ckey from notes table. Error : \[[err]\]\n") return to_chat(usr, "Started regex note search for [search]. Please wait for results...") - message_admins("[usr] has started a note search with regex [search]. CPU usage may be higher.") + message_admins("[usr.ckey] has started a note search with the following regex: [search] | CPU usage may be higher.") while(query_list_notes.NextRow()) index_ckey = query_list_notes.item[1] output += "[index_ckey]
" CHECK_TICK - message_admins("The note search started by [usr] has complete. CPU should return to normal.") + message_admins("The note search started by [usr.ckey] has complete. CPU should return to normal.") else output += "
\[Add Note\]
" output += ruler diff --git a/code/modules/tgui/modules/crew_monitor.dm b/code/modules/tgui/modules/crew_monitor.dm index f301b38991a..783498542e4 100644 --- a/code/modules/tgui/modules/crew_monitor.dm +++ b/code/modules/tgui/modules/crew_monitor.dm @@ -29,7 +29,7 @@ ui.open() -/datum/tgui_module/crew_monitor/tgui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state) +/datum/tgui_module/crew_monitor/tgui_data(mob/user) var/data[0] var/turf/T = get_turf(tgui_host())