Merge pull request #12974 from foopwo/borgotoys

Adds a couple of new toys for cyborgs.
This commit is contained in:
Casey
2022-05-15 16:14:22 -04:00
committed by CHOMPStation2
parent 1820631ada
commit 61fce152d5
5 changed files with 109 additions and 0 deletions

View File

@@ -199,7 +199,52 @@
icon_state = initial(icon_state)
else
icon_state = "[initial(icon_state)]-e"
/*
* Cyborg
*/
/obj/item/weapon/gun/projectile/cyborgtoy
name = "\improper Donk-Soft Cyborg Blaster"
desc = "Donk-Soft Cyborg Blaster! It's Donk or Don't! Adult supervision required. Use to toggle between battle and cleanup mode."
icon = 'icons/obj/gun_toy.dmi'
icon_state = "smg"
caliber = "foam"
load_method = SINGLE_CASING
max_shells = 15
var/cleanup = 0
ammo_type = /obj/item/ammo_casing/afoam_dart
projectile_type = /obj/item/projectile/bullet/foam_dart
recoil = null
handle_casings = null
/obj/item/weapon/gun/projectile/cyborgtoy/attack_self(var/mob/user)
cleanup = !cleanup
to_chat(user, "The [src] is now on [cleanup ? "cleanup" : "battle"] mode.")
/obj/item/weapon/gun/projectile/cyborgtoy/afterattack(atom/A, mob/living/user, adjacent, params)
if(cleanup)
if(!adjacent)
return 0
collectammo(A, user)
return 0
..()
/obj/item/weapon/gun/projectile/cyborgtoy/proc/collectammo(atom/A, user)
if(loaded.len >= max_shells)
to_chat(user, "The [src] is at max capacity.")
return
var/T = get_turf(A)
var/success = 0
for(var/obj/item/ammo_casing/afoam_dart/D in T)
if(loaded.len >= max_shells)
break
D.loc = src
loaded.Insert(1, D)
success = 1
if(success)
playsound(src, 'sound/machines/hiss.ogg', 50, 0)
to_chat(user, "The [src] vacuums in the darts!")
else
to_chat(user, "No Donk-Soft brand foam darts detected. Aborting.")
/*
* Laser Tag
*/