mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-10 06:34:45 +01:00
Adds most shotgun ammo boxes to cargo. Allows them to be crafted. (#30837)
* pope why didn't you test it haughughuugughuhguhguhgh * ok let us be real it doesn't need 50 more what was I thinking * oop * a static shock * spelling * Update code/game/objects/items/weapons/storage/boxes.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> * so full of order of operations yum --------- Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
@@ -391,7 +391,7 @@
|
||||
loot = list(
|
||||
/obj/item/storage/fancy/shell/confetti,
|
||||
/obj/item/storage/fancy/shell/ion,
|
||||
/obj/item/storage/fancy/shell/incindiary,
|
||||
/obj/item/storage/fancy/shell/incendiary,
|
||||
/obj/item/storage/fancy/shell/dragonsbreath,
|
||||
/obj/item/storage/fancy/shell/rubbershot,
|
||||
)
|
||||
|
||||
@@ -491,6 +491,7 @@ GLOBAL_LIST_INIT(cardboard_recipes, list (
|
||||
new /datum/stack_recipe("cardboard tube", /obj/item/c_tube),
|
||||
new /datum/stack_recipe("cardboard box", /obj/structure/closet/cardboard, 4),
|
||||
new /datum/stack_recipe("cardboard cutout", /obj/item/cardboard_cutout, 5),
|
||||
new /datum/stack_recipe("shotgun ammo box", /obj/item/storage/fancy/shell/empty, 2),
|
||||
null,
|
||||
new /datum/stack_recipe_list("chess pieces", list(
|
||||
new /datum/stack_recipe("black pawn", /obj/item/chesspiece/bpawn, 1),
|
||||
|
||||
@@ -731,6 +731,23 @@
|
||||
/* Ammo Boxes */
|
||||
////////////////
|
||||
|
||||
#define TRANQ "Tranquilizer"
|
||||
#define RUBBER "Rubbershot"
|
||||
#define BUCK "Buckshot"
|
||||
#define SLUG "Slug"
|
||||
#define BEAN "Beanbag"
|
||||
#define TASER "Taser"
|
||||
#define DRAGON "Dragonsbreath"
|
||||
#define HOLY "Holy"
|
||||
#define CLOWN "Confetti"
|
||||
#define METEOR "Meteorshot"
|
||||
#define ION "Ionshot"
|
||||
#define PULSE "Pulse"
|
||||
#define INCENDIARY "Incendiary"
|
||||
#define LASERSHOT "Laser"
|
||||
#define FRAG "Frag"
|
||||
|
||||
|
||||
/obj/item/storage/fancy/shell
|
||||
icon = 'icons/obj/shell_boxes.dmi'
|
||||
storage_slots = 8
|
||||
@@ -738,11 +755,16 @@
|
||||
can_hold = list(/obj/item/ammo_casing/shotgun)
|
||||
/// What shell do we fill the box with
|
||||
var/shell_type
|
||||
/// Is the box open or closed?
|
||||
var/we_are_open = FALSE
|
||||
/// What is the closed icon state of the box?
|
||||
var/closed_icon_state = null
|
||||
|
||||
/obj/item/storage/fancy/shell/fancy_storage_examine(mob/user)
|
||||
. = list()
|
||||
if(!length(contents))
|
||||
. += "There are no shells in the box."
|
||||
. += "<span class='notice'>Ctrl-click to open or close the box!</span>"
|
||||
return
|
||||
|
||||
var/list/shell_list = list() // Associated list of all shells in the box
|
||||
@@ -754,11 +776,77 @@
|
||||
. += "There is one [thing] in the box."
|
||||
else
|
||||
. += "There are [shell_list[thing]] [thing]s in the box."
|
||||
. += "<span class='notice'>Ctrl-click to open or close the box!</span>"
|
||||
|
||||
/obj/item/storage/fancy/shell/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(!is_pen(W))
|
||||
return ..()
|
||||
var/list/static/designs = list(TRANQ, RUBBER, BUCK, SLUG, BEAN, TASER, DRAGON, HOLY, CLOWN, METEOR, ION, PULSE, INCENDIARY, LASERSHOT, FRAG)
|
||||
var/switchDesign = tgui_input_list(user, "Select a Design", "Shotgun Box Designs", sortList(designs))
|
||||
if(!switchDesign)
|
||||
return
|
||||
if(we_are_open)
|
||||
to_chat(user, "<span class='warning'>Close the box first!</span>")
|
||||
return
|
||||
if(get_dist(user, src) > 1 && !user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You have moved too far away!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You make some modifications to [src] using your pen.</span>")
|
||||
switch(switchDesign)
|
||||
if(TRANQ)
|
||||
icon_state = "tranqbox"
|
||||
if(RUBBER)
|
||||
icon_state = "rubberbox"
|
||||
if(BUCK)
|
||||
icon_state = "buckbox"
|
||||
if(SLUG)
|
||||
icon_state = "slugbox"
|
||||
if(BEAN)
|
||||
icon_state = "beanbox"
|
||||
if(TASER)
|
||||
icon_state = "stunbox"
|
||||
if(DRAGON)
|
||||
icon_state = "dragonsbox"
|
||||
if(HOLY)
|
||||
icon_state = "holybox"
|
||||
if(CLOWN)
|
||||
icon_state = "partybox"
|
||||
if(METEOR)
|
||||
icon_state = "meteorbox"
|
||||
if(ION)
|
||||
icon_state = "ionbox"
|
||||
if(PULSE)
|
||||
icon_state = "pulsebox"
|
||||
if(INCENDIARY)
|
||||
icon_state = "incendiarybox"
|
||||
if(LASERSHOT)
|
||||
icon_state = "lasershotbox"
|
||||
if(FRAG)
|
||||
icon_state = "frag12box"
|
||||
closed_icon_state = icon_state
|
||||
update_appearance(UPDATE_ICON_STATE|UPDATE_OVERLAYS)
|
||||
return
|
||||
|
||||
/obj/item/storage/fancy/shell/CtrlClick(mob/living/user)
|
||||
if(!isliving(user))
|
||||
return
|
||||
if((get_dist(user, src) > 1) || user.incapacitated())
|
||||
return
|
||||
if(we_are_open)
|
||||
we_are_open = FALSE
|
||||
else
|
||||
we_are_open = TRUE
|
||||
update_appearance(UPDATE_ICON_STATE|UPDATE_OVERLAYS)
|
||||
|
||||
|
||||
/obj/item/storage/fancy/shell/update_icon_state()
|
||||
icon_state = "open"
|
||||
if(we_are_open)
|
||||
icon_state = "open"
|
||||
else
|
||||
icon_state = closed_icon_state
|
||||
|
||||
/obj/item/storage/fancy/shell/populate_contents()
|
||||
closed_icon_state = icon_state
|
||||
if(!shell_type)
|
||||
return
|
||||
for(var/i in 1 to storage_slots)
|
||||
@@ -766,6 +854,8 @@
|
||||
|
||||
/obj/item/storage/fancy/shell/update_overlays()
|
||||
. = ..()
|
||||
if(!we_are_open)
|
||||
return
|
||||
var/list/cached_contents = contents
|
||||
for(var/index in 1 to length(cached_contents))
|
||||
var/obj/shell = cached_contents[index]
|
||||
@@ -776,6 +866,19 @@
|
||||
|
||||
. += "shell_box_front" // need to add another overlay to prevent from other overlays from showing on top
|
||||
|
||||
/obj/item/storage/fancy/shell/handle_item_insertion(obj/item/I, mob/user, prevent_warning)
|
||||
. = ..()
|
||||
if(.)
|
||||
we_are_open = TRUE
|
||||
update_appearance(UPDATE_ICON_STATE|UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/storage/fancy/shell/remove_from_storage(obj/item/I, atom/new_location)
|
||||
. = ..()
|
||||
if(.)
|
||||
we_are_open = TRUE
|
||||
update_appearance(UPDATE_ICON_STATE|UPDATE_OVERLAYS)
|
||||
|
||||
|
||||
/obj/item/storage/fancy/shell/tranquilizer
|
||||
name = "ammunition box (Tranquilizer darts)"
|
||||
desc = "A small box capable of holding eight shotgun shells."
|
||||
@@ -848,7 +951,7 @@
|
||||
icon_state = "pulsebox"
|
||||
shell_type = /obj/item/ammo_casing/shotgun/pulseslug
|
||||
|
||||
/obj/item/storage/fancy/shell/incindiary
|
||||
/obj/item/storage/fancy/shell/incendiary
|
||||
name = "ammunition box (Incendiary slug)"
|
||||
desc = "A small box capable of holding eight shotgun shells."
|
||||
icon_state = "incendiarybox"
|
||||
@@ -866,6 +969,27 @@
|
||||
icon_state = "frag12box"
|
||||
shell_type = /obj/item/ammo_casing/shotgun/frag12
|
||||
|
||||
/obj/item/storage/fancy/shell/empty
|
||||
name = "custom shotgun ammunition box"
|
||||
desc = "A small box capable of holding eight shotgun shells. Hand packed, just for you!"
|
||||
icon_state = "buckbox"
|
||||
|
||||
#undef TRANQ
|
||||
#undef RUBBER
|
||||
#undef BUCK
|
||||
#undef SLUG
|
||||
#undef BEAN
|
||||
#undef TASER
|
||||
#undef DRAGON
|
||||
#undef HOLY
|
||||
#undef CLOWN
|
||||
#undef METEOR
|
||||
#undef ION
|
||||
#undef PULSE
|
||||
#undef INCENDIARY
|
||||
#undef LASERSHOT
|
||||
#undef FRAG
|
||||
|
||||
////////////////
|
||||
/* Donk Boxes */
|
||||
////////////////
|
||||
|
||||
@@ -267,7 +267,7 @@
|
||||
/obj/item/ammo_casing/shotgun/laserslug
|
||||
name = "laser slug"
|
||||
desc = "A rudimentary 12 gauge shotgun shell that replicates the effects of a laser weapon with a low-powered laser."
|
||||
icon_state = "laser"
|
||||
icon_state = "improvised"
|
||||
projectile_type = /obj/item/projectile/beam/laser
|
||||
muzzle_flash_strength = MUZZLE_FLASH_STRENGTH_NORMAL
|
||||
muzzle_flash_range = MUZZLE_FLASH_RANGE_NORMAL
|
||||
@@ -329,7 +329,7 @@
|
||||
/obj/item/ammo_casing/shotgun/holy
|
||||
name = "holy water dart"
|
||||
desc = "A 12 gauge dart shell loaded with holy water."
|
||||
icon_state = "dart"
|
||||
icon_state = "holydart"
|
||||
projectile_type = /obj/item/projectile/bullet/dart/syringe/holy
|
||||
muzzle_flash_strength = MUZZLE_FLASH_STRENGTH_NORMAL
|
||||
muzzle_flash_range = MUZZLE_FLASH_RANGE_NORMAL
|
||||
|
||||
@@ -302,6 +302,27 @@
|
||||
containertype = /obj/structure/closet/crate/secure/plasma
|
||||
containername = "lever action rifle crate"
|
||||
|
||||
/datum/supply_packs/security/armory/beanammo
|
||||
name = "Beanbag Shell Crate"
|
||||
contains = list(/obj/item/storage/fancy/shell/beanbag,
|
||||
/obj/item/storage/fancy/shell/beanbag)
|
||||
cost = 175 // Just print them at cargo
|
||||
containername = "beanbag shell crate"
|
||||
|
||||
/datum/supply_packs/security/armory/rubberammo
|
||||
name = "Rubbershot Shell Crate"
|
||||
contains = list(/obj/item/storage/fancy/shell/rubbershot,
|
||||
/obj/item/storage/fancy/shell/rubbershot)
|
||||
cost = 175 // Just print them at cargo
|
||||
containername = "rubbershot shell crate"
|
||||
|
||||
/datum/supply_packs/security/armory/incendiaryammo
|
||||
name = "Incendiary Shell Crate"
|
||||
contains = list(/obj/item/storage/fancy/shell/incendiary,
|
||||
/obj/item/storage/fancy/shell/incendiary)
|
||||
cost = 225 // This is cargo printable, but slightly increased in cost due to it being lethal
|
||||
containername = "incendiary shell crate"
|
||||
|
||||
/datum/supply_packs/security/armory/tranqammo
|
||||
name = "Tranquilizer Shell Crate"
|
||||
contains = list(/obj/item/storage/fancy/shell/tranquilizer,
|
||||
@@ -316,6 +337,27 @@
|
||||
cost = 400
|
||||
containername = "holy water shell crate"
|
||||
|
||||
/datum/supply_packs/security/armory/dragonsbreathammo
|
||||
name = "Dragonsbreath Shell Crate"
|
||||
contains = list(/obj/item/storage/fancy/shell/dragonsbreath,
|
||||
/obj/item/storage/fancy/shell/dragonsbreath)
|
||||
cost = 400
|
||||
containername = "dragonsbreath shell crate"
|
||||
|
||||
/datum/supply_packs/security/armory/ionshotammo
|
||||
name = "Ionshot Shell Crate"
|
||||
contains = list(/obj/item/storage/fancy/shell/ion,
|
||||
/obj/item/storage/fancy/shell/ion)
|
||||
cost = 400
|
||||
containername = "ionshot shell crate"
|
||||
|
||||
/datum/supply_packs/security/armory/lasershotammo
|
||||
name = "Lasershot Shell Crate"
|
||||
contains = list(/obj/item/storage/fancy/shell/lasershot,
|
||||
/obj/item/storage/fancy/shell/lasershot)
|
||||
cost = 400
|
||||
containername = "lasershot shell crate"
|
||||
|
||||
/datum/supply_packs/security/armory/disablersmg
|
||||
name = "WT-450 Disabler SMG Crate"
|
||||
contains = list(/obj/item/gun/energy/disabler/smg,
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.9 KiB |
Reference in New Issue
Block a user