Sec Lethal Armament Box (#12115)

This commit is contained in:
FluffMedic
2025-12-21 01:05:25 +01:00
committed by GitHub
parent 024818f2c9
commit f5e6d32ff1
3 changed files with 20 additions and 0 deletions
@@ -0,0 +1,18 @@
/obj/item/gunbox/sec_officer
name = "lethal armament box"
desc = "A secure box containing a non-lethal sidearm."
/obj/item/gunbox/sec_officer/attack_self(mob/living/user)
var/list/options = list()
options["Laser Pistol"] = list(/obj/item/gun/energy/gun, /obj/item/cell/device/weapon, /obj/item/cell/device/weapon)
options["Normal Pistol"] = list(/obj/item/gun/projectile/pistol, /obj/item/ammo_magazine/m9mm/compact, /obj/item/ammo_magazine/m9mm/compact, /obj/item/ammo_magazine/m9mm/compact, /obj/item/ammo_magazine/m9mm/compact)
var/choice = tgui_input_list(user,"Please, select an option.", "Lethal Gun!", options)
if(!choice)
return
if(src && choice)
var/list/things_to_spawn = options[choice]
for(var/new_type in things_to_spawn) // Spawn all the things, the gun and the ammo.
var/atom/movable/AM = new new_type(get_turf(src))
if(istype(AM, /obj/item/gun))
to_chat(user, "You have chosen \the [AM]. Say hello to your new friend.")
qdel(src)