diff --git a/code/_onclick/adjacent.dm b/code/_onclick/adjacent.dm index c02737400ba..b39df751896 100644 --- a/code/_onclick/adjacent.dm +++ b/code/_onclick/adjacent.dm @@ -46,7 +46,7 @@ continue // could not leave T0 in that direction var/turf/T1 = get_step(T0,d) - if(!T1 || T1.density || !T1.ClickCross(get_dir(T1,T0) & get_dir(T1,src), border_only = 0)) + if(!T1 || T1.density || !T1.ClickCross(get_dir(T1,T0) | get_dir(T1,src), border_only = 0)) continue // couldn't enter or couldn't leave T1 if(!src.ClickCross(get_dir(src,T1), border_only = 1, target_atom = target)) diff --git a/code/game/gamemodes/heist/heist.dm b/code/game/gamemodes/heist/heist.dm index 4dfff4fc4cf..fd2cdf88ade 100644 --- a/code/game/gamemodes/heist/heist.dm +++ b/code/game/gamemodes/heist/heist.dm @@ -2,11 +2,6 @@ VOX HEIST ROUNDTYPE */ -#define MAX_VOX_KILLS 10 //Number of kills during the round before the Inviolate is broken. - //Would be nice to use vox-specific kills but is currently not feasible. - -var/global/vox_kills = 0 //Used to check the Inviolate. - /datum/game_mode/ var/list/datum/mind/raiders = list() //Antags. @@ -163,10 +158,7 @@ var/global/vox_kills = 0 //Used to check the Inviolate. objs += new /datum/objective/heist/inviolate_crew objs += new /datum/objective/heist/inviolate_death - for(var/datum/objective/heist/O in raid_objectives) - O.choose_target() - - return raid_objectives + return objs /datum/game_mode/heist/proc/greet_vox(var/datum/mind/raider) raider.current << "\blue You are a Vox Raider, fresh from the Shoal!" @@ -245,28 +237,6 @@ var/global/vox_kills = 0 //Used to check the Inviolate. feedback_add_details("traitor_objective","[objective.type]|FAIL") count++ - var/text = "The vox raiders were:" - - for(var/datum/mind/vox in raiders) - text += "
[vox.key] was [vox.name] (" - var/obj/stack = raiders[vox] - if(get_area(stack) != locate(/area/shuttle/vox/station)) - text += "left behind)" - continue - else if(vox.current) - if(vox.current.stat == DEAD) - text += "died" - else - text += "survived" - if(vox.current.real_name != vox.name) - text += " as [vox.current.real_name]" - else - text += "body destroyed" - text += ")" - - world << text - return 1 - ..() datum/game_mode/proc/auto_declare_completion_heist() diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index e4fd4eeacb2..b3493efcbae 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -922,8 +922,12 @@ datum/objective/heist/inviolate_crew if(H.is_raider_crew_safe()) return 1 return 0 +#define MAX_VOX_KILLS 10 //Number of kills during the round before the Inviolate is broken. + //Would be nice to use vox-specific kills but is currently not feasible. +var/global/vox_kills = 0 //Used to check the Inviolate. + datum/objective/heist/inviolate_death explanation_text = "Follow the Inviolate. Minimise death and loss of resources." check_completion() - if(vox_kills>5) return 0 + if(vox_kills > MAX_VOX_KILLS) return 0 return 1 \ No newline at end of file diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm index 59b77c54fde..8de8e20fb5c 100644 --- a/code/game/machinery/bots/ed209bot.dm +++ b/code/game/machinery/bots/ed209bot.dm @@ -961,7 +961,7 @@ Auto Patrol: []"}, var/turf/T = get_turf(user) user << "You start to wire [src]..." sleep(40) - if(get_turf(user) == T) + if(get_turf(user) == T && build_step == 6) coil.use(1) build_step++ user << "You wire the ED-209 assembly." @@ -996,7 +996,7 @@ Auto Patrol: []"}, var/turf/T = get_turf(user) user << "Now attaching the gun to the frame..." sleep(40) - if(get_turf(user) == T) + if(get_turf(user) == T && build_step == 8) build_step++ name = "armed [name]" user << "Taser gun attached." diff --git a/code/game/verbs/who.dm b/code/game/verbs/who.dm index a8920ef3c71..b8ff0e19916 100644 --- a/code/game/verbs/who.dm +++ b/code/game/verbs/who.dm @@ -93,6 +93,7 @@ num_admins_online++ else modmsg += "\t[C] is a [C.holder.rank]\n" + num_mods_online++ msg = "Current Admins ([num_admins_online]):\n" + msg + "\n Current Moderators([num_mods_online]):\n" + modmsg src << msg \ No newline at end of file diff --git a/code/modules/clothing/head/soft_caps.dm b/code/modules/clothing/head/soft_caps.dm index 9391bc85a51..65f265f23f4 100644 --- a/code/modules/clothing/head/soft_caps.dm +++ b/code/modules/clothing/head/soft_caps.dm @@ -1,6 +1,6 @@ /obj/item/clothing/head/soft name = "cargo cap" - desc = "It's a baseball hat in a tasteless yellow colour." + desc = "It's a baseball hat in a tasteless yellow color." icon_state = "cargosoft" flags = FPRINT|TABLEPASS|HEADCOVERSEYES item_state = "helmet" @@ -29,49 +29,49 @@ /obj/item/clothing/head/soft/red name = "red cap" - desc = "It's a baseball hat in a tasteless red colour." + desc = "It's a baseball hat in a tasteless red color." icon_state = "redsoft" item_color = "red" /obj/item/clothing/head/soft/blue name = "blue cap" - desc = "It's a baseball hat in a tasteless blue colour." + desc = "It's a baseball hat in a tasteless blue color." icon_state = "bluesoft" item_color = "blue" /obj/item/clothing/head/soft/green name = "green cap" - desc = "It's a baseball hat in a tasteless green colour." + desc = "It's a baseball hat in a tasteless green color." icon_state = "greensoft" item_color = "green" /obj/item/clothing/head/soft/yellow name = "yellow cap" - desc = "It's a baseball hat in a tasteless yellow colour." + desc = "It's a baseball hat in a tasteless yellow color." icon_state = "yellowsoft" item_color = "yellow" /obj/item/clothing/head/soft/grey name = "grey cap" - desc = "It's a baseball hat in a tasteful grey colour." + desc = "It's a baseball hat in a tasteful grey color." icon_state = "greysoft" item_color = "grey" /obj/item/clothing/head/soft/orange name = "orange cap" - desc = "It's a baseball hat in a tasteless orange colour." + desc = "It's a baseball hat in a tasteless orange color." icon_state = "orangesoft" item_color = "orange" /obj/item/clothing/head/soft/mime name = "white cap" - desc = "It's a baseball hat in a tasteless white colour." + desc = "It's a baseball hat in a tasteless white color." icon_state = "mimesoft" item_color = "mime" /obj/item/clothing/head/soft/purple name = "purple cap" - desc = "It's a baseball hat in a tasteless purple colour." + desc = "It's a baseball hat in a tasteless purple color." icon_state = "purplesoft" item_color = "purple" @@ -83,12 +83,12 @@ /obj/item/clothing/head/soft/sec name = "security cap" - desc = "It's baseball hat in tasteful red colour." + desc = "It's baseball hat in tasteful red color." icon_state = "secsoft" item_color = "sec" /obj/item/clothing/head/soft/sec/corp name = "corporate security cap" - desc = "It's baseball hat in corpotate colours." + desc = "It's baseball hat in corporate colors." icon_state = "corpsoft" - item_color = "corp" \ No newline at end of file + item_color = "corp" diff --git a/code/modules/mob/dead/observer/say.dm b/code/modules/mob/dead/observer/say.dm index acf6c887d7f..34a0d44d631 100644 --- a/code/modules/mob/dead/observer/say.dm +++ b/code/modules/mob/dead/observer/say.dm @@ -1,5 +1,5 @@ /mob/dead/observer/say(var/message) - message = trim(copytext(message, 1, MAX_MESSAGE_LEN)) + message = sanitize(copytext(message, 1, MAX_MESSAGE_LEN)) if (!message) return @@ -18,7 +18,7 @@ /mob/dead/observer/emote(var/act, var/type, var/message) - message = trim(copytext(message, 1, MAX_MESSAGE_LEN)) + message = sanitize(copytext(message, 1, MAX_MESSAGE_LEN)) if(!message) return diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 5d0949ac695..d74f28b7c96 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1022,9 +1022,11 @@ O.status &= ~ORGAN_BROKEN O.status &= ~ORGAN_BLEEDING O.status &= ~ORGAN_SPLINTED + O.status &= ~ORGAN_CUT_AWAY O.status &= ~ORGAN_ATTACHABLE if (!O.amputated) O.status &= ~ORGAN_DESTROYED + O.destspawn = 0 O.wounds.Cut() O.heal_damage(1000,1000,1,1) @@ -1114,7 +1116,7 @@ del(feet_blood_DNA) return 1 -/mob/living/carbon/human/proc/get_visible_implants(var/class = 0) +/mob/living/carbon/human/get_visible_implants(var/class = 0) var/list/visible_implants = list() for(var/datum/organ/external/organ in src.organs) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 13cfb8d32f2..468537ef347 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -279,6 +279,7 @@ icon_state = "[src.ckey]-Standard" /mob/living/silicon/robot/verb/Namepick() + set category = "Robot Commands" if(custom_name) return 0 diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index c69b25d4935..ecec6dca4c2 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -895,6 +895,13 @@ note dizziness decrements automatically in the mob's Life() proc. /mob/proc/flash_weak_pain() flick("weak_pain",pain) +/mob/proc/get_visible_implants(var/class = 0) + var/list/visible_implants = list() + for(var/obj/item/O in embedded) + if(O.w_class > class) + visible_implants += O + return visible_implants + mob/proc/yank_out_object() set category = "Object" set name = "Yank out object" @@ -921,14 +928,7 @@ mob/proc/yank_out_object() if(S == U) self = 1 // Removing object from yourself. - if(istype(src,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = src - valid_objects = H.get_visible_implants(1) - else - for(var/obj/item/weapon/W in embedded) - if(W.w_class >= 2) - valid_objects += W - + valid_objects = get_visible_implants(1) if(!valid_objects.len) if(self) src << "You have nothing stuck in your body that is large enough to remove." @@ -952,7 +952,9 @@ mob/proc/yank_out_object() visible_message("[src] rips [selection] out of their body.","You rip [selection] out of your body.") else visible_message("[usr] rips [selection] out of [src]'s body.","[usr] rips [selection] out of your body.") - src.verbs -= /mob/proc/yank_out_object + valid_objects = get_visible_implants(0) + if(valid_objects.len == 1) //Yanking out last object - removing verb. + src.verbs -= /mob/proc/yank_out_object if(istype(src,/mob/living/carbon/human)) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index dd7294dea61..f91fe51177b 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -616,9 +616,11 @@ This function completely restores a damaged organ to perfect condition. src.status &= ~ORGAN_BROKEN src.status &= ~ORGAN_BLEEDING src.status &= ~ORGAN_SPLINTED + src.status &= ~ORGAN_CUT_AWAY src.status &= ~ORGAN_ATTACHABLE src.status &= ~ORGAN_DESTROYED src.status |= ORGAN_ROBOT + src.destspawn = 0 for (var/datum/organ/external/T in children) if(T) T.robotize() diff --git a/code/modules/surgery/headreattach.dm b/code/modules/surgery/headreattach.dm index 617351178e7..eb5c6964269 100644 --- a/code/modules/surgery/headreattach.dm +++ b/code/modules/surgery/headreattach.dm @@ -14,7 +14,7 @@ if (affected.parent) if (affected.parent.status & ORGAN_DESTROYED) return 0 - return target_zone == "head" + return affected.name == "head" /datum/surgery_step/head/peel @@ -27,6 +27,9 @@ min_duration = 80 max_duration = 100 + can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + var/datum/organ/external/affected = target.get_organ(target_zone) + return ..() && !(affected.status & ORGAN_CUT_AWAY) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] starts peeling back tattered flesh where [target]'s head used to be with \the [tool].", \ @@ -59,7 +62,7 @@ can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/datum/organ/external/affected = target.get_organ(target_zone) - return ..() && affected.status & ORGAN_CUT_AWAY + return ..() && affected.status & ORGAN_CUT_AWAY && affected.open < 3 && !(affected.status & ORGAN_ATTACHABLE) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/datum/organ/external/affected = target.get_organ(target_zone) diff --git a/code/modules/surgery/robolimbs.dm b/code/modules/surgery/robolimbs.dm index ee56a46bf59..3be16401be2 100644 --- a/code/modules/surgery/robolimbs.dm +++ b/code/modules/surgery/robolimbs.dm @@ -16,7 +16,7 @@ if (affected.parent) if (affected.parent.status & ORGAN_DESTROYED) return 0 - return 1 + return affected.name != "head" /datum/surgery_step/limb/cut @@ -29,6 +29,10 @@ min_duration = 80 max_duration = 100 + can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + var/datum/organ/external/affected = target.get_organ(target_zone) + return ..() && !(affected.status & ORGAN_CUT_AWAY) + begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/datum/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \ @@ -61,7 +65,7 @@ can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/datum/organ/external/affected = target.get_organ(target_zone) - return ..() && affected.status & ORGAN_CUT_AWAY + return ..() && affected.status & ORGAN_CUT_AWAY && affected.open < 3 && !(affected.status & ORGAN_ATTACHABLE) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/datum/organ/external/affected = target.get_organ(target_zone) diff --git a/maps/tgstation2.dmm b/maps/tgstation2.dmm index 6f7717fe523..c5477378e95 100644 --- a/maps/tgstation2.dmm +++ b/maps/tgstation2.dmm @@ -6321,7 +6321,7 @@ "crC" = (/obj/machinery/portable_atmospherics/scrubber,/obj/machinery/atmospherics/unary/vent_scrubber{dir = 1; on = 1; scrub_N2O = 0; scrub_Toxins = 0},/obj/machinery/alarm{dir = 1; icon_state = "alarm0"; pixel_y = -22},/turf/simulated/floor{icon_state = "white"},/area/toxins/misc_lab) "crD" = (/obj/structure/closet/toolcloset,/turf/simulated/floor{dir = 8; icon_state = "caution"},/area/engine/break_room) "crE" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced,/turf/simulated/floor/engine,/area/toxins/misc_lab) -"crF" = (/obj/machinery/light{icon_state = "tube1"; dir = 4},/obj/structure/table,/obj/item/device/radio/electropack,/obj/item/stack/sheet/metal{amount = 5000},/turf/simulated/floor/engine,/area/toxins/misc_lab) +"crF" = (/obj/machinery/light{icon_state = "tube1"; dir = 4},/obj/structure/table,/obj/item/device/radio/electropack,/obj/item/stack/sheet/metal{amount = 50},/turf/simulated/floor/engine,/area/toxins/misc_lab) "crG" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden,/obj/structure/window/reinforced{dir = 4},/obj/structure/closet/wardrobe/engineering_yellow,/turf/simulated/floor{icon_state = "yellowfull"; dir = 8},/area/crew_quarters/sleep/engi) "crH" = (/obj/machinery/alarm{dir = 4; icon_state = "alarm0"; pixel_x = -22},/obj/structure/flora/pottedplant{tag = "icon-plant-20"; icon_state = "plant-20"},/turf/simulated/floor{icon_state = "yellowfull"; dir = 8},/area/crew_quarters/sleep/engi) "crI" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden,/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor,/area/engine/engineering)