Files
Paradise/code/modules/projectiles/guns/throw/pielauncher.dm
T
ContrabangandGitHub 8352613d03 Adds CI for missing icon_states (#27063)
* Adds CI for missing icon_states

* yeah

* more fixes

* more fixes

* seems good

* moar

* fix

* yea

* hrtyhrt

* yeah

* WOE
2024-11-14 17:58:06 +00:00

37 lines
893 B
Plaintext

/obj/item/gun/throw/piecannon
name = "pie cannon"
desc = "A projectile weapon that fires pies."
icon_state = "piecannon1"
w_class = WEIGHT_CLASS_HUGE
throw_speed = 2
throw_range = 3
force = 5
clumsy_check = FALSE
valid_projectile_type = /obj/item/food/pie
max_capacity = 5
projectile_speed = 2
projectile_range = 30
/obj/item/gun/throw/piecannon/Initialize(mapload)
. = ..()
for(var/i in 1 to max_capacity)
var/obj/item/food/pie/P = new (src)
loaded_projectiles += P
process_chamber()
/obj/item/gun/throw/piecannon/notify_ammo_count()
return "<span class='notice'>[src] has [get_ammocount()] of [max_capacity] pies left.</span>"
/obj/item/gun/throw/piecannon/update_icon_state()
if(to_launch)
icon_state = "piecannon1"
else
icon_state = "piecannon0"
item_state = icon_state
/obj/item/gun/throw/piecannon/process_chamber()
..()
update_icon(UPDATE_ICON_STATE)