Merge pull request #10973 from Trilbyspaceclone/put-a-pin-in-it
Station Locked firing pins
This commit is contained in:
@@ -69,13 +69,10 @@
|
||||
if(gun)
|
||||
qdel(gun)
|
||||
|
||||
|
||||
|
||||
/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/firing_pin/test_range
|
||||
name = "test-range firing pin"
|
||||
@@ -229,3 +226,16 @@
|
||||
if(gun)
|
||||
gun.pin = null
|
||||
return ..()
|
||||
|
||||
//Station Locked
|
||||
|
||||
/obj/item/firing_pin/away
|
||||
name = "station locked pin"
|
||||
desc = "A firing pin that only will fire when off the station."
|
||||
|
||||
/obj/item/firing_pin/away/pin_auth(mob/living/user)
|
||||
var/area/station_area = get_area(src)
|
||||
if(!station_area || is_station_level(station_area.z))
|
||||
to_chat(user, "<span class='warning'>The pin beeps, refusing to fire.</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user