Skip to content

Commit

Permalink
adds sprites and makes it its own unique type
Browse files Browse the repository at this point in the history
  • Loading branch information
Martinpachu committed May 18, 2024
1 parent 75201df commit d4b5bd3
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 127 deletions.
138 changes: 138 additions & 0 deletions code/game/objects/items/storage/guncases.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
/obj/item/storage/guncase
name = "gun case"
desc = "A large box designed for holding firearms and magazines safely."
icon = 'icons/obj/guncase_48x32.dmi'
icon_state = "riflecase"
item_state = "riflecase"
force = 12
throwforce = 12
throw_speed = 2
throw_range = 7
w_class = WEIGHT_CLASS_BULKY
attack_verb = list("robusted")
hitsound = 'sound/weapons/smash.ogg'
drop_sound = 'sound/items/handling/toolbox_drop.ogg'
pickup_sound = 'sound/items/handling/toolbox_pickup.ogg'

/obj/item/storage/guncase/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 10
STR.max_w_class = WEIGHT_CLASS_BULKY
STR.set_holdable(list(
/obj/item/gun,
/obj/item/ammo_box,
/obj/item/stock_parts/cell/gun
))

/obj/item/storage/pistolcase
name = "pistol case"
desc = "A large box designed for holding pistols and magazines safely."
icon = 'icons/obj/guncase.dmi'
icon_state = "pistolcase"
item_state = "pistolcase"
force = 12
throwforce = 12
throw_speed = 2
w_class = WEIGHT_CLASS_BULKY
attack_verb = list("robusted")
hitsound = 'sound/weapons/smash.ogg'
drop_sound = 'sound/items/handling/toolbox_drop.ogg'
pickup_sound = 'sound/items/handling/toolbox_pickup.ogg'

/obj/item/storage/pistolcase/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 8
STR.max_w_class = WEIGHT_CLASS_BULKY
STR.set_holdable(list(
/obj/item/gun,
/obj/item/ammo_box/,
/obj/item/stock_parts/cell/gun
))
/obj/item/storage/pistolcase/stechkin
/obj/item/storage/pistolcase/stechkin/PopulateContents()
new /obj/item/gun/ballistic/automatic/pistol/no_mag(src)
new /obj/item/ammo_box/magazine/m10mm/empty(src)
new /obj/item/ammo_box/magazine/m10mm/empty(src)

/obj/item/storage/pistolcase/candor
/obj/item/storage/pistolcase/candor/PopulateContents()
new /obj/item/gun/ballistic/automatic/pistol/candor/no_mag(src)
new /obj/item/ammo_box/magazine/m45/empty(src)
new /obj/item/ammo_box/magazine/m45/empty(src)

/obj/item/storage/pistolcase/detective
/obj/item/storage/pistolcase/detective/PopulateContents()
new /obj/item/gun/ballistic/revolver/detective/no_mag(src)
new /obj/item/ammo_box/c38/empty(src)
new /obj/item/ammo_box/c38/empty(src)

/obj/item/storage/pistolcase/shadow
/obj/item/storage/pistolcase/shadow/PopulateContents()
new /obj/item/gun/ballistic/revolver/shadow/no_mag(src)
new /obj/item/ammo_box/c45_speedloader/empty(src)
new /obj/item/ammo_box/c45_speedloader/empty(src)

/obj/item/storage/pistolcase/commander
/obj/item/storage/pistolcase/commander/PopulateContents()
new /obj/item/gun/ballistic/automatic/pistol/commander/no_mag(src)
new /obj/item/ammo_box/magazine/co9mm/empty(src)
new /obj/item/ammo_box/magazine/co9mm/empty(src)

/obj/item/storage/pistolcase/firebrand
/obj/item/storage/pistolcase/firebrand/PopulateContents()
new /obj/item/gun/ballistic/revolver/firebrand/no_mag(src)

/obj/item/storage/pistolcase/derringer
/obj/item/storage/pistolcase/derringer/PopulateContents()
new /obj/item/gun/ballistic/derringer/no_mag(src)
new /obj/item/gun/ballistic/derringer/no_mag(src)

/obj/item/storage/pistolcase/a357
/obj/item/storage/pistolcase/derringer/PopulateContents()
new /obj/item/gun/ballistic/revolver/no_mag(src)
new /obj/item/ammo_box/a357/empty(src)
new /obj/item/ammo_box/a357/empty(src)

/obj/item/storage/pistolcase/montagne
/obj/item/storage/pistolcase/derringer/PopulateContents()
new /obj/item/gun/ballistic/revolver/montagne/no_mag(src)
new /obj/item/ammo_box/c45_speedloader/empty(src)
new /obj/item/ammo_box/c45_speedloader/empty(src)


/obj/item/storage/pistolcase/disposable
/obj/item/storage/pistolcase/disposable/PopulateContents()
new /obj/item/gun/ballistic/automatic/pistol/disposable(src)
new /obj/item/gun/ballistic/automatic/pistol/disposable(src)

/obj/item/storage/pistolcase/laser
/obj/item/storage/pistolcase/laser/PopulateContents()
new /obj/item/gun/energy/laser/empty_cell(src)
new /obj/item/stock_parts/cell/gun(src)

/obj/item/storage/pistolcase/egun
/obj/item/storage/pistolcase/egun/PopulateContents()
new /obj/item/gun/energy/laser/empty_cell(src)
new /obj/item/stock_parts/cell/gun(src)

/obj/item/storage/pistolcase/kalixpistol
/obj/item/storage/pistolcase/kalixpistol/PopulateContents()
new /obj/item/gun/energy/kalix/pistol/empty_cell(src)
new /obj/item/stock_parts/cell/gun/kalix(src)

/obj/item/storage/pistolcase/kalixrifle
/obj/item/storage/pistolcase/kalixrifle/PopulateContents()
new /obj/item/gun/energy/kalix/empty_cell(src)
new /obj/item/stock_parts/cell/gun/kalix(src)

/obj/item/storage/pistolcase/miniegun
/obj/item/storage/pistolcase/miniegun/PopulateContents()
new /obj/item/gun/energy/e_gun/empty_cell(src)
new /obj/item/stock_parts/cell/gun/mini(src)

/obj/item/storage/pistolcase/iongun
/obj/item/storage/pistolcase/iongun/PopulateContents()
new /obj/item/gun/energy/ionrifle/empty_cell(src)
new /obj/item/stock_parts/cell/gun(src)
127 changes: 0 additions & 127 deletions code/game/objects/items/storage/toolbox.dm
Original file line number Diff line number Diff line change
Expand Up @@ -312,133 +312,6 @@
new /obj/item/clothing/mask/infiltrator(src)
new /obj/item/clothing/shoes/combat/sneakboots(src)

/obj/item/storage/toolbox/guncase
name = "gun case"
desc = "A large box designed for holding firearms and magazines safely."
icon_state = "infiltrator_case"
item_state = "infiltrator_case"
force = 15
throwforce = 18
w_class = WEIGHT_CLASS_BULKY
has_latches = FALSE

/obj/item/storage/toolbox/guncase/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 12
STR.max_w_class = WEIGHT_CLASS_BULKY
STR.set_holdable(list(
/obj/item/gun,
/obj/item/ammo_box,
/obj/item/stock_parts/cell/gun
))

/obj/item/storage/toolbox/pistolcase
name = "pistol case"
desc = "A large box designed for holding pistols and magazines safely."
icon_state = "infiltrator_case"
item_state = "infiltrator_case"
force = 15
throwforce = 18
w_class = WEIGHT_CLASS_BULKY
has_latches = FALSE

/obj/item/storage/toolbox/pistolcase/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 8
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.set_holdable(list(
/obj/item/gun,
/obj/item/ammo_box/,
/obj/item/stock_parts/cell/gun
))
/obj/item/storage/toolbox/pistolcase/stechkin
/obj/item/storage/toolbox/pistolcase/stechkin/PopulateContents()
new /obj/item/gun/ballistic/automatic/pistol/no_mag(src)
new /obj/item/ammo_box/magazine/m10mm/empty(src)
new /obj/item/ammo_box/magazine/m10mm/empty(src)

/obj/item/storage/toolbox/pistolcase/candor
/obj/item/storage/toolbox/pistolcase/candor/PopulateContents()
new /obj/item/gun/ballistic/automatic/pistol/candor/no_mag(src)
new /obj/item/ammo_box/magazine/m45/empty(src)
new /obj/item/ammo_box/magazine/m45/empty(src)

/obj/item/storage/toolbox/pistolcase/detective
/obj/item/storage/toolbox/pistolcase/detective/PopulateContents()
new /obj/item/gun/ballistic/revolver/detective/no_mag(src)
new /obj/item/ammo_box/c38/empty(src)
new /obj/item/ammo_box/c38/empty(src)

/obj/item/storage/toolbox/pistolcase/shadow
/obj/item/storage/toolbox/pistolcase/shadow/PopulateContents()
new /obj/item/gun/ballistic/revolver/shadow/no_mag(src)
new /obj/item/ammo_box/c45_speedloader/empty(src)
new /obj/item/ammo_box/c45_speedloader/empty(src)

/obj/item/storage/toolbox/pistolcase/commander
/obj/item/storage/toolbox/pistolcase/commander/PopulateContents()
new /obj/item/gun/ballistic/automatic/pistol/commander/no_mag(src)
new /obj/item/ammo_box/magazine/co9mm/empty(src)
new /obj/item/ammo_box/magazine/co9mm/empty(src)

/obj/item/storage/toolbox/pistolcase/firebrand
/obj/item/storage/toolbox/pistolcase/firebrand/PopulateContents()
new /obj/item/gun/ballistic/revolver/firebrand/no_mag(src)

/obj/item/storage/toolbox/pistolcase/derringer
/obj/item/storage/toolbox/pistolcase/derringer/PopulateContents()
new /obj/item/gun/ballistic/derringer/no_mag(src)
new /obj/item/gun/ballistic/derringer/no_mag(src)

/obj/item/storage/toolbox/pistolcase/a357
/obj/item/storage/toolbox/pistolcase/derringer/PopulateContents()
new /obj/item/gun/ballistic/revolver/no_mag(src)
new /obj/item/ammo_box/a357/empty(src)
new /obj/item/ammo_box/a357/empty(src)

/obj/item/storage/toolbox/pistolcase/montagne
/obj/item/storage/toolbox/pistolcase/derringer/PopulateContents()
new /obj/item/gun/ballistic/revolver/montagne/no_mag(src)
new /obj/item/ammo_box/c45_speedloader/empty(src)
new /obj/item/ammo_box/c45_speedloader/empty(src)


/obj/item/storage/toolbox/pistolcase/disposable
/obj/item/storage/toolbox/pistolcase/disposable/PopulateContents()
new /obj/item/gun/ballistic/automatic/pistol/disposable(src)
new /obj/item/gun/ballistic/automatic/pistol/disposable(src)

/obj/item/storage/toolbox/pistolcase/laser
/obj/item/storage/toolbox/pistolcase/laser/PopulateContents()
new /obj/item/gun/energy/laser/empty_cell(src)
new /obj/item/stock_parts/cell/gun(src)

/obj/item/storage/toolbox/pistolcase/egun
/obj/item/storage/toolbox/pistolcase/egun/PopulateContents()
new /obj/item/gun/energy/laser/empty_cell(src)
new /obj/item/stock_parts/cell/gun(src)

/obj/item/storage/toolbox/pistolcase/kalixpistol
/obj/item/storage/toolbox/pistolcase/kalixpistol/PopulateContents()
new /obj/item/gun/energy/kalix/pistol/empty_cell(src)
new /obj/item/stock_parts/cell/gun/kalix(src)

/obj/item/storage/toolbox/pistolcase/kalixrifle
/obj/item/storage/toolbox/pistolcase/kalixrifle/PopulateContents()
new /obj/item/gun/energy/kalix/empty_cell(src)
new /obj/item/stock_parts/cell/gun/kalix(src)

/obj/item/storage/toolbox/pistolcase/miniegun
/obj/item/storage/toolbox/pistolcase/miniegun/PopulateContents()
new /obj/item/gun/energy/e_gun/empty_cell(src)
new /obj/item/stock_parts/cell/gun/mini(src)

/obj/item/storage/toolbox/pistolcase/iongun
/obj/item/storage/toolbox/pistolcase/iongun/PopulateContents()
new /obj/item/gun/energy/ionrifle/empty_cell(src)
new /obj/item/stock_parts/cell/gun(src)
//floorbot assembly
/obj/item/storage/toolbox/attackby(obj/item/stack/tile/plasteel/T, mob/user, params)
var/list/allowed_toolbox = list(/obj/item/storage/toolbox/emergency, //which toolboxes can be made into floorbots
Expand Down
Binary file added icons/obj/guncase.dmi
Binary file not shown.
Binary file added icons/obj/guncase_48x32.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions shiptest.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1300,6 +1300,7 @@
#include "code\game\objects\items\storage\briefcase.dm"
#include "code\game\objects\items\storage\fancy.dm"
#include "code\game\objects\items\storage\firstaid.dm"
#include "code\game\objects\items\storage\guncases.dm"
#include "code\game\objects\items\storage\holsters.dm"
#include "code\game\objects\items\storage\lockbox.dm"
#include "code\game\objects\items\storage\ration.dm"
Expand Down

0 comments on commit d4b5bd3

Please sign in to comment.