diff --git a/baystation12.dme b/baystation12.dme index 6ea31a8b6d6..2624afaac9e 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1382,6 +1382,7 @@ #include "code\WorkInProgress\fireworks.dm" #include "code\WorkInProgress\periodic_news.dm" #include "code\WorkInProgress\Apples\artifacts.dm" +#include "code\WorkInProgress\Cael_Aislinn\sculpture.dm" #include "code\WorkInProgress\Cael_Aislinn\Jungle\falsewall.dm" #include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle.dm" #include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle_animals.dm" diff --git a/code/WorkInProgress/Cael_Aislinn/sculpture.dm b/code/WorkInProgress/Cael_Aislinn/sculpture.dm index 2ecc98a4aec..0a1b14d1ae0 100644 --- a/code/WorkInProgress/Cael_Aislinn/sculpture.dm +++ b/code/WorkInProgress/Cael_Aislinn/sculpture.dm @@ -22,10 +22,8 @@ /mob/living/simple_animal/sculpture/proc/GrabMob(var/mob/living/target) if(target && target != src && ishuman(target)) - G = new /obj/item/weapon/grab(target) - G.assailant = src - G.layer = 20 - G.affecting = target + G = new /obj/item/weapon/grab(src, target) + G.loc=src target.grabbed_by += G G.synch() target.LAssailant = src @@ -34,13 +32,12 @@ visible_message("\red [src] has grabbed [target]!") target << "\red You feel something suddenly grab you around the neck from behind! Everything goes black..." - G.state = 3 - G.killing = 1 + G.state = GRAB_KILL desc = "It's some kind of human sized, doll-like sculpture, with weird discolourations on some parts of it. It appears to be quite solid. [G ? "\red The sculpture is holding [G.affecting] in a vice-like grip." : ""]" target.attack_log += text("\[[time_stamp()]\] Has been grabbed by SCP-173, and is being strangled!") log_admin("[target] ([target.ckey]) has been grabbed and is being strangled by SCP-173.") - message_admins("Alert: [target.real_name] has been grabbed and is being strangled by SCP-173. Set var/allow_escape = 1 to allow this player to escape temporarily, or var/hibernate = 1 to disable it entirely.") + message_admins("Alert: [target.real_name] has been grabbed and is being strangled by SCP-173.") //Set var/allow_escape = 1 to allow this player to escape temporarily, or var/hibernate = 1 to disable it entirely. /mob/living/simple_animal/sculpture/proc/Escape() var/list/turfs = new/list() @@ -49,7 +46,7 @@ continue else if(istype(thisturf, /turf/simulated/wall)) continue - else if(istype(thisturf, /turf/simulated/mineral)) + else if(istype(thisturf, /turf/unsimulated/mineral)) continue else if(istype(thisturf, /turf/simulated/shuttle/wall)) continue @@ -73,12 +70,11 @@ desc = "It's some kind of human sized, doll-like sculpture, with weird discolourations on some parts of it. It appears to be quite solid." //if we are sent into forced hibernation mode, allow our victim to escape - if(hibernate && G && G.killing == 1) + if(hibernate && G && G.state == GRAB_KILL) if(G) G.affecting << "\red You suddenly feel the grip around your neck being loosened!" - visible_message("\red [src] suddenly loosens it's grip!") - G.killing = 0 - G.state = 1 + visible_message("\red [src] suddenly loosens it's grip due to hibernate!") + G.state = GRAB_AGGRESSIVE return // @@ -87,8 +83,7 @@ if(G) G.affecting << "\red You suddenly feel the grip around your neck being loosened!" visible_message("\red [src] suddenly loosens it's grip!") - G.killing = 0 - G.state = 1 + G.state = GRAB_AGGRESSIVE if(!observed) Escape() observed = 1 @@ -97,6 +92,10 @@ if(istype(get_turf(src), /turf/space) || hibernate) return + // Grabbing + if(G) + G.process() + for(var/mob/living/M in view(7, src)) if(M.stat || M == src) continue @@ -136,7 +135,7 @@ //see if we're able to do stuff if(!observed || in_darkness) if(G) - if(prob(random_escape_chance)) + if(prob(1)) //chance to allow the stranglee to escape allow_escape = 1 if(G.affecting.stat == 2) @@ -212,7 +211,7 @@ continue else if(istype(thisturf, /turf/simulated/wall)) continue - else if(istype(thisturf, /turf/simulated/mineral)) + else if(istype(thisturf, /turf/unsimulated/mineral)) continue else if(istype(thisturf, /turf/simulated/shuttle/wall)) continue @@ -237,13 +236,13 @@ src.dir = get_dir(src, target_mob) next_turf = get_step(src, get_dir(next_turf,target_turf)) num_turfs-- - else if(G) - //we can't move while observed, so we can't effectively strangle any more - //our grip is still rock solid, but the victim has a chance to escape - G.affecting << "\red You suddenly feel the grip around your neck being loosened!" - visible_message("\red [src] suddenly loosens it's grip!") - G.state = 1 - G.killing = 0 + +// else if(G) +// //we can't move while observed, so we can't effectively strangle any more //since victim is observer this means no strangling +// //our grip is still rock solid, but the victim has a chance to escape +// G.affecting << "\red You suddenly feel the grip around your neck being loosened!" +// visible_message("\red [src] suddenly loosens it's grip due to being observed!") +// G.state = GRAB_AGGRESSIVE /mob/living/simple_animal/sculpture/attackby(var/obj/item/O as obj, var/mob/user as mob) ..() diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 81d053c9a72..f303e07366a 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -1,3 +1,6 @@ +/hook/startup/proc/createDatacore() + data_core = new /obj/effect/datacore() + return 1 /obj/effect/datacore/proc/manifest(var/nosleep = 0) spawn() diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index 26eab1f683f..310af6170b9 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -85,14 +85,9 @@ kill_objective.find_target() traitor.objectives += kill_objective - if(prob(25)) - var/datum/objective/die/die_objective = new - die_objective.owner = traitor - traitor.objectives += die_objective - else - var/datum/objective/survive/survive_objective = new - survive_objective.owner = traitor - traitor.objectives += survive_objective + var/datum/objective/survive/survive_objective = new + survive_objective.owner = traitor + traitor.objectives += survive_objective if(prob(10)) var/datum/objective/block/block_objective = new @@ -122,12 +117,16 @@ steal_objective.find_target() traitor.objectives += steal_objective switch(rand(1,100)) - if(1 to 100) + if(1 to 30) // Die glorious death + if (!(locate(/datum/objective/die) in traitor.objectives)) + var/datum/objective/die/die_objective = new + die_objective.owner = traitor + traitor.objectives += die_objective + if(31 to 90) if (!(locate(/datum/objective/escape) in traitor.objectives)) var/datum/objective/escape/escape_objective = new escape_objective.owner = traitor traitor.objectives += escape_objective - else if(prob(50)) if (!(locate(/datum/objective/hijack) in traitor.objectives)) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 432710a5bea..be7e314193d 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -245,7 +245,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use //#### Grab the connection datum ####// var/datum/radio_frequency/connection = null - testing("[src]: talk_into([M], [message], [channel])") + //testing("[src]: talk_into([M], [message], [channel])") if(channel == "headset") channel = null if(channel) // If a channel is specified, look for it. diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 736770a9788..46745011a57 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1121,6 +1121,7 @@ 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 diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 3bc78fd382c..abc51b30d93 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -87,7 +87,8 @@ src.attack_log += text("\[[time_stamp()]\] Has been hit with a thrown [O], last touched by [M.name] ([assailant.ckey])") M.attack_log += text("\[[time_stamp()]\] Hit [src.name] ([src.ckey]) with a thrown [O]") - msg_admin_attack("[src.name] ([src.ckey]) was hit by a thrown [O], last touched by [M.name] ([assailant.ckey]) (JMP)") + if(!istype(src,/mob/living/simple_animal/mouse)) + msg_admin_attack("[src.name] ([src.ckey]) was hit by a thrown [O], last touched by [M.name] ([assailant.ckey]) (JMP)") if(!iscarbon(M)) src.LAssailant = null else @@ -170,4 +171,4 @@ if(fire_stacks > 9 && !on_fire) IgniteMob() -//Mobs on Fire end \ No newline at end of file +//Mobs on Fire end diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 06648809dd4..17876180ba9 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -144,11 +144,16 @@ // Used in job equipping so shit doesn't pile up at the start loc. /mob/living/carbon/human/proc/equip_or_collect(var/obj/item/W, var/slot) if(!equip_to_slot_or_del(W, slot)) - // Do I have a bag? - var/obj/item/weapon/storage/bag/plasticbag/B = is_in_hands(/obj/item/weapon/storage/bag/plasticbag) + // Do I have a backpack? + var/obj/item/weapon/storage/B = back + + // Do I have a plastic bag? + if(!B) + B=is_in_hands(/obj/item/weapon/storage/bag/plasticbag) + if(!B) // Gimme one. - B=new(null) // Null in case of failed equip. + B=new /obj/item/weapon/storage/bag/plasticbag(null) // Null in case of failed equip. if(!put_in_hands(B,slot_back)) return // Fuck it B.handle_item_insertion(W,1) diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm index 0377df4f590..4acabdff079 100644 --- a/code/modules/organs/blood.dm +++ b/code/modules/organs/blood.dm @@ -73,12 +73,13 @@ var/const/BLOOD_VOLUME_SURVIVE = 122 // Damaged heart virtually reduces the blood volume, as the blood isn't // being pumped properly anymore. var/datum/organ/internal/heart/heart = internal_organs["heart"] - if(heart.damage > 1 && heart.damage < heart.min_bruised_damage) - blood_volume *= 0.8 - else if(heart.damage >= heart.min_bruised_damage && heart.damage < heart.min_broken_damage) - blood_volume *= 0.6 - else if(heart.damage >= heart.min_broken_damage && heart.damage < INFINITY) - blood_volume *= 0.3 + if(heart) + if(heart.damage > 1 && heart.damage < heart.min_bruised_damage) + blood_volume *= 0.8 + else if(heart.damage >= heart.min_bruised_damage && heart.damage < heart.min_broken_damage) + blood_volume *= 0.6 + else if(heart.damage >= heart.min_broken_damage && heart.damage < INFINITY) + blood_volume *= 0.3 //Effects of bloodloss switch(blood_volume) @@ -108,11 +109,16 @@ var/const/BLOOD_VOLUME_SURVIVE = 122 if(prob(15)) Paralyse(rand(1,3)) var/word = pick("dizzy","woosey","faint") - src << "\red You feel extremely [word]" + src << "\red You feel very [word]" if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD) - oxyloss += 5 - toxloss += 3 + if(!pale) + pale = 1 + update_body() + if(oxyloss > 20) + eye_blurry += 6 + oxyloss += 12 if(prob(15)) + Paralyse(rand(1,3)) var/word = pick("dizzy","woosey","faint") src << "\red You feel extremely [word]" if(0 to BLOOD_VOLUME_SURVIVE) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 5837c2a25ae..1cd26a4f610 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -637,9 +637,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 4bfe2419f26..598e7eb6776 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 cda3d9fd96c..8e249887772 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)