mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-13 16:13:49 +01:00
Merge pull request #5634 from Heroman3003/grenadefix
Restricts station use of manhack grenades and seismic charges
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
/obj/item/weapon/plastique/seismic/locked
|
||||
desc = "Used to dig holes in specific areas without too much extra hole. Has extra mechanism that safely implodes the bomb if it is used in close proximity to the facility."
|
||||
|
||||
/obj/item/weapon/plastique/seismic/locked/explode(var/location)
|
||||
if(!target)
|
||||
target = get_atom_on_turf(src)
|
||||
if(!target)
|
||||
target = src
|
||||
|
||||
var/turf/T = get_turf(target)
|
||||
if(T.z in using_map.map_levels)
|
||||
target.visible_message("<span class='danger'>\The [src] lets out a loud beep as safeties trigger, before imploding and falling apart.</span>")
|
||||
target.overlays -= image_overlay
|
||||
qdel(src)
|
||||
return 0
|
||||
else
|
||||
return ..()
|
||||
@@ -0,0 +1,30 @@
|
||||
/obj/item/weapon/grenade/spawnergrenade/manhacks/station/locked
|
||||
desc = "It is set to detonate in 5 seconds. It will deploy three weaponized survey drones. This one has a safety interlock that prevents release if used while in proximity to the facility."
|
||||
req_access = list(access_armory) //for toggling safety
|
||||
var/locked = 1
|
||||
|
||||
/obj/item/weapon/grenade/spawnergrenade/manhacks/station/locked/detonate()
|
||||
if(locked)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.z in using_map.map_levels)
|
||||
icon_state = initial(icon_state)
|
||||
active = 0
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/grenade/spawnergrenade/manhacks/station/locked/attackby(obj/item/I, mob/user)
|
||||
var/obj/item/weapon/card/id/id = I.GetID()
|
||||
if(istype(id))
|
||||
if(check_access(id))
|
||||
locked = !locked
|
||||
to_chat(user, "<span class='warning'>You [locked ? "enable" : "disable"] the safety lock on \the [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
user.visible_message("<span class='notice'>[user] swipes \the [I] against \the [src].</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/grenade/spawnergrenade/manhacks/station/locked/emag_act(var/remaining_charges,var/mob/user)
|
||||
..()
|
||||
locked = !locked
|
||||
to_chat(user, "<span class='warning'>You [locked ? "enable" : "disable"] the safety lock on \the [src]!</span>")
|
||||
Reference in New Issue
Block a user