mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 13:05:44 +01:00
Unnerf security's non-lethals, revert pain decay changes. (#11305)
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
var/projectile_type = /obj/item/projectile/beam/practice //also passed to turrets
|
||||
var/modifystate
|
||||
var/charge_meter = 1 //if set, the icon state will be chosen based on the current charge
|
||||
var/list/required_firemode_auth //This list matches with firemode index, used to determine which firemodes get unlocked with what level of authorization.
|
||||
|
||||
//self-recharging
|
||||
var/self_recharge = 0 //if set, the weapon will recharge itself
|
||||
|
||||
@@ -15,17 +15,18 @@
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 2000)
|
||||
projectile_type = /obj/item/projectile/energy/disruptorstun
|
||||
secondary_projectile_type = /obj/item/projectile/energy/blaster
|
||||
max_shots = 8
|
||||
max_shots = 10
|
||||
charge_cost = 150
|
||||
accuracy = 1
|
||||
has_item_ratio = FALSE
|
||||
modifystate = "disruptorpistolstun"
|
||||
sel_mode = 1
|
||||
var/selectframecheck = FALSE
|
||||
firemodes = list(
|
||||
list(mode_name="stun", projectile_type=/obj/item/projectile/energy/disruptorstun, modifystate="disruptorpistolstun", fire_sound = 'sound/weapons/gunshot/bolter.ogg'),
|
||||
list(mode_name="lethal", projectile_type=/obj/item/projectile/energy/blaster/disruptor, modifystate="disruptorpistolkill", recoil = 1, fire_sound = 'sound/weapons/gunshot/bolter.ogg')
|
||||
)
|
||||
required_firemode_auth = list(WIRELESS_PIN_STUN, WIRELESS_PIN_LETHAL)
|
||||
var/selectframecheck = FALSE
|
||||
|
||||
/obj/item/gun/energy/disruptorpistol/security
|
||||
pin = /obj/item/device/firing_pin/wireless
|
||||
@@ -34,7 +35,7 @@
|
||||
name = "miniature disruptor pistol"
|
||||
desc = "A Nanotrasen designed blaster pistol with two settings: stun and lethal. This is the miniature version."
|
||||
icon = 'icons/obj/guns/disruptorpistol/disruptorpistolc.dmi'
|
||||
max_shots = 6
|
||||
max_shots = 8
|
||||
force = 3
|
||||
slot_flags = SLOT_BELT|SLOT_HOLSTER|SLOT_POCKET
|
||||
w_class = ITEMSIZE_SMALL
|
||||
@@ -46,7 +47,7 @@
|
||||
name = "magnum disruptor pistol"
|
||||
desc = "A Nanotrasen designed blaster pistol with two settings: stun and lethal. This is the magnum version."
|
||||
icon = 'icons/obj/guns/disruptorpistol/disruptorpistolm.dmi'
|
||||
max_shots = 12
|
||||
max_shots = 15
|
||||
force = 6
|
||||
|
||||
/obj/item/gun/energy/disruptorpistol/magnum/security
|
||||
|
||||
@@ -70,7 +70,7 @@ Firing pins as a rule can't be removed without replacing them, blame a really sh
|
||||
return 1
|
||||
|
||||
/obj/item/device/firing_pin/proc/auth_fail(mob/living/carbon/human/user)
|
||||
user.show_message(fail_message, 1)
|
||||
to_chat(user, fail_message)
|
||||
if(selfdestruct)//sound stolen from the lawgiver. todo, remove this from the lawgiver. there can only be one.
|
||||
user.show_message("<span class='danger'>SELF-DESTRUCTING...</span><br>", 1)
|
||||
visible_message("<span class='danger'>\The [gun] explodes!</span>")
|
||||
@@ -235,11 +235,11 @@ var/list/wireless_firing_pins = list() //A list of all initialized wireless firi
|
||||
desc = "This firing pin is wirelessly controlled. On automatic mode it allow allows weapons to be fired on stun unless the alert level is elevated. Otherwise, it can be controlled from a firearm control console."
|
||||
fail_message = "<span class='warning'>The wireless-control firing pin clicks!</span>"
|
||||
var/registered_user = null
|
||||
var/lockstatus = WIRELESS_PIN_AUTOMATIC
|
||||
var/lock_status = WIRELESS_PIN_AUTOMATIC
|
||||
|
||||
/obj/item/device/firing_pin/wireless/examine_info(mob/user)
|
||||
var/wireless_description
|
||||
switch(lockstatus)
|
||||
switch(lock_status)
|
||||
if(WIRELESS_PIN_AUTOMATIC)
|
||||
wireless_description = "is in automatic mode"
|
||||
if(WIRELESS_PIN_DISABLED)
|
||||
@@ -248,7 +248,7 @@ var/list/wireless_firing_pins = list() //A list of all initialized wireless firi
|
||||
wireless_description = "is in stun-only mode"
|
||||
if(WIRELESS_PIN_LETHAL)
|
||||
wireless_description = "is in unrestricted mode"
|
||||
to_chat(user, "The wireless-control firing pin [wireless_description].")
|
||||
to_chat(user, SPAN_NOTICE("The wireless-control firing pin <b>[wireless_description]</b>."))
|
||||
|
||||
/obj/item/device/firing_pin/wireless/Initialize() //Adds wireless pins to the list of initialized wireless firing pins.
|
||||
wireless_firing_pins += src
|
||||
@@ -259,9 +259,8 @@ var/list/wireless_firing_pins = list() //A list of all initialized wireless firi
|
||||
return ..()
|
||||
|
||||
/*
|
||||
The return of this pin_auth is dependent on the wireless pin's lockstatus. For the purposes of this, only energy projectiles
|
||||
that have a taser_effect are considered "stun" projectiles. All ballistic firearms are considered as being lethal, regardless
|
||||
of ammunition loaded. Behaviours should be as follows:
|
||||
The return of this pin_auth is dependent on the wireless pin's lock_status. The required_firemode_auth list has to match up index-wise with the firemodes.
|
||||
All ballistic firearms are considered as being lethal, regardless of ammunition loaded. Behaviours should be as follows:
|
||||
Automatic: The weapon will only fire on stun while the security level is Green or Blue. On Yellow, Red & Delta alert the weapon is unrestricted
|
||||
Disabled: The weapon will not fire under any circumstance.
|
||||
Stun-Only: The weapon will only fire on stun regardless of the current security level.
|
||||
@@ -269,81 +268,73 @@ var/list/wireless_firing_pins = list() //A list of all initialized wireless firi
|
||||
*/
|
||||
/obj/item/device/firing_pin/wireless/pin_auth(mob/living/user)
|
||||
if(!registered_user)
|
||||
fail_message = "Unable to fire - User not registered"
|
||||
fail_message = SPAN_WARNING("Unable to fire: no registered user detected.")
|
||||
return FALSE
|
||||
|
||||
if(emagged)
|
||||
return TRUE
|
||||
|
||||
if(lockstatus == WIRELESS_PIN_DISABLED)
|
||||
fail_message = "Unable to fire - Weapon Disabled"
|
||||
if(lock_status == WIRELESS_PIN_DISABLED)
|
||||
fail_message = SPAN_WARNING("Unable to fire: firearm remotely disabled.")
|
||||
return FALSE
|
||||
|
||||
else if(lockstatus == WIRELESS_PIN_LETHAL)
|
||||
else if(lock_status == WIRELESS_PIN_LETHAL)
|
||||
return TRUE
|
||||
|
||||
else if(lockstatus == WIRELESS_PIN_STUN)
|
||||
else if(lock_status == WIRELESS_PIN_STUN)
|
||||
if(istype(gun, /obj/item/gun/energy))
|
||||
var/obj/item/gun/energy/EG = gun
|
||||
var/obj/item/projectile/energy/P = new EG.projectile_type
|
||||
if(!P)
|
||||
fail_message = "Unable to fire - Internal Error"
|
||||
return FALSE
|
||||
if(!P.taser_effect)
|
||||
fail_message = "Unable to fire - Weapon not in stun-mode"
|
||||
if(EG.required_firemode_auth[EG.sel_mode] == WIRELESS_PIN_LETHAL)
|
||||
fail_message = SPAN_WARNING("Unable to fire: firearm not in stun mode.")
|
||||
return FALSE
|
||||
return TRUE
|
||||
else
|
||||
fail_message = "Unable to fire - Weapon has not stun-mode"
|
||||
fail_message = SPAN_WARNING("Unable to fire: no stun mode detected.")
|
||||
return FALSE
|
||||
|
||||
else //Automatic Mode
|
||||
if(istype(gun, /obj/item/gun/energy))
|
||||
var/obj/item/gun/energy/EG = gun
|
||||
var/obj/item/projectile/energy/P = new EG.projectile_type
|
||||
if(!P)
|
||||
fail_message = "Unable to fire - Internal Error"
|
||||
return FALSE
|
||||
if(P.taser_effect) //The gun can always be used on stun
|
||||
if(EG.required_firemode_auth[EG.sel_mode] == WIRELESS_PIN_STUN)
|
||||
return TRUE
|
||||
else if (security_level == SEC_LEVEL_YELLOW || security_level == SEC_LEVEL_RED)
|
||||
return TRUE
|
||||
else
|
||||
fail_message = "Unable to fire - Insufficient security level for lethal mode"
|
||||
fail_message = SPAN_WARNING("Unable to fire: insufficient security level.")
|
||||
return FALSE
|
||||
else
|
||||
if (security_level == SEC_LEVEL_YELLOW || security_level == SEC_LEVEL_RED)
|
||||
return TRUE
|
||||
else
|
||||
fail_message = "Unable to fire - Insufficient security level for lethal mode"
|
||||
fail_message = SPAN_WARNING("Unable to fire: insufficient security level.")
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/item/device/firing_pin/wireless/proc/set_mode(var/new_mode) // Changes the current lockstatus of the weapon, and sends a message and sfx to whoever is holding it.
|
||||
/obj/item/device/firing_pin/wireless/proc/set_mode(var/new_mode) // Changes the current lock_status of the weapon, and sends a message and sfx to whoever is holding it.
|
||||
var/mob/user = get_holding_mob(src)
|
||||
|
||||
if(new_mode == lockstatus)
|
||||
if(new_mode == lock_status)
|
||||
return
|
||||
|
||||
else if(new_mode == WIRELESS_PIN_AUTOMATIC)
|
||||
playsound(user, 'sound/weapons/laser_safetyon.ogg')
|
||||
to_chat(user, SPAN_NOTICE("<b>\The [gun.name]'s wireless-control firing pin is now set to automatic.</b>"))
|
||||
lockstatus = WIRELESS_PIN_AUTOMATIC
|
||||
lock_status = WIRELESS_PIN_AUTOMATIC
|
||||
|
||||
else if(new_mode == WIRELESS_PIN_DISABLED)
|
||||
playsound(user, 'sound/weapons/laser_safetyoff.ogg')
|
||||
to_chat(user, SPAN_WARNING("<b>\The wireless-control firing pin locks \the [gun.name]'s trigger!</b>"))
|
||||
lockstatus = WIRELESS_PIN_DISABLED
|
||||
lock_status = WIRELESS_PIN_DISABLED
|
||||
|
||||
else if(new_mode == WIRELESS_PIN_STUN)
|
||||
playsound(user, 'sound/weapons/laser_safetyon.ogg')
|
||||
to_chat(user, SPAN_NOTICE("<b>\The [gun.name]'s wireless-control firing pin is now set to stun only.</b>"))
|
||||
lockstatus = WIRELESS_PIN_STUN
|
||||
lock_status = WIRELESS_PIN_STUN
|
||||
|
||||
else if(new_mode == WIRELESS_PIN_LETHAL)
|
||||
playsound(user, 'sound/weapons/laser_safetyon.ogg')
|
||||
to_chat(user, SPAN_NOTICE("<b>\The [gun.name]'s wireless-control firing pin is now unrestricted.</b>"))
|
||||
lockstatus = WIRELESS_PIN_LETHAL
|
||||
lock_status = WIRELESS_PIN_LETHAL
|
||||
|
||||
return
|
||||
|
||||
@@ -355,6 +346,7 @@ var/list/wireless_firing_pins = list() //A list of all initialized wireless firi
|
||||
registered_user = null
|
||||
return TRUE
|
||||
to_chat(user, SPAN_NOTICE("You press your ID against the RFID reader and it chimes as it registers your identity."))
|
||||
playsound(user, 'sound/machines/chime.ogg', 20)
|
||||
registered_user = idcard.registered_name
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
//used for shooting at blank range, you shouldn't be able to miss
|
||||
var/can_miss = 0
|
||||
|
||||
var/taser_effect = 0 //If set then the projectile will apply it's agony damage using stun_effect_act() to mobs it hits, and other damage will be ignored
|
||||
|
||||
//Effects
|
||||
var/damage = 10
|
||||
var/damage_type = BRUTE //BRUTE, BURN, TOX, OXY, CLONE, PAIN are the only things that should be in here
|
||||
@@ -121,7 +119,8 @@
|
||||
if(hit_effect)
|
||||
new hit_effect(target.loc)
|
||||
|
||||
L.apply_effects(stun, weaken, paralyze, 0, stutter, eyeblur, drowsy, agony, incinerate, blocked)
|
||||
L.apply_effects(0, weaken, paralyze, 0, stutter, eyeblur, drowsy, 0, incinerate, blocked)
|
||||
L.stun_effect_act(stun, agony, def_zone, src, damage_flags)
|
||||
L.apply_damage(irradiate, IRRADIATE, damage_flags = DAM_DISPERSED) //radiation protection is handled separately from other armor types.
|
||||
return 1
|
||||
|
||||
|
||||
@@ -170,12 +170,11 @@
|
||||
/obj/item/projectile/beam/stun
|
||||
name = "stun beam"
|
||||
icon_state = "stun"
|
||||
nodamage = 1
|
||||
taser_effect = 1
|
||||
sharp = 0
|
||||
damage = 1
|
||||
sharp = FALSE
|
||||
eyeblur = 1
|
||||
agony = 40
|
||||
damage_type = PAIN
|
||||
agony = 45
|
||||
damage_type = BURN
|
||||
|
||||
muzzle_type = /obj/effect/projectile/muzzle/stun
|
||||
tracer_type = /obj/effect/projectile/tracer/stun
|
||||
@@ -194,8 +193,8 @@
|
||||
/obj/item/projectile/beam/mousegun
|
||||
name = "electrical arc"
|
||||
icon_state = "stun"
|
||||
nodamage = 1
|
||||
damage_type = PAIN
|
||||
damage = 1
|
||||
damage_type = BURN
|
||||
|
||||
muzzle_type = /obj/effect/projectile/muzzle/stun
|
||||
tracer_type = /obj/effect/projectile/tracer/stun
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
//Overall less damage than slugs in exchange for more damage at very close range and more embedding
|
||||
/obj/item/projectile/bullet/pellet/shotgun
|
||||
name = "shrapnel"
|
||||
damage = 30
|
||||
damage = 14
|
||||
pellets = 6
|
||||
range_step = 1
|
||||
spread_step = 10
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
icon_state = "spark"
|
||||
damage = 2 //Flavor.
|
||||
damage_type = BURN
|
||||
taser_effect = 1
|
||||
agony = 40
|
||||
eyeblur = 1
|
||||
//Damage will be handled on the MOB side, to prevent window shattering.
|
||||
@@ -58,7 +57,6 @@
|
||||
/obj/item/projectile/energy/electrode/stunshot
|
||||
name = "stunshot"
|
||||
damage = 5
|
||||
taser_effect = 1
|
||||
agony = 80
|
||||
|
||||
/obj/item/projectile/energy/declone
|
||||
@@ -78,13 +76,15 @@
|
||||
/obj/item/projectile/energy/bolt
|
||||
name = "bolt"
|
||||
icon_state = "cbbolt"
|
||||
damage_type = PAIN
|
||||
damage = 1
|
||||
damage_type = BURN
|
||||
agony = 45
|
||||
stutter = 10
|
||||
|
||||
/obj/item/projectile/energy/bolt/large
|
||||
name = "largebolt"
|
||||
damage_type = PAIN
|
||||
damage = 2
|
||||
damage_type = BURN
|
||||
agony = 60
|
||||
|
||||
/obj/item/projectile/energy/neurotoxin
|
||||
@@ -208,10 +208,10 @@
|
||||
/obj/item/projectile/energy/disruptorstun
|
||||
name = "disruptor bolt"
|
||||
icon_state = "blue_laser"
|
||||
agony = 30
|
||||
damage = 1
|
||||
agony = 40
|
||||
speed = 0.4
|
||||
damage_type = PAIN // Can't blow your own head off with a stunbolt.
|
||||
taser_effect = TRUE
|
||||
damage_type = BURN
|
||||
eyeblur = TRUE
|
||||
pass_flags = PASSTABLE
|
||||
muzzle_type = /obj/effect/projectile/muzzle/bolt
|
||||
|
||||
Reference in New Issue
Block a user