[MIRROR] Pacifists can no longer cause harm using mech equipment (#5921)
* Pacifists can no longer cause harm using mech equipment (#36293) * Fixes pacifists from firing mech weapons that cause harm * Pacifists can still use mining equipment on non-living objects * I'm a big ol dumbo that forgot how booleans are handled * missed one * forgot to save file before commit. Now all booleans are fixed * CAPS * Pacifists can't drill, clamp, or melee hit a closed locker or crate. prevents them from killing people inside them * Pacifists now know if a container has a living being in it and will not drill, clamp, or melee it if it does. * made change as requested by duncathan * added an exception to the hydraulic clamp so that it can pick up containers with people in them. * Pacifists can no longer cause harm using mech equipment
This commit is contained in:
committed by
Poojawa
parent
12085591bf
commit
f9c1114ec1
@@ -14,6 +14,7 @@
|
||||
var/range = MELEE //bitflags
|
||||
var/salvageable = 1
|
||||
var/selectable = 1 // Set to 0 for passive equipment such as mining scanner or armor plates
|
||||
var/pacifist_safe = TRUE //Controls if equipment can be used to attack by a pacifist.
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/update_chassis_page()
|
||||
if(chassis)
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
equip_cooldown = 15
|
||||
energy_drain = 10
|
||||
force = 15
|
||||
pacifist_safe = FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/drill/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
energy_drain = 10
|
||||
var/dam_force = 20
|
||||
var/obj/mecha/working/ripley/cargo_holder
|
||||
pacifist_safe = FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/can_attach(obj/mecha/working/ripley/M as obj)
|
||||
if(..())
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
energy_drain = 30
|
||||
projectile = /obj/item/projectile/beam/laser
|
||||
fire_sound = 'sound/weapons/laser.ogg'
|
||||
pacifist_safe = FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy
|
||||
equip_cooldown = 15
|
||||
@@ -102,7 +103,7 @@
|
||||
energy_drain = 500
|
||||
projectile = /obj/item/projectile/energy/tesla/cannon
|
||||
fire_sound = 'sound/magic/lightningbolt.ogg'
|
||||
|
||||
pacifist_safe = FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/pulse
|
||||
equip_cooldown = 30
|
||||
@@ -112,6 +113,7 @@
|
||||
energy_drain = 120
|
||||
projectile = /obj/item/projectile/beam/pulse/heavy
|
||||
fire_sound = 'sound/weapons/marauder.ogg'
|
||||
pacifist_safe = FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma
|
||||
equip_cooldown = 10
|
||||
@@ -124,6 +126,7 @@
|
||||
energy_drain = 30
|
||||
projectile = /obj/item/projectile/plasma/adv/mech
|
||||
fire_sound = 'sound/weapons/plasma_cutter.ogg'
|
||||
pacifist_safe = FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma/can_attach(obj/mecha/working/M)
|
||||
if(..()) //combat mech
|
||||
@@ -243,6 +246,7 @@
|
||||
projectile = /obj/item/projectile/bullet/incendiary/fnx99
|
||||
projectiles = 24
|
||||
projectile_energy_cost = 15
|
||||
pacifist_safe = FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced
|
||||
name = "\improper S.H.H. \"Quietus\" Carbine"
|
||||
@@ -253,6 +257,7 @@
|
||||
projectile = /obj/item/projectile/bullet/mime
|
||||
projectiles = 6
|
||||
projectile_energy_cost = 50
|
||||
pacifist_safe = FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot
|
||||
name = "\improper LBX AC 10 \"Scattershot\""
|
||||
@@ -264,6 +269,7 @@
|
||||
projectile_energy_cost = 25
|
||||
projectiles_per_shot = 4
|
||||
variance = 25
|
||||
pacifist_safe = FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg
|
||||
name = "\improper Ultra AC 2"
|
||||
@@ -277,6 +283,7 @@
|
||||
variance = 6
|
||||
randomspread = 1
|
||||
projectile_delay = 2
|
||||
pacifist_safe = FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
|
||||
name = "\improper SRM-8 missile rack"
|
||||
@@ -287,6 +294,7 @@
|
||||
projectiles = 8
|
||||
projectile_energy_cost = 1000
|
||||
equip_cooldown = 60
|
||||
pacifist_safe = FALSE
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher
|
||||
|
||||
@@ -440,11 +440,24 @@
|
||||
target = safepick(view(3,target))
|
||||
if(!target)
|
||||
return
|
||||
|
||||
var/mob/living/L = user
|
||||
var/obj/structure/closet/C = target
|
||||
if(!Adjacent(target))
|
||||
if(selected && selected.is_ranged())
|
||||
if(L.has_trait(TRAIT_PACIFISM) && !selected.pacifist_safe)
|
||||
to_chat(user, "<span class='warning'>You don't want to harm other living beings!</span>")
|
||||
return
|
||||
if(selected.action(target,params))
|
||||
selected.start_cooldown()
|
||||
else if(selected && selected.is_melee())
|
||||
if(isliving(target) && !selected.pacifist_safe && L.has_trait(TRAIT_PACIFISM))
|
||||
to_chat(user, "<span class='warning'>You don't want to harm other living beings!</span>")
|
||||
return
|
||||
if(istype(C) && L.has_trait(TRAIT_PACIFISM) && !selected.pacifist_safe && !istype(selected,/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/))
|
||||
for(var/mob/living/M in C)
|
||||
to_chat(user, "<span class='warning'>There's someone in there! I don't want to hurt them.</span>")
|
||||
return
|
||||
if(selected.action(target,params))
|
||||
selected.start_cooldown()
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user