Skip to content

Commit

Permalink
garrow mod 3
Browse files Browse the repository at this point in the history
  • Loading branch information
DexterDude committed Sep 26, 2024
1 parent cfcf843 commit eaa8bcb
Show file tree
Hide file tree
Showing 10 changed files with 4,724 additions and 811 deletions.
1 change: 1 addition & 0 deletions code/game/objects/effects/spawners/spawner.dm
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/obj/effect/spawner
name = "object spawner"
icon = 'icons/landmarks.dmi'
130 changes: 125 additions & 5 deletions code/modules/cm_marines/equipment/guncases.dm
Original file line number Diff line number Diff line change
Expand Up @@ -158,22 +158,142 @@
new /obj/item/weapon/gun/flamer(src)
new /obj/item/ammo_magazine/flamer_tank(src)
new /obj/item/attachable/attached_gun/extinguisher/pyro(src)
//------------ heavy cases

/obj/item/storage/box/guncase/flamer/fuel
name = "\improper M240A1 fuel case"
desc = "A case containing four fuel canisters for the M240A1 incinerator unit."
icon_state = "fuelbox"
/obj/item/storage/box/guncase/heavy
name = "heavy gun case"
desc = "You shouldn't be seeing this."
icon_state = null
use_sound = "toolbox"
var/move_delay_mult = 2

/obj/item/storage/box/guncase/heavy/pickup(mob/user, silent)
. = ..()
RegisterSignal(user, COMSIG_HUMAN_POST_MOVE_DELAY, PROC_REF(handle_movedelay))

/obj/item/storage/box/guncase/heavy/proc/handle_movedelay(mob/user, list/movedata)
SIGNAL_HANDLER
if(locate(/obj/item/storage/box/guncase/heavy) in user.contents)
movedata["move_delay"] += move_delay_mult

/obj/item/storage/box/guncase/heavy/dropped(mob/user, silent)
. = ..()
UnregisterSignal(user, COMSIG_HUMAN_POST_MOVE_DELAY)



/obj/item/storage/box/guncase/heavy/sentry
name = "\improper UA 571-C sentry gun case"
desc = "A gun case containing the UA 571-C sentry unit, a spare drum, and a sentry laptop."
icon_state = "sentrycase"
storage_slots = 3
can_hold = list(/obj/item/defenses/handheld/sentry, /obj/item/ammo_magazine/sentry, /obj/item/device/sentry_computer)

/obj/item/storage/box/guncase/heavy/sentry/fill_preset_inventory()
new /obj/item/defenses/handheld/sentry(src)
new /obj/item/ammo_magazine/sentry(src)
new /obj/item/device/sentry_computer(src)

/obj/item/storage/box/guncase/heavy/sentry/update_icon()
overlays.Cut()
if(opened)
overlays += image(src.icon, "case_lid_open")
else
overlays += image(src.icon, "sentrycase_lid")
return
if(locate(/obj/item/defenses/handheld/sentry) in src.contents)
overlays += image(src.icon, "+sentry")
if(locate(/obj/item/ammo_magazine/sentry) in src.contents)
overlays += image(src.icon, "+sentrymag")
if(locate(/obj/item/device/sentry_computer) in src.contents)
overlays += image(src.icon, "+sentrycomp")

/obj/item/storage/box/guncase/heavy/motiondetectors
name = "\improper motion detectors case"
desc = "A case containing four individual handheld motion detectors."
icon_state = "mdcase"
storage_slots = 4
can_hold = list(/obj/item/device/motiondetector)

/obj/item/storage/box/guncase/heavy/motiondetectors/fill_preset_inventory()
new /obj/item/device/motiondetector(src)
new /obj/item/device/motiondetector(src)
new /obj/item/device/motiondetector(src)
new /obj/item/device/motiondetector(src)

/obj/item/storage/box/guncase/heavy/motiondetectors/update_icon()
overlays.Cut()
if(opened)
overlays += image(src.icon, "case_lid_open")
else
overlays += image(src.icon, "mdcase_lid")
return

if(length(src.contents) >= storage_slots)
var/image/source_image = image(src.icon, "+md")
source_image.pixel_x = 0
overlays += source_image
if(length(src.contents) >= storage_slots * 0.75)
var/image/source_image = image(src.icon, "+md")
source_image.pixel_x = 6
overlays += source_image
if(length(src.contents) >= storage_slots * 0.5)
var/image/source_image = image(src.icon, "+md")
source_image.pixel_x = 12
overlays += source_image
if(length(src.contents) >= storage_slots * 0.25)
var/image/source_image = image(src.icon, "+md")
source_image.pixel_x = 18
overlays += source_image

/obj/item/storage/box/guncase/heavy/fuel
name = "\improper M240A1 fuel canister case"
desc = "A heavy case containing six fuel canisters for the M240A1 incinerator unit."
icon_state = "fuelcase"
storage_slots = 6
can_hold = list(/obj/item/ammo_magazine/flamer_tank)

/obj/item/storage/box/guncase/flamer/fuel/fill_preset_inventory()
/obj/item/storage/box/guncase/heavy/fuel/fill_preset_inventory()
new /obj/item/ammo_magazine/flamer_tank(src)
new /obj/item/ammo_magazine/flamer_tank(src)
new /obj/item/ammo_magazine/flamer_tank(src)
new /obj/item/ammo_magazine/flamer_tank(src)
new /obj/item/ammo_magazine/flamer_tank(src)
new /obj/item/ammo_magazine/flamer_tank(src)

