mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Adds the ability to pick up all ammo from a turf using a magazine
This commit is contained in:
@@ -38,19 +38,38 @@
|
||||
var/tmp_label = ""
|
||||
var/label_text = sanitize(input(user, "Inscribe some text into \the [initial(BB.name)]","Inscription",tmp_label))
|
||||
if(length(label_text) > 20)
|
||||
to_chat(user, "\red The inscription can be at most 20 characters long.")
|
||||
to_chat(user, "<span class='warning''>The inscription can be at most 20 characters long.</span>")
|
||||
else
|
||||
if(label_text == "")
|
||||
to_chat(user, "\blue You scratch the inscription off of [initial(BB)].")
|
||||
to_chat(user, "<span class='notice'>You scratch the inscription off of [initial(BB)].</span>")
|
||||
BB.name = initial(BB.name)
|
||||
else
|
||||
to_chat(user, "\blue You inscribe \"[label_text]\" into \the [initial(BB.name)].")
|
||||
to_chat(user, "<span class='notice'>You inscribe \"[label_text]\" into \the [initial(BB.name)].</span>")
|
||||
BB.name = "[initial(BB.name)] \"[label_text]\""
|
||||
else
|
||||
to_chat(user, "\blue You can only inscribe a metal bullet.")//because inscribing beanbags is silly
|
||||
to_chat(user, "<span class='notice'>You can only inscribe a metal bullet.</span>")//because inscribing beanbags is silly
|
||||
|
||||
else
|
||||
to_chat(user, "\blue There is no bullet in the casing to inscribe anything into.")
|
||||
to_chat(user, "<span class='notice'>There is no bullet in the casing to inscribe anything into.</span>")
|
||||
|
||||
/obj/item/ammo_casing/attackby(obj/item/ammo_box/box as obj, mob/user as mob, params)
|
||||
if(!istype(box, /obj/item/ammo_box))
|
||||
return
|
||||
if(isturf(src.loc))
|
||||
var/boolets = 0
|
||||
for(var/obj/item/ammo_casing/pew in src.loc)
|
||||
if (box.stored_ammo.len >= box.max_ammo)
|
||||
break
|
||||
if (pew.BB)
|
||||
if (box.give_round(pew))
|
||||
boolets++
|
||||
else
|
||||
continue
|
||||
if (boolets > 0)
|
||||
box.update_icon()
|
||||
user << "<span class='notice'>You collect [boolets] shell\s. [box] now contains [box.stored_ammo.len] shell\s.</span>"
|
||||
else
|
||||
user << "<span class='notice'>You fail to collect anything.</span>"
|
||||
|
||||
/obj/item/ammo_casing/proc/newshot() //For energy weapons, shotgun shells and wands (!).
|
||||
if (!BB)
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
icon_state = "foamdart_empty"
|
||||
desc = "Its nerf or nothing! ...Although, this one doesn't look too safe."
|
||||
|
||||
/obj/item/ammo_casing/caseless/foam_dart/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
/obj/item/ammo_casing/caseless/foam_dart/attackby(var/obj/item/weapon/A as obj, mob/user as mob, params)
|
||||
..()
|
||||
if (istype(A, /obj/item/weapon/screwdriver) && !modified)
|
||||
modified = 1
|
||||
|
||||
Reference in New Issue
Block a user