mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2025-12-10 02:25:43 +00:00
Plungers and Some Recipe Restoration
This commit is contained in:
@@ -1,12 +1,20 @@
|
||||
//Note: So I tried to make it so arrows can shatter on impact, but the code doesn't like that, and ignores the drop chance entirely. Slate this for review.
|
||||
|
||||
/obj/item/projectile/bullet/reusable
|
||||
name = "reusable bullet"
|
||||
desc = "How do you even reuse a bullet?"
|
||||
var/ammo_type = /obj/item/ammo_casing/arrow
|
||||
var/dropped = FALSE
|
||||
|
||||
//var/fragile = FALSE
|
||||
//var/durable = FALSE
|
||||
//var/shattered = 0
|
||||
//var/broken_type = null
|
||||
|
||||
/obj/item/projectile/bullet/reusable/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
handle_drop()
|
||||
//handle_shatter()
|
||||
|
||||
/obj/item/projectile/bullet/reusable/on_range()
|
||||
handle_drop()
|
||||
@@ -17,6 +25,33 @@
|
||||
var/turf/T = get_turf(src)
|
||||
new ammo_type(T)
|
||||
dropped = TRUE
|
||||
/*
|
||||
else
|
||||
var/turf/T = get_turf(src)
|
||||
new broken_type(T)
|
||||
dropped = TRUE
|
||||
|
||||
/obj/item/projectile/bullet/reusable/proc/handle_shatter()
|
||||
if(fragile)
|
||||
switch(rand(1,100))
|
||||
if(1 to 50)
|
||||
src.shattered = 1
|
||||
if(31 to 100)
|
||||
return
|
||||
if(durable)
|
||||
switch(rand(1,100))
|
||||
if(1 to 5)
|
||||
src.shattered = 1
|
||||
if(6 to 100)
|
||||
return
|
||||
else
|
||||
switch(rand(1,100))
|
||||
if(1 to 25)
|
||||
src.shattered = 1
|
||||
if(16 to 100)
|
||||
return
|
||||
return
|
||||
*/
|
||||
|
||||
//Arrows
|
||||
/obj/item/projectile/bullet/reusable/arrow
|
||||
@@ -25,6 +60,7 @@
|
||||
damage = 15
|
||||
icon_state = "arrow"
|
||||
ammo_type = /obj/item/ammo_casing/arrow/wood
|
||||
//broken_type = /obj/item/trash/broken_arrow
|
||||
|
||||
/obj/item/projectile/bullet/reusable/arrow/ash
|
||||
name = "ashen arrow"
|
||||
@@ -44,3 +80,20 @@
|
||||
desc = "Bronze tipped arrow."
|
||||
armor_penetration = 30
|
||||
ammo_type = /obj/item/ammo_casing/arrow/bronze
|
||||
|
||||
//Plunger
|
||||
/obj/item/projectile/bullet/reusable/plunger
|
||||
name = "plunger"
|
||||
desc = "It's a plunger, for plunging."
|
||||
damage = 15
|
||||
icon_state = "plunger"
|
||||
ammo_type = /obj/item/ammo_casing/arrow/plunger
|
||||
|
||||
/obj/item/projectile/bullet/reusable/plunger/on_hit(atom/hit_atom)
|
||||
. = ..()
|
||||
var/mob/living/carbon/H = hit_atom
|
||||
var/obj/item/plunger/P
|
||||
if(!H.wear_mask)
|
||||
H.equip_to_slot_if_possible(P, SLOT_MASK)
|
||||
else
|
||||
handle_drop()
|
||||
|
||||
Reference in New Issue
Block a user