From 9ad437b8c5fe57a5b36748309ca8408785cd4325 Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Mon, 23 Dec 2013 04:57:44 -0500 Subject: [PATCH] Adding checks for LAssailant everywhere whee --- code/_onclick/item_attack.dm | 5 ++++ code/datums/mind.dm | 2 +- code/game/gamemodes/cult/ritual.dm | 5 +++- code/game/gamemodes/objective.dm | 8 +++++ code/game/gamemodes/vampire/vampire.dm | 4 +++ code/game/machinery/kitchen/gibber.dm | 4 +++ code/game/mecha/equipment/tools/tools.dm | 18 +++++++++++ code/game/mecha/equipment/weapons/weapons.dm | 4 +++ code/game/objects/items.dm | 5 ++++ code/game/objects/items/devices/flash.dm | 5 ++++ .../objects/items/devices/traitordevices.dm | 5 +++- code/game/objects/items/robot/robot_items.dm | 5 ++++ .../objects/items/weapons/dna_injector.dm | 5 ++++ code/game/objects/items/weapons/explosives.dm | 5 ++++ .../objects/items/weapons/gift_wrappaper.dm | 5 ++++ code/game/objects/items/weapons/handcuffs.dm | 6 ++++ .../game/objects/items/weapons/hydroponics.dm | 5 ++++ code/game/objects/items/weapons/kitchen.dm | 10 +++++++ .../objects/items/weapons/storage/bible.dm | 6 +++- .../items/weapons/storage/briefcase.dm | 5 ++++ code/game/objects/items/weapons/stunbaton.dm | 10 +++++++ .../objects/items/weapons/swords_axes_etc.dm | 30 +++++++++++++++---- code/game/objects/items/weapons/weaponry.dm | 5 ++++ code/modules/mob/living/carbon/carbon.dm | 5 ++++ code/modules/mob/living/carbon/human/death.dm | 4 +++ .../living/carbon/human/human_attackhand.dm | 13 ++++++++ .../mob/living/carbon/human/human_defense.dm | 5 ++++ code/modules/mob/living/living_defense.dm | 4 +++ code/modules/mob/mob_defines.dm | 2 ++ code/modules/mob/mob_grab.dm | 9 +++++- code/modules/organs/organ_external.dm | 4 +++ code/modules/paperwork/pen.dm | 4 +++ code/modules/projectiles/projectile.dm | 4 +++ code/modules/reagents/dartgun.dm | 4 +++ .../reagents/reagent_containers/dropper.dm | 4 +++ .../reagent_containers/food/condiment.dm | 4 +++ .../reagent_containers/food/drinks.dm | 4 +++ .../reagent_containers/food/drinks/bottle.dm | 4 +++ .../reagent_containers/food/snacks.dm | 4 +++ .../reagents/reagent_containers/glass.dm | 4 +++ .../reagents/reagent_containers/hypospray.dm | 4 +++ .../reagents/reagent_containers/pill.dm | 4 +++ .../reagent_containers/robodropper.dm | 5 +++- .../reagents/reagent_containers/syringes.dm | 8 +++++ code/modules/reagents/syringe_gun.dm | 4 +++ code/modules/surgery/braincore.dm | 4 +++ 46 files changed, 262 insertions(+), 11 deletions(-) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index ab6a39ac0b7..bca477fdb53 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -41,6 +41,11 @@ add_logs(M, user, "attacked", src.name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user + //spawn(1800) // this wont work right // M.lastattacker = null ///////////////////////// diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 80661887511..a4699f33ee1 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -44,7 +44,7 @@ datum/mind 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() diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 2d408a1a4ff..c75317e9dfb 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -342,7 +342,10 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", M.attack_log += text("\[[time_stamp()]\] Has had the [name] used on him by [user.name] ([user.ckey])") user.attack_log += text("\[[time_stamp()]\] Used [name] on [M.name] ([M.ckey])") msg_admin_attack("[user.name] ([user.ckey]) used [name] on [M.name] ([M.ckey]) (JMP)") - + if(!iscarbon(M)) + M.LAssailant = null + else + M.LAssailant = user if(istype(M,/mob/dead)) M.invisibility = 0 user.visible_message( \ diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 3302cbe5abe..9b923396417 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -757,3 +757,11 @@ datum/objective/blood return 1 else return 0 + + +// /vg/; Vox Inviolate for humans :V +datum/objective/minimize_casualties + explanation_text = "Minimise casualties." + check_completion() + if(owner.kills.len>5) return 0 + return 1 \ No newline at end of file diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm index 7b9304bf529..7e0e199862f 100644 --- a/code/game/gamemodes/vampire/vampire.dm +++ b/code/game/gamemodes/vampire/vampire.dm @@ -265,6 +265,10 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha H.attack_log += text("\[[time_stamp()]\] Has been bit in the neck by [src.name] ([src.ckey])") log_attack("[src.name] ([src.ckey]) bit [H.name] ([H.ckey]) in the neck") src.visible_message("\red [src.name] bites [H.name]'s neck!", "\red You bite [H.name]'s neck and begin to drain their blood.", "\blue You hear a soft puncture and a wet sucking noise") + if(!iscarbon(src)) + H.LAssailant = null + else + H.LAssailant = src while(do_mob(src, H, 50)) if(!mind.vampire || !(mind in ticker.mode.vampires)) src << "\red Your fangs have disappeared!" diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index 5441576b20b..6baee1ecf93 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -156,6 +156,10 @@ src.occupant.attack_log += "\[[time_stamp()]\] Was gibbed by [user]/[user.ckey]" //One shall not simply gib a mob unnoticed! user.attack_log += "\[[time_stamp()]\] Gibbed [src.occupant]/[src.occupant.ckey]" msg_admin_attack("[user.name] ([user.ckey]) gibbed [src.occupant] ([src.occupant.ckey]) (JMP)") + if(!iscarbon(user)) + src.occupant.LAssailant = null + else + src.occupant.LAssailant = user src.occupant.death(1) src.occupant.ghostize() diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index 524ff2fdd1e..ec1e4d06ec3 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -114,6 +114,15 @@ if(get_dir(chassis,ore)&chassis.dir) ore.Move(ore_box) else if(target.loc == C) + if(istype(target, /mob/living)) + var/mob/living/M = target + M.attack_log +="\[[time_stamp()]\] Mech Drilled by [chassis.occupant.name] ([chassis.occupant.ckey]) with [src.name]" + chassis.occupant.attack_log += "\[[time_stamp()]\] Mech Drilled [M.name] ([M.ckey]) with [src.name]" + log_attack("[chassis.occupant.name] ([chassis.occupant.ckey]) mech drilled [M.name] ([M.ckey]) with [src.name]" ) + if(!iscarbon(chassis.occupant)) + M.LAssailant = null + else + M.LAssailant = chassis.occupant log_message("Drilled through [target]") target.ex_act(2) return 1 @@ -171,6 +180,15 @@ for(var/obj/item/weapon/ore/ore in range(target,1)) ore.Move(ore_box) else if(target.loc == C) + if(istype(target, /mob/living)) + var/mob/living/M = target + M.attack_log +="\[[time_stamp()]\] Mech Drilled by [chassis.occupant.name] ([chassis.occupant.ckey]) with [src.name]" + chassis.occupant.attack_log += "\[[time_stamp()]\] Mech Drilled [M.name] ([M.ckey]) with [src.name]" + log_attack("[chassis.occupant.name] ([chassis.occupant.ckey]) mech drilled [M.name] ([M.ckey]) with [src.name]" ) + if(!iscarbon(chassis.occupant)) + M.LAssailant = null + else + M.LAssailant = chassis.occupant log_message("Drilled through [target]") target.ex_act(2) return 1 diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 69adf858b14..9def7332605 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -88,6 +88,10 @@ M.attack_log += "\[[time_stamp()]\] [firer]/[firer.ckey] shot [M]/[M.ckey] with a [src]" firer.attack_log += "\[[time_stamp()]\] [firer]/[firer.ckey] shot [M]/[M.ckey] with a [src]" log_attack("[firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src]") + if(!iscarbon(firer)) + M.LAssailant = null + else + M.LAssailant = firer else M.attack_log += "\[[time_stamp()]\] UNKNOWN SUBJECT (No longer exists) shot [M]/[M.ckey] with a [src]" log_attack("UNKNOWN shot [M] ([M.ckey]) with a [src]") diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 54fa3a8baaf..109f36be7a1 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -522,6 +522,11 @@ M.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" msg_admin_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") //BS12 EDIT ALG + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user + src.add_fingerprint(user) //if((CLUMSY in user.mutations) && prob(50)) // M = user diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 41565dbe63b..b5ba23ee6fc 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -39,6 +39,11 @@ user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to flash [M.name] ([M.ckey])") msg_admin_attack("[user.name] ([user.ckey]) Used the [src.name] to flash [M.name] ([M.ckey]) (JMP)") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user + if(!clown_check(user)) return if(broken) user << "\The [src] is broken." diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index 33149b06a4b..95bab377c70 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -46,7 +46,10 @@ effective or pretty fucking useless. if(prob(25)) M.Stun(rand(5,10)) M << "\red You feel a tremendous, paralyzing wave flood your mind." - + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user else M << "\red You feel a sudden, electric jolt travel through your head." diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 8021570b220..83aa680d7cd 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -14,6 +14,11 @@ user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (JMP)") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user + user.cell.charge -= 30 M.Weaken(5) diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 5bf10ccd20e..abea773b522 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -71,6 +71,11 @@ user.attack_log += text("\[[time_stamp()]\] Used the [name] to inject [M.name] ([M.ckey])") log_attack("[user.name] ([user.ckey]) used the [name] to inject [M.name] ([M.ckey])") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user + if (user) if (istype(M, /mob/living/carbon/human)) if(!inuse) diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 1d57d787fac..3e34d0c57f1 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -26,8 +26,13 @@ if (isturf(target)) location = target if (isobj(target)) location = target.loc if (ismob(target)) + var/mob/M = target target:attack_log += "\[[time_stamp()]\] Had the [name] planted on them by [user.real_name] ([user.ckey])" user.visible_message("\red [user.name] finished planting an explosive on [target.name]!") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user target.overlays += image('icons/obj/assemblies.dmi', "plastic-explosive2") user << "Bomb has been planted. Timer counting down from [timer]." spawn(timer*10) diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index afd63497073..a08ca995574 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -187,6 +187,11 @@ user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to wrap [H.name] ([H.ckey])") log_attack("[user.name] ([user.ckey]) used the [src.name] to wrap [H.name] ([H.ckey])") + if(!iscarbon(user)) + H.LAssailant = null + else + H.LAssailant = user + else user << "\blue You need more paper." else diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index a934db95643..d10bc124495 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -56,6 +56,12 @@ user.attack_log += text("\[[time_stamp()]\] Attempted to handcuff [C.name] ([C.ckey])") log_attack("[user.name] ([user.ckey]) Attempted to handcuff [C.name] ([C.ckey])") + if(!iscarbon(user)) + C.LAssailant = null + else + C.LAssailant = user + + var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( ) O.source = user O.target = C diff --git a/code/game/objects/items/weapons/hydroponics.dm b/code/game/objects/items/weapons/hydroponics.dm index ccda10b4d6a..6c81a0b9a13 100644 --- a/code/game/objects/items/weapons/hydroponics.dm +++ b/code/game/objects/items/weapons/hydroponics.dm @@ -209,6 +209,11 @@ user.attack_log += text("\[[time_stamp()]\] Used the [src.name] on [M.name] ([M.ckey])") msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] on [M.name] ([M.ckey]) (JMP)") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user + playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) M.eye_blurry += force/7 diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index 88a0d803e9b..d9755549dd1 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -230,6 +230,11 @@ user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (JMP)") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user + var/t = user:zone_sel.selecting if (t == "head") if(ishuman(M)) @@ -327,6 +332,11 @@ user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (JMP)") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user + if(prob(15)) M.Weaken(3) M.take_organ_damage(3) diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm index 9896a2478b4..82e4cbc69af 100644 --- a/code/game/objects/items/weapons/storage/bible.dm +++ b/code/game/objects/items/weapons/storage/bible.dm @@ -41,9 +41,13 @@ M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") - log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user + if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") user << "\red You don't have the dexterity to do this!" return diff --git a/code/game/objects/items/weapons/storage/briefcase.dm b/code/game/objects/items/weapons/storage/briefcase.dm index 6fa791782d7..0225e06c238 100644 --- a/code/game/objects/items/weapons/storage/briefcase.dm +++ b/code/game/objects/items/weapons/storage/briefcase.dm @@ -27,6 +27,11 @@ user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") msg_admin_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (?)") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user + if (M.stat < 2 && M.health < 50 && prob(90)) var/mob/H = M // ******* Check diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 42efab42521..d0de73271c4 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -146,6 +146,11 @@ L.attack_log += "\[[time_stamp()]\] Stunned by [user.name] ([user.ckey]) with [name]" log_attack("[user.name] ([user.ckey]) stunned [L.name] ([L.ckey]) with [name]" ) + if(!iscarbon(user)) + L.LAssailant = null + else + L.LAssailant = user + if(bcell.charge < hitcost) status = 0 update_icon() @@ -178,6 +183,11 @@ H.attack_log += "\[[time_stamp()]\] Stunned by thrown [src.name] last touched by ([src.fingerprintslast])" log_attack("Flying [src.name], last touched by ([src.fingerprintslast]) stunned [H.name] ([H.ckey])" ) + if(!iscarbon(foundmob)) + H.LAssailant = null + else + H.LAssailant = foundmob + /obj/item/weapon/melee/baton/emp_act(severity) if(bcell) deductcharge(1000 / severity) diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index acf164f0bee..c2cb748641b 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -114,6 +114,13 @@ M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user + + src.add_fingerprint(user) for(var/mob/O in viewers(M)) @@ -183,11 +190,24 @@ else user.take_organ_damage(2*force) return - - if(!..()) return - playsound(src.loc, "swing_hit", 50, 1, -1) - //target.Stun(4) //naaah - target.Weaken(4) + if (user.a_intent == "hurt") + if(!..()) return + if(!isrobot(target)) + playsound(src.loc, "swing_hit", 50, 1, -1) + //target.Stun(4) //naaah + target.Weaken(4) + else + playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1, -1) + target.Weaken(2) + target.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [target.name] ([target.ckey])") + log_attack("[user.name] ([user.ckey]) attacked [target.name] ([target.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + src.add_fingerprint(user) + target.visible_message("\red [target] has been stunned with \the [src] by [user]!") + if(!iscarbon(user)) + target.LAssailant = null + else + target.LAssailant = user return else return ..() diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index 665daf9966f..a80a0ce63ed 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -37,6 +37,11 @@ M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user + msg_admin_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index f0095ecbe1c..bd3801c8687 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -381,6 +381,11 @@ usr.attack_log += text("\[[time_stamp()]\] Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]") msg_admin_attack("[usr.name] ([usr.ckey]) has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor] (JMP)") + if(!iscarbon(usr)) + M.LAssailant = null + else + M.LAssailant = usr + if(!item) return //Grab processing has a chance of returning null item.layer = initial(item.layer) diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index ed8a6e8f8ee..863756f17df 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -81,6 +81,10 @@ if (V.dna && (V.dna.mutantrace == "vox"))*/ //Not currently feasible due to terrible LAssailant tracking. //world << "Vox kills: [vox_kills]" vox_kills++ //Bad vox. Shouldn't be killing humans. + if(ishuman(LAssailant)) + var/mob/living/carbon/human/H=LAssailant + if(H.mind) + H.mind.kills += "[name] ([ckey])" if(!gibbed) emote("deathgasp") //let the world KNOW WE ARE DEAD diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 0afe0d50826..95930443dd1 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -115,6 +115,11 @@ add_logs(src, M, "[M.species.attack_verb]ed") + if(!iscarbon(M)) + LAssailant = null + else + LAssailant = M + var/damage = rand(0, M.species.max_hurt_damage)//BS12 EDIT if(!damage) if(M.species.attack_verb == "punch") @@ -179,6 +184,14 @@ apply_effect(4, WEAKEN, run_armor_check(affecting, "melee")) playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) visible_message("\red [M] has pushed [src]!") + M.attack_log += text("\[[time_stamp()]\] Pushed [src.name] ([src.ckey])") + src.attack_log += text("\[[time_stamp()]\] Has been pushed by [M.name] ([M.ckey])") + if(!iscarbon(M)) + LAssailant = null + else + LAssailant = M + + log_attack("[M.name] ([M.ckey]) pushed [src.name] ([src.ckey])") return var/talked = 0 // BubbleWrap diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 501787927fd..e7205052b9f 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -203,6 +203,11 @@ emp_act src.attack_log += "\[[time_stamp()]\] Was chopped up into meat by [user]/[user.ckey]" user.attack_log += "\[[time_stamp()]\] Chopped up [src]/[src.ckey] into meat" msg_admin_attack("[user.name] ([user.ckey]) chopped up [src] ([src.ckey]) into meat (JMP)") + if(!iscarbon(user)) + LAssailant = null + else + LAssailant = user + del(src) var/datum/organ/external/affecting = get_organ(target_zone) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 6d6c7f8e260..80a6c036571 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -87,6 +87,10 @@ 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(!iscarbon(M)) + src.LAssailant = null + else + src.LAssailant = M // Begin BS12 momentum-transfer code. diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 14a7ac1f68f..e7a8d3ad79f 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -218,3 +218,5 @@ var/immune_to_ssd = 0 var/turf/listed_turf = null //the current turf being examined in the stat panel + + var/kills=0 \ No newline at end of file diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 048133a4168..db2d28574ee 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -132,6 +132,10 @@ affecting.attack_log += "\[[time_stamp()]\] Has had their neck grabbed by [assailant.name] ([assailant.ckey])" assailant.attack_log += "\[[time_stamp()]\] Grabbed the neck of [affecting.name] ([affecting.ckey])" log_attack("[assailant.name] ([assailant.ckey]) grabbed the neck of [affecting.name] ([affecting.ckey])") + if(!iscarbon(assailant)) + affecting.LAssailant = null + else + affecting.LAssailant = assailant hud.icon_state = "disarm/kill" hud.name = "disarm/kill" else @@ -153,7 +157,10 @@ affecting.attack_log += "\[[time_stamp()]\] Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])" assailant.attack_log += "\[[time_stamp()]\] Strangled (kill intent) [affecting.name] ([affecting.ckey])" log_attack("[assailant.name] ([assailant.ckey]) Strangled (kill intent) [affecting.name] ([affecting.ckey])") - + if(!iscarbon(assailant)) + affecting.LAssailant = null + else + affecting.LAssailant = assailant assailant.next_move = world.time + 10 affecting.losebreath += 1 else diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index c2e838c7ab6..06a3a1a662c 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -942,6 +942,10 @@ obj/item/weapon/organ/head/attackby(obj/item/weapon/W as obj, mob/user as mob) user.attack_log += "\[[time_stamp()]\] Debrained [brainmob.name] ([brainmob.ckey]) with [W.name] (INTENT: [uppertext(user.a_intent)])" brainmob.attack_log += "\[[time_stamp()]\] Debrained by [user.name] ([user.ckey]) with [W.name] (INTENT: [uppertext(user.a_intent)])" msg_admin_attack("[user] ([user.ckey]) debrained [brainmob] ([brainmob.ckey]) (INTENT: [uppertext(user.a_intent)]) (JMP)") + if(!iscarbon(user)) + brainmob.LAssailant = null + else + brainmob.LAssailant = user var/obj/item/brain/B = new(loc) B.transfer_identity(brainmob) diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 53937526be5..411e9903149 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -50,6 +50,10 @@ M.attack_log += text("\[[time_stamp()]\] Has been stabbed with [name] by [user.name] ([user.ckey])") user.attack_log += text("\[[time_stamp()]\] Used the [name] to stab [M.name] ([M.ckey])") msg_admin_attack("[user.name] ([user.ckey]) Used the [name] to stab [M.name] ([M.ckey]) (JMP)") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user return diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index bea343a6d7e..7543c68f155 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -120,6 +120,10 @@ M.attack_log += "\[[time_stamp()]\] [firer]/[firer.ckey] shot [M]/[M.ckey] with a [src.type]" firer.attack_log += "\[[time_stamp()]\] [firer]/[firer.ckey] shot [M]/[M.ckey] with a [src.type]" msg_admin_attack("[firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src] (JMP)") //BS12 EDIT ALG + if(!iscarbon(firer)) + M.LAssailant = null + else + M.LAssailant = firer else M.attack_log += "\[[time_stamp()]\] UNKNOWN SUBJECT (No longer exists) shot [M]/[M.ckey] with a [src]" msg_admin_attack("UNKNOWN shot [M] ([M.ckey]) with a [src] (JMP)") //BS12 EDIT ALG diff --git a/code/modules/reagents/dartgun.dm b/code/modules/reagents/dartgun.dm index a79a181e729..b72dc9abac8 100644 --- a/code/modules/reagents/dartgun.dm +++ b/code/modules/reagents/dartgun.dm @@ -180,6 +180,10 @@ M.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] shot [M]/[M.ckey] with a dartgun ([R])" user.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] shot [M]/[M.ckey] with a dartgun ([R])" msg_admin_attack("[user] ([user.ckey]) shot [M] ([M.ckey]) with a dartgun ([R]) (JMP)") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user else M.attack_log += "\[[time_stamp()]\] UNKNOWN SUBJECT (No longer exists) shot [M]/[M.ckey] with a dartgun ([R])" diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index 09da254712c..cffc1781181 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -73,6 +73,10 @@ M.attack_log += text("\[[time_stamp()]\] Has been squirted with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to squirt [M.name] ([M.key]). Reagents: [contained]") msg_admin_attack("[user.name] ([user.ckey]) squirted [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user trans = src.reagents.trans_to(target, amount_per_transfer_from_this) user << "\blue You transfer [trans] units of the solution." diff --git a/code/modules/reagents/reagent_containers/food/condiment.dm b/code/modules/reagents/reagent_containers/food/condiment.dm index 167d0878b16..8c7c458804b 100644 --- a/code/modules/reagents/reagent_containers/food/condiment.dm +++ b/code/modules/reagents/reagent_containers/food/condiment.dm @@ -51,6 +51,10 @@ M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") user.attack_log += text("\[[time_stamp()]\] Fed [src.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") msg_admin_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user if(reagents.total_volume) reagents.reaction(M, INGEST) diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index fbce54cd572..a133db3c594 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -46,6 +46,10 @@ M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") log_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (JMP)") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user if(reagents.total_volume) reagents.reaction(M, INGEST) diff --git a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm index c958b351fa5..807552c54b9 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm @@ -100,6 +100,10 @@ user.attack_log += text("\[[time_stamp()]\] Has attacked [target.name] ([target.ckey]) with a bottle!") target.attack_log += text("\[[time_stamp()]\] Has been smashed with a bottle by [user.name] ([user.ckey])") msg_admin_attack("[user.name] ([user.ckey]) attacked [target.name] ([target.ckey]) with a bottle. (INTENT: [uppertext(user.a_intent)]) (JMP)") + if(!iscarbon(user)) + target.LAssailant = null + else + target.LAssailant = user //The reagents in the bottle splash all over the target, thanks for the idea Nodrak if(src.reagents) diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 154d523d1e4..8819f68d23c 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -67,6 +67,10 @@ M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") user.attack_log += text("\[[time_stamp()]\] Fed [src.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") log_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)])") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user for(var/mob/O in viewers(world.view, user)) O.show_message("\red [user] feeds [M] [src].", 1) diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 7e87f589664..292e75c28f7 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -85,6 +85,10 @@ M.attack_log += text("\[[time_stamp()]\] Has been splashed with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to splash [M.name] ([M.key]). Reagents: [contained]") msg_admin_attack("[user.name] ([user.ckey]) splashed [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user for(var/mob/O in viewers(world.view, user)) O.show_message(text("\red [] has been splashed with something by []!", target, user), 1) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index dac83c24177..8ec33df216d 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -44,6 +44,10 @@ M.attack_log += text("\[[time_stamp()]\] Has been injected with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to inject [M.name] ([M.key]). Reagents: [contained]") msg_admin_attack("[user.name] ([user.ckey]) injected [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user var/trans = reagents.trans_to(M, amount_per_transfer_from_this) user << "\blue [trans] units injected. [reagents.total_volume] units remaining in [src]." diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index b2c168fe8a8..0ac603856f9 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -44,6 +44,10 @@ M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") msg_admin_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (JMP)") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user if(reagents.total_volume) reagents.reaction(M, INGEST) diff --git a/code/modules/reagents/reagent_containers/robodropper.dm b/code/modules/reagents/reagent_containers/robodropper.dm index 475a29c331e..4161f0f55b8 100644 --- a/code/modules/reagents/reagent_containers/robodropper.dm +++ b/code/modules/reagents/reagent_containers/robodropper.dm @@ -70,7 +70,10 @@ M.attack_log += text("\[[time_stamp()]\] Has been squirted with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to squirt [M.name] ([M.key]). Reagents: [contained]") msg_admin_attack("[user.name] ([user.ckey]) squirted [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") - + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user trans = src.reagents.trans_to(target, amount_per_transfer_from_this) user << "\blue You transfer [trans] units of the solution." diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 652d16a0f19..699b4a8b24a 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -156,6 +156,10 @@ M.attack_log += text("\[[time_stamp()]\] Has been injected with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to inject [M.name] ([M.key]). Reagents: [contained]") msg_admin_attack("[user.name] ([user.ckey]) injected [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user src.reagents.reaction(target, INGEST) if(ismob(target) && target == user) @@ -223,6 +227,10 @@ user.attack_log += "\[[time_stamp()]\] Attacked [target.name] ([target.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" target.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" msg_admin_attack("[user.name] ([user.ckey]) attacked [target.name] ([target.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") + if(!iscarbon(user)) + target.LAssailant = null + else + target.LAssailant = user if(istype(target, /mob/living/carbon/human)) diff --git a/code/modules/reagents/syringe_gun.dm b/code/modules/reagents/syringe_gun.dm index 2600d11676c..973655e409f 100644 --- a/code/modules/reagents/syringe_gun.dm +++ b/code/modules/reagents/syringe_gun.dm @@ -88,6 +88,10 @@ M.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] shot [M]/[M.ckey] with a syringegun ([R])" user.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] shot [M]/[M.ckey] with a syringegun ([R])" msg_admin_attack("[user] ([user.ckey]) shot [M] ([M.ckey]) with a syringegun ([R]) (JMP)") + if(!iscarbon(user)) + M.LAssailant = null + else + M.LAssailant = user else M.attack_log += "\[[time_stamp()]\] UNKNOWN SUBJECT (No longer exists) shot [M]/[M.ckey] with a syringegun ([R])" diff --git a/code/modules/surgery/braincore.dm b/code/modules/surgery/braincore.dm index c2bd81f5244..46b88031244 100644 --- a/code/modules/surgery/braincore.dm +++ b/code/modules/surgery/braincore.dm @@ -93,6 +93,10 @@ user.attack_log += "\[[time_stamp()]\] Debrained [target.name] ([target.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])" target.attack_log += "\[[time_stamp()]\] Debrained by [user.name] ([user.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])" msg_admin_attack("[user.name] ([user.ckey]) debrained [target.name] ([target.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") + if(!iscarbon(user)) + target.LAssailant = null + else + target.LAssailant = user var/obj/item/brain/B = new(target.loc) B.transfer_identity(target)