Kills off /obj/item/device (#6561)

This commit is contained in:
kevinz000
2018-04-29 22:06:58 -07:00
committed by Poojawa
parent ab3035a4ea
commit 3369c804b2
538 changed files with 6728 additions and 6707 deletions
+6 -6
View File
@@ -39,9 +39,9 @@
lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
var/obj/item/device/firing_pin/pin = /obj/item/device/firing_pin //standard firing pin for most guns
var/obj/item/firing_pin/pin = /obj/item/firing_pin //standard firing pin for most guns
var/obj/item/device/flashlight/gun_light
var/obj/item/flashlight/gun_light
var/can_flashlight = 0
var/obj/item/kitchen/knife/bayonet
var/can_bayonet = FALSE
@@ -334,10 +334,10 @@
/obj/item/gun/attackby(obj/item/I, mob/user, params)
if(user.a_intent == INTENT_HARM)
return ..()
else if(istype(I, /obj/item/device/flashlight/seclite))
else if(istype(I, /obj/item/flashlight/seclite))
if(!can_flashlight)
return ..()
var/obj/item/device/flashlight/seclite/S = I
var/obj/item/flashlight/seclite/S = I
if(!gun_light)
if(!user.transferItemToLoc(I, src))
return
@@ -362,7 +362,7 @@
update_icon()
else if(istype(I, /obj/item/screwdriver))
if(gun_light)
var/obj/item/device/flashlight/seclite/S = gun_light
var/obj/item/flashlight/seclite/S = gun_light
to_chat(user, "<span class='notice'>You unscrew the seclite from \the [src].</span>")
gun_light = null
S.forceMove(get_turf(user))
@@ -457,7 +457,7 @@
/obj/item/gun/proc/unlock() //used in summon guns and as a convience for admins
if(pin)
qdel(pin)
pin = new /obj/item/device/firing_pin
pin = new /obj/item/firing_pin
/////////////
// ZOOMING //
@@ -15,7 +15,7 @@
pin = null
/obj/item/gun/ballistic/automatic/proto/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/update_icon()
..()
@@ -91,13 +91,13 @@
fire_sound = 'sound/weapons/gunshot_smg.ogg'
fire_delay = 2
burst_size = 2
pin = /obj/item/device/firing_pin/implant/pindicate
pin = /obj/item/firing_pin/implant/pindicate
can_bayonet = TRUE
knife_x_offset = 26
knife_y_offset = 12
/obj/item/gun/ballistic/automatic/c20r/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/c20r/Initialize()
. = ..()
@@ -148,7 +148,7 @@
var/obj/item/gun/ballistic/revolver/grenadelauncher/underbarrel
burst_size = 3
fire_delay = 2
pin = /obj/item/device/firing_pin/implant/pindicate
pin = /obj/item/firing_pin/implant/pindicate
/obj/item/gun/ballistic/automatic/m90/Initialize()
. = ..()
@@ -156,7 +156,7 @@
update_icon()
/obj/item/gun/ballistic/automatic/m90/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/m90/unrestricted/Initialize()
. = ..()
@@ -247,11 +247,11 @@
can_suppress = FALSE
burst_size = 1
fire_delay = 0
pin = /obj/item/device/firing_pin/implant/pindicate
pin = /obj/item/firing_pin/implant/pindicate
actions_types = list()
/obj/item/gun/ballistic/automatic/shotgun/bulldog/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/shotgun/bulldog/Initialize()
. = ..()
@@ -286,10 +286,10 @@
can_suppress = FALSE
burst_size = 3
fire_delay = 1
pin = /obj/item/device/firing_pin/implant/pindicate
pin = /obj/item/firing_pin/implant/pindicate
/obj/item/gun/ballistic/automatic/l6_saw/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/l6_saw/examine(mob/user)
@@ -377,7 +377,7 @@
/obj/item/gun/ballistic/automatic/sniper_rifle/syndicate
name = "syndicate sniper rifle"
desc = "An illegally modified .50 cal sniper rifle with suppression compatibility. Quickscoping still doesn't work."
pin = /obj/item/device/firing_pin/implant/pindicate
pin = /obj/item/firing_pin/implant/pindicate
// Old Semi-Auto Rifle //
@@ -9,10 +9,10 @@
mag_type = /obj/item/ammo_box/magazine/internal/grenadelauncher
fire_sound = 'sound/weapons/grenadelaunch.ogg'
w_class = WEIGHT_CLASS_NORMAL
pin = /obj/item/device/firing_pin/implant/pindicate
pin = /obj/item/firing_pin/implant/pindicate
/obj/item/gun/ballistic/revolver/grenadelauncher/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/revolver/grenadelauncher/attackby(obj/item/A, mob/user, params)
..()
@@ -25,7 +25,7 @@
icon = 'icons/mecha/mecha_equipment.dmi'
icon_state = "mecha_grenadelnchr"
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/grenademulti
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/revolver/grenadelauncher/cyborg/attack_self()
return
@@ -148,7 +148,7 @@
icon_state = "goldrevolver"
fire_sound = 'sound/weapons/resonator_blast.ogg'
recoil = 8
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/revolver/nagant
name = "nagant revolver"
@@ -238,7 +238,7 @@
/obj/item/gun/ballistic/revolver/russian/soul/shoot_self(mob/living/user)
..()
var/obj/item/device/soulstone/anybody/SS = new /obj/item/device/soulstone/anybody(get_turf(src))
var/obj/item/soulstone/anybody/SS = new /obj/item/soulstone/anybody(get_turf(src))
if(!SS.transfer_soul("FORCE", user)) //Something went wrong
qdel(SS)
return
@@ -146,7 +146,7 @@
name = "arcane barrage"
desc = "Pew Pew Pew."
fire_sound = 'sound/weapons/emitter.ogg'
pin = /obj/item/device/firing_pin/magic
pin = /obj/item/firing_pin/magic
icon_state = "arcane_barrage"
item_state = "arcane_barrage"
can_bayonet = FALSE
@@ -15,7 +15,7 @@
casing_ejector = FALSE
/obj/item/gun/ballistic/automatic/toy/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/toy/pistol
name = "foam force pistol"
@@ -40,10 +40,10 @@
return ..()
/obj/item/gun/ballistic/automatic/toy/pistol/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/toy/pistol/riot/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/shotgun/toy
name = "foam force shotgun"
@@ -63,7 +63,7 @@
qdel(chambered)
/obj/item/gun/ballistic/shotgun/toy/unrestricted
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/shotgun/toy/crossbow
name = "foam force crossbow"
@@ -87,7 +87,7 @@
clumsy_check = FALSE
/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted //Use this for actual toys
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
mag_type = /obj/item/ammo_box/magazine/toy/smgm45
/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted/riot
@@ -104,7 +104,7 @@
clumsy_check = FALSE
/obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted //Use this for actual toys
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
mag_type = /obj/item/ammo_box/magazine/toy/m762
/obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted/riot
@@ -22,7 +22,7 @@
can_flashlight = 0 // Can't attach or detach the flashlight, and override it's icon update
/obj/item/gun/energy/e_gun/mini/Initialize()
gun_light = new /obj/item/device/flashlight/seclite(src)
gun_light = new /obj/item/flashlight/seclite(src)
return ..()
/obj/item/gun/energy/e_gun/mini/update_icon()
@@ -66,7 +66,7 @@
item_state = "shotgun"
desc = "A combat shotgun gutted and refitted with an internal laser system. Can switch between taser and scattered disabler shots."
shaded_charge = 0
pin = /obj/item/device/firing_pin/implant/mindshield
pin = /obj/item/firing_pin/implant/mindshield
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter/disabler, /obj/item/ammo_casing/energy/electrode)
///Laser Cannon
@@ -118,7 +118,7 @@
ammo_type = list(/obj/item/ammo_casing/energy/laser/bluetag)
item_flags = NONE
clumsy_check = FALSE
pin = /obj/item/device/firing_pin/tag/blue
pin = /obj/item/firing_pin/tag/blue
ammo_x_offset = 2
selfcharge = TRUE
@@ -132,7 +132,7 @@
ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag)
item_flags = NONE
clumsy_check = FALSE
pin = /obj/item/device/firing_pin/tag/red
pin = /obj/item/firing_pin/tag/red
ammo_x_offset = 2
selfcharge = TRUE
@@ -15,7 +15,7 @@
return
/obj/item/gun/energy/pulse/prize
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/energy/pulse/prize/Initialize()
. = ..()
@@ -33,7 +33,7 @@
. = ..()
/obj/item/gun/energy/pulse/loyalpin
pin = /obj/item/device/firing_pin/implant/mindshield
pin = /obj/item/firing_pin/implant/mindshield
/obj/item/gun/energy/pulse/carbine
name = "pulse carbine"
@@ -48,7 +48,7 @@
flight_y_offset = 12
/obj/item/gun/energy/pulse/carbine/loyalpin
pin = /obj/item/device/firing_pin/implant/mindshield
pin = /obj/item/firing_pin/implant/mindshield
/obj/item/gun/energy/pulse/pistol
name = "pulse pistol"
@@ -60,7 +60,7 @@
cell_type = "/obj/item/stock_parts/cell/pulse/pistol"
/obj/item/gun/energy/pulse/pistol/loyalpin
pin = /obj/item/device/firing_pin/implant/mindshield
pin = /obj/item/firing_pin/implant/mindshield
/obj/item/gun/energy/pulse/destroyer
name = "pulse destroyer"
@@ -267,7 +267,7 @@
/obj/item/gun/energy/temperature/security
name = "security temperature gun"
desc = "A weapon that can only be used to its full potential by the truly robust."
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/energy/laser/instakill
name = "instakill rifle"
+1 -1
View File
@@ -18,7 +18,7 @@
var/no_den_usage
clumsy_check = 0
trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses magic instead
pin = /obj/item/device/firing_pin/magic
pin = /obj/item/firing_pin/magic
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' //not really a gun and some toys use these inhands
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
@@ -82,7 +82,7 @@
cell_type = /obj/item/stock_parts/cell/infinite
aiming_time = 0
recoil = 0
pin = /obj/item/device/firing_pin
pin = /obj/item/firing_pin
/obj/item/gun/energy/beam_rifle/equipped(mob/user)
set_user(user)
@@ -11,7 +11,7 @@
clumsy_check = FALSE
randomspread = FALSE
var/obj/item/device/transfer_valve/bomb
var/obj/item/transfer_valve/bomb
/obj/item/gun/blastcannon/Initialize()
. = ..()
@@ -44,8 +44,8 @@
desc = initial(desc)
/obj/item/gun/blastcannon/attackby(obj/O, mob/user)
if(istype(O, /obj/item/device/transfer_valve))
var/obj/item/device/transfer_valve/T = O
if(istype(O, /obj/item/transfer_valve))
var/obj/item/transfer_valve/T = O
if(!T.tank_one || !T.tank_two)
to_chat(user, "<span class='warning'>What good would an incomplete bomb do?</span>")
return FALSE
+31 -31
View File
@@ -1,4 +1,4 @@
/obj/item/device/firing_pin
/obj/item/firing_pin
name = "electronic firing pin"
desc = "A small authentication device, to be inserted into a firearm receiver to allow operation. NT safety regulations require all new designs to incorporate one."
icon = 'icons/obj/device.dmi'
@@ -14,12 +14,12 @@
var/obj/item/gun/gun
/obj/item/device/firing_pin/New(newloc)
/obj/item/firing_pin/New(newloc)
..()
if(istype(newloc, /obj/item/gun))
gun = newloc
/obj/item/device/firing_pin/afterattack(atom/target, mob/user, proximity_flag)
/obj/item/firing_pin/afterattack(atom/target, mob/user, proximity_flag)
if(proximity_flag)
if(istype(target, /obj/item/gun))
var/obj/item/gun/G = target
@@ -36,27 +36,27 @@
else
to_chat(user, "<span class ='notice'>This firearm already has a firing pin installed.</span>")
/obj/item/device/firing_pin/emag_act(mob/user)
/obj/item/firing_pin/emag_act(mob/user)
if(obj_flags & EMAGGED)
return
obj_flags |= EMAGGED
to_chat(user, "<span class='notice'>You override the authentication mechanism.</span>")
/obj/item/device/firing_pin/proc/gun_insert(mob/living/user, obj/item/gun/G)
/obj/item/firing_pin/proc/gun_insert(mob/living/user, obj/item/gun/G)
gun = G
forceMove(gun)
gun.pin = src
return
/obj/item/device/firing_pin/proc/gun_remove(mob/living/user)
/obj/item/firing_pin/proc/gun_remove(mob/living/user)
gun.pin = null
gun = null
return
/obj/item/device/firing_pin/proc/pin_auth(mob/living/user)
/obj/item/firing_pin/proc/pin_auth(mob/living/user)
return 1
/obj/item/device/firing_pin/proc/auth_fail(mob/living/user)
/obj/item/firing_pin/proc/auth_fail(mob/living/user)
user.show_message(fail_message, 1)
if(selfdestruct)
user.show_message("<span class='danger'>SELF-DESTRUCTING...</span><br>", 1)
@@ -67,45 +67,45 @@
/obj/item/device/firing_pin/magic
/obj/item/firing_pin/magic
name = "magic crystal shard"
desc = "A small enchanted shard which allows magical weapons to fire."
// Test pin, works only near firing range.
/obj/item/device/firing_pin/test_range
/obj/item/firing_pin/test_range
name = "test-range firing pin"
desc = "This safety firing pin allows weapons to be fired within proximity to a firing range."
fail_message = "<span class='warning'>TEST RANGE CHECK FAILED.</span>"
pin_removeable = 1
/obj/item/device/firing_pin/test_range/pin_auth(mob/living/user)
/obj/item/firing_pin/test_range/pin_auth(mob/living/user)
for(var/obj/machinery/magnetic_controller/M in range(user, 3))
return 1
return 0
// Implant pin, checks for implant
/obj/item/device/firing_pin/implant
/obj/item/firing_pin/implant
name = "implant-keyed firing pin"
desc = "This is a security firing pin which only authorizes users who are implanted with a certain device."
fail_message = "<span class='warning'>IMPLANT CHECK FAILED.</span>"
var/obj/item/implant/req_implant = null
/obj/item/device/firing_pin/implant/pin_auth(mob/living/user)
/obj/item/firing_pin/implant/pin_auth(mob/living/user)
if(istype(user))
for(var/obj/item/implant/I in user.implants)
if(req_implant && I.type == req_implant)
return 1
return 0
/obj/item/device/firing_pin/implant/mindshield
/obj/item/firing_pin/implant/mindshield
name = "mindshield firing pin"
desc = "This Security firing pin authorizes the weapon for only mindshield-implanted users."
icon_state = "firing_pin_loyalty"
req_implant = /obj/item/implant/mindshield
/obj/item/device/firing_pin/implant/pindicate
/obj/item/firing_pin/implant/pindicate
name = "syndicate firing pin"
icon_state = "firing_pin_pindi"
req_implant = /obj/item/implant/weapons_auth
@@ -114,49 +114,49 @@
// Honk pin, clown's joke item.
// Can replace other pins. Replace a pin in cap's laser for extra fun!
/obj/item/device/firing_pin/clown
/obj/item/firing_pin/clown
name = "hilarious firing pin"
desc = "Advanced clowntech that can convert any firearm into a far more useful object."
color = "#FFFF00"
fail_message = "<span class='warning'>HONK!</span>"
force_replace = 1
/obj/item/device/firing_pin/clown/pin_auth(mob/living/user)
/obj/item/firing_pin/clown/pin_auth(mob/living/user)
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
return 0
// Ultra-honk pin, clown's deadly joke item.
// A gun with ultra-honk pin is useful for clown and useless for everyone else.
/obj/item/device/firing_pin/clown/ultra/pin_auth(mob/living/user)
/obj/item/firing_pin/clown/ultra/pin_auth(mob/living/user)
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
if(!(user.has_trait(TRAIT_CLUMSY)) && !(user.mind && user.mind.assigned_role == "Clown"))
return 0
return 1
/obj/item/device/firing_pin/clown/ultra/gun_insert(mob/living/user, obj/item/gun/G)
/obj/item/firing_pin/clown/ultra/gun_insert(mob/living/user, obj/item/gun/G)
..()
G.clumsy_check = 0
/obj/item/device/firing_pin/clown/ultra/gun_remove(mob/living/user)
/obj/item/firing_pin/clown/ultra/gun_remove(mob/living/user)
gun.clumsy_check = initial(gun.clumsy_check)
..()
// Now two times deadlier!
/obj/item/device/firing_pin/clown/ultra/selfdestruct
/obj/item/firing_pin/clown/ultra/selfdestruct
desc = "Advanced clowntech that can convert any firearm into a far more useful object. It has a small nitrobananium charge on it."
selfdestruct = 1
// DNA-keyed pin.
// When you want to keep your toys for youself.
/obj/item/device/firing_pin/dna
/obj/item/firing_pin/dna
name = "DNA-keyed firing pin"
desc = "This is a DNA-locked firing pin which only authorizes one user. Attempt to fire once to DNA-link."
icon_state = "firing_pin_dna"
fail_message = "<span class='warning'>DNA CHECK FAILED.</span>"
var/unique_enzymes = null
/obj/item/device/firing_pin/dna/afterattack(atom/target, mob/user, proximity_flag)
/obj/item/firing_pin/dna/afterattack(atom/target, mob/user, proximity_flag)
..()
if(proximity_flag && iscarbon(target))
var/mob/living/carbon/M = target
@@ -164,14 +164,14 @@
unique_enzymes = M.dna.unique_enzymes
to_chat(user, "<span class='notice'>DNA-LOCK SET.</span>")
/obj/item/device/firing_pin/dna/pin_auth(mob/living/carbon/user)
/obj/item/firing_pin/dna/pin_auth(mob/living/carbon/user)
if(istype(user) && user.dna && user.dna.unique_enzymes)
if(user.dna.unique_enzymes == unique_enzymes)
return 1
return 0
/obj/item/device/firing_pin/dna/auth_fail(mob/living/carbon/user)
/obj/item/firing_pin/dna/auth_fail(mob/living/carbon/user)
if(!unique_enzymes)
if(istype(user) && user.dna && user.dna.unique_enzymes)
unique_enzymes = user.dna.unique_enzymes
@@ -179,20 +179,20 @@
else
..()
/obj/item/device/firing_pin/dna/dredd
/obj/item/firing_pin/dna/dredd
desc = "This is a DNA-locked firing pin which only authorizes one user. Attempt to fire once to DNA-link. It has a small explosive charge on it."
selfdestruct = 1
// Laser tag pins
/obj/item/device/firing_pin/tag
/obj/item/firing_pin/tag
name = "laser tag firing pin"
desc = "A recreational firing pin, used in laser tag units to ensure users have their vests on."
fail_message = "<span class='warning'>SUIT CHECK FAILED.</span>"
var/obj/item/clothing/suit/suit_requirement = null
var/tagcolor = ""
/obj/item/device/firing_pin/tag/pin_auth(mob/living/user)
/obj/item/firing_pin/tag/pin_auth(mob/living/user)
if(ishuman(user))
var/mob/living/carbon/human/M = user
if(istype(M.wear_suit, suit_requirement))
@@ -200,19 +200,19 @@
to_chat(user, "<span class='warning'>You need to be wearing [tagcolor] laser tag armor!</span>")
return 0
/obj/item/device/firing_pin/tag/red
/obj/item/firing_pin/tag/red
name = "red laser tag firing pin"
icon_state = "firing_pin_red"
suit_requirement = /obj/item/clothing/suit/redtag
tagcolor = "red"
/obj/item/device/firing_pin/tag/blue
/obj/item/firing_pin/tag/blue
name = "blue laser tag firing pin"
icon_state = "firing_pin_blue"
suit_requirement = /obj/item/clothing/suit/bluetag
tagcolor = "blue"
/obj/item/device/firing_pin/Destroy()
/obj/item/firing_pin/Destroy()
if(gun)
gun.pin = null
return ..()
@@ -71,7 +71,7 @@
/obj/effect/nettingportal/Initialize()
. = ..()
var/obj/item/device/radio/beacon/teletarget = null
var/obj/item/radio/beacon/teletarget = null
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
if(com.target)
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
@@ -31,7 +31,7 @@
/obj/effect/nettingportal/Initialize()
. = ..()
var/obj/item/device/beacon/teletarget = null
var/obj/item/beacon/teletarget = null
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
if(com.target)
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)