/obj/item/storage/box/guncase/heavy/fuel/update_icon()
overlays.Cut()
if(opened)
overlays += image(src.icon, "case_lid_open")
else
overlays += image(src.icon, "fuelcase_lid")
return

if(length(src.contents) >= 1)
var/image/source_image = image(src.icon, "+fuel_bottom")
source_image.pixel_x = 0
overlays += source_image
if(length(src.contents) >= 2)
var/image/source_image = image(src.icon, "+fuel_bottom")
source_image.pixel_x = 8
overlays += source_image
if(length(src.contents) >= 3)
var/image/source_image = image(src.icon, "+fuel_bottom")
source_image.pixel_x = 16
overlays += source_image
if(length(src.contents) >= 4)
var/image/source_image = image(src.icon, "+fuel")
source_image.pixel_x = 0
overlays += source_image
if(length(src.contents) >= 5)
var/image/source_image = image(src.icon, "+fuel")
source_image.pixel_x = 8
overlays += source_image
if(length(src.contents) >= 6)
var/image/source_image = image(src.icon, "+fuel")
source_image.pixel_x = 16
overlays += source_image

//------------
/obj/item/storage/box/guncase/m56d
name = "\improper M56D heavy machine gun case"
Expand Down
60 changes: 58 additions & 2 deletions code/modules/projectiles/ammo_boxes/magazine_boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -566,14 +566,13 @@
empty = TRUE

/obj/item/ammo_box/magazine/mk1/ap
name = "magazine box (M41A MK1 AP x 10)"
name = "magazine box (AP M41A MK1 x 10)"
flags_equip_slot = SLOT_BACK
overlay_ammo_type = "_ap_mk1"
overlay_content = "_ap"
magazine_type = /obj/item/ammo_magazine/rifle/m41aMK1/ap

/obj/item/ammo_box/magazine/mk1/ap/empty
empty = TRUE

/obj/item/ammo_box/magazine/mk1/heap
name = "magazine box (HEAP M41A MK1 X 10)"
Expand All @@ -593,6 +592,63 @@
/obj/item/ammo_box/magazine/mk1/rubber/empty
empty = TRUE

//-----------------------LARGE M41A MK1 Rifle Mag Boxes-----------------------

/obj/item/ammo_box/magazine/mk1/large
name = "magazine box (M41A MK1 x 32)"
icon_state = "base_large"
overlay_ammo_type = "_reglarge"
overlay_gun_type = "_blank"
overlay_content = "_reglarge"
limit_per_tile = 1
flags_equip_slot = null
magazine_type = /obj/item/ammo_magazine/rifle/m41aMK1
num_of_magazines = 32
allowed_magazines = list(/obj/item/ammo_magazine/rifle/m41aMK1/recon)
var/move_delay_mult = 2

/obj/item/ammo_box/magazine/mk1/large/pickup(mob/user, silent)
. = ..()
RegisterSignal(user, COMSIG_HUMAN_POST_MOVE_DELAY, PROC_REF(handle_movedelay))

/obj/item/ammo_box/magazine/mk1/large/proc/handle_movedelay(mob/user, list/movedata)
SIGNAL_HANDLER
if(locate(/obj/item/ammo_box/magazine/mk1/large) in user.contents)
movedata["move_delay"] += move_delay_mult

/obj/item/ammo_box/magazine/mk1/large/dropped(mob/user, silent)
. = ..()
UnregisterSignal(user, COMSIG_HUMAN_POST_MOVE_DELAY)

/obj/item/ammo_box/magazine/mk1/large/empty
empty = TRUE

/obj/item/ammo_box/magazine/mk1/large/ap
name = "magazine box (AP M41A MK1 x 32)"
overlay_ammo_type = "_aplarge"
overlay_content = "_aplarge"
magazine_type = /obj/item/ammo_magazine/rifle/m41aMK1/ap

/obj/item/ammo_box/magazine/mk1/large/ap/empty
empty = TRUE

/obj/item/ammo_box/magazine/mk1/large/heap
name = "magazine box (HEAP M41A MK1 x 32)"
overlay_ammo_type = "_heaplarge"
overlay_content = "_heaplarge"
magazine_type = /obj/item/ammo_magazine/rifle/m41aMK1/heap

/obj/item/ammo_box/magazine/mk1/large/heap/empty
empty = TRUE

/obj/item/ammo_box/magazine/mk1/large/rubber
name = "magazine box (Rubber M41A MK1 x 32)"
overlay_ammo_type = "_rubberlarge"
magazine_type = /obj/item/ammo_magazine/rifle/m41aMK1/rubber

/obj/item/ammo_box/magazine/mk1/large/rubber/empty
empty = TRUE

//-----------------------NSG 23 Rifle Mag Boxes-----------------------

/obj/item/ammo_box/magazine/nsg23
Expand Down
Binary file modified icons/landmarks.dmi
Binary file not shown.
Binary file modified icons/obj/items/storage/kits.dmi
Binary file not shown.
Binary file modified icons/obj/items/weapons/guns/ammo_boxes/boxes_and_lids.dmi
Binary file not shown.
Binary file modified icons/obj/items/weapons/guns/ammo_boxes/magazines.dmi
Binary file not shown.
Binary file modified icons/obj/items/weapons/guns/ammo_boxes/text.dmi
Binary file not shown.
Binary file modified icons/obj/structures/machinery/vending.dmi
Binary file not shown.
Loading

0 comments on commit eaa8bcb

Please sign in to comment.