[MIRROR] Replaces ammo_casing/caseless and bullet/reusable with elements. [MDB IGNORE] (#22102)

* Replaces ammo_casing/caseless and bullet/reusable with elements.

* stupid

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: Jolly-66 <70232195+Jolly-66@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-07-04 15:06:52 +02:00
committed by GitHub
parent 56dcf6636f
commit a1ea7f13db
47 changed files with 340 additions and 270 deletions
+1 -1
View File
@@ -352,6 +352,6 @@
overlay_state_active = "module_donk_safe_recycler"
complexity = 1
efficiency = 1
allowed_item_types = list(/obj/item/ammo_casing/caseless/foam_dart)
allowed_item_types = list(/obj/item/ammo_casing/foam_dart)
ammobox_type = /obj/item/ammo_box/foambox/mini
required_amount = SMALL_MATERIAL_AMOUNT*2.5
+10 -9
View File
@@ -533,7 +533,7 @@
. = ..()
if(!.)
return
var/obj/projectile/bomb = new /obj/projectile/bullet/reusable/mining_bomb(mod.wearer.loc)
var/obj/projectile/bomb = new /obj/projectile/bullet/mining_bomb(mod.wearer.loc)
bomb.preparePixelProjectile(target, mod.wearer)
bomb.firer = mod.wearer
playsound(src, 'sound/weapons/gun/general/grenade_launch.ogg', 75, TRUE)
@@ -553,7 +553,7 @@
return
on_deactivation()
/obj/projectile/bullet/reusable/mining_bomb
/obj/projectile/bullet/mining_bomb
name = "mining bomb"
desc = "A bomb. Why are you examining this?"
icon_state = "mine_bomb"
@@ -566,13 +566,15 @@
light_range = 1
light_power = 1
light_color = COLOR_LIGHT_ORANGE
ammo_type = /obj/structure/mining_bomb
/obj/projectile/bullet/reusable/mining_bomb/handle_drop()
if(dropped)
return
dropped = TRUE
new ammo_type(get_turf(src), firer)
/obj/projectile/bullet/mining_bomb/Initialize(mapload)
. = ..()
AddElement(/datum/element/projectile_drop, /obj/structure/mining_bomb)
RegisterSignal(src, COMSIG_PROJECTILE_ON_SPAWN_DROP, PROC_REF(handle_drop))
/obj/projectile/bullet/mining_bomb/proc/handle_drop(datum/source, obj/structure/mining_bomb/mining_bomb)
SIGNAL_HANDLER
addtimer(CALLBACK(mining_bomb, TYPE_PROC_REF(/obj/structure/mining_bomb, prime), firer), mining_bomb.prime_time)
/obj/structure/mining_bomb
name = "mining bomb"
@@ -599,7 +601,6 @@
/obj/structure/mining_bomb/Initialize(mapload, atom/movable/firer)
. = ..()
generate_image()
addtimer(CALLBACK(src, PROC_REF(prime), firer), prime_time)
/obj/structure/mining_bomb/on_changed_z_level(turf/old_turf, turf/new_turf, same_z_layer, notify_contents)
if(same_z_layer)