Skip to content

Commit

Permalink
Adds in Specialty OPS Ammo
Browse files Browse the repository at this point in the history
  • Loading branch information
CRITAWAKETS committed Jan 6, 2025
1 parent 371e079 commit 5f6ab17
Show file tree
Hide file tree
Showing 10 changed files with 114 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/modules/cargo/packs/_packs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
var/goody = FALSE
/// Can coupons target this pack? If so, how rarely?
var/discountable = SUPPLY_PACK_NOT_DISCOUNTABLE
/// NON-MODULE CHANGE : Does this override departmental orders to be unavailable from them?
var/no_departmental_orders = FALSE

/datum/supply_pack/New()
id = type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
return FALSE
if(to_check.goody)
return FALSE
if(to_check.no_departmental_orders) // NON-MODULE CHANGE : non-departmental order crates
return FALSE
return TRUE

/// Looks through all possible departments and finds one this ID card "corresponds" to.
Expand Down
3 changes: 3 additions & 0 deletions maplestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6489,8 +6489,11 @@
#include "maplestation_modules\code\modules\paperwork\stamps.dm"
#include "maplestation_modules\code\modules\pixel_shift\code\pixel_shift_component.dm"
#include "maplestation_modules\code\modules\pixel_shift\code\pixel_shift_keybind.dm"
#include "maplestation_modules\code\modules\projectiles\ammunition\ballistic\revolver.dm"
#include "maplestation_modules\code\modules\projectiles\boxes_magazines\ammo_boxes.dm"
#include "maplestation_modules\code\modules\projectiles\projectile\bullets\autocannon.dm"
#include "maplestation_modules\code\modules\projectiles\projectile\bullets\gauss.dm"
#include "maplestation_modules\code\modules\projectiles\projectile\bullets\revolver.dm"
#include "maplestation_modules\code\modules\projectiles\projectile\bullets\shotgun.dm"
#include "maplestation_modules\code\modules\projectiles\projectile\energy\laser.dm"
#include "maplestation_modules\code\modules\projectiles\projectile\energy\ppc.dm"
Expand Down
21 changes: 21 additions & 0 deletions maplestation_modules/code/modules/cargo/packs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -303,3 +303,24 @@
/obj/item/mana_battery/mana_crystal/cut,
/obj/item/mana_battery/mana_crystal/cut,
)

/datum/supply_pack/security/specialty_c38_ammo
name = "Specialty OPS .38 Ammo"
desc = "A pack of specialty ammo produced by OPS Industries, a partner high-end equipment workshop. Contains two speedloaders of .38 HV-DS and .38 Maginull rounds. \
Cannot be department ordered."
cost = PAYCHECK_COMMAND * 50
no_departmental_orders = TRUE // intentionally harder to get and requires spending
crate_type = /obj/structure/closet/crate/secure/ops_industries
contains = list(
/obj/item/ammo_box/c38/dual_stage,
/obj/item/ammo_box/c38/dual_stage,
/obj/item/ammo_box/c38/maginull,
/obj/item/ammo_box/c38/maginull,
)

/obj/structure/closet/crate/secure/ops_industries
name = "OPS Industries crate"
desc = "A secure crate with the logo of OPS Industries."
icon = 'maplestation_modules/icons/obj/storage/crates.dmi'
icon_state = "opscrate"
base_icon_state = "opscrate"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/obj/item/ammo_casing/c38/dual_stage
name = ".38 HV-DS bullet casing"
desc = "A .38 High-Velocity Dual-Stage bullet casing."
projectile_type = /obj/projectile/bullet/c38/dual_stage

/obj/item/ammo_casing/c38/maginull
name = ".38 Maginull bullet casing"
desc = "A .38 Maginull bullet casing."
projectile_type = /obj/projectile/bullet/c38/maginull
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/obj/item/ammo_box/c38/dual_stage
name = "speed loader (.38 HV-DS)"
desc = "Designed to quickly reload revolvers. These rounds are made with an expensive dual-stage propulsion process, leading to much faster velocity of the bullet."
ammo_type = /obj/item/ammo_casing/c38/dual_stage
ammo_band_color = "#dcddff"

/obj/item/ammo_box/c38/maginull
name = "speed loader (.38 Maginull)"
desc = "Designed to quickly reload revolvers. These rounds contain a hollow-point gold and obsidian core, embedding itself into a target and then draining all their mana."
ammo_type = /obj/item/ammo_casing/c38/maginull
ammo_band_color = "#4b007c"
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/obj/projectile/bullet/c38/dual_stage
name = ".38 dual-stage bullet"
icon = 'maplestation_modules/icons/obj/weapons/guns/projectiles.dmi'
icon_state = "dual_stage"
damage = 20
speed = 1.2 // make the effect look cooler
armour_penetration = 10
ricochets_max = 0
ricochet_chance = 0
wound_bonus = -30
embedding = list(embed_chance=20, fall_chance=2, jostle_chance=2, ignore_throwspeed_threshold=TRUE, pain_stam_pct=0.4, pain_mult=3, jostle_pain_mult=5, rip_time=1 SECONDS)
embed_falloff_tile = -1.5

/obj/projectile/bullet/c38/dual_stage/fire(angle, atom/direct_target)
. = ..()
addtimer(CALLBACK(src, PROC_REF(speed_up)), 0.4 SECONDS)

/obj/projectile/bullet/c38/dual_stage/proc/speed_up()
speed /= 2.5
icon_state = "dual_stage-fast"
wound_bonus += 30
armour_penetration += 20
new /obj/item/ammo_casing/spent/dual_stage_booster(get_turf(src))

/obj/item/ammo_casing/spent/dual_stage_booster
name = "spent dual-stage bullet booster"
desc = "A bullet booster."
icon = 'maplestation_modules/icons/obj/weapons/guns/ammo.dmi'
icon_state = "dual_stage_junk"

/obj/item/ammo_casing/spent/dual_stage_booster/Initialize(mapload)
. = ..()
bounce_away(still_warm = TRUE, bounce_delay = 3)

/obj/item/ammo_casing/spent/dual_stage_booster/update_icon_state()
icon_state = "dual_stage_junk"
return ..()

/obj/projectile/bullet/c38/maginull
name = ".38 maginull bullet"
damage = 20
ricochets_max = 0 // do you expect hollow-point gold and obsidian to endure a ricochet?
ricochet_chance = 0
weak_against_armour = TRUE
wound_bonus = -30
embedding = list(embed_chance=50, fall_chance=1, jostle_chance=0, ignore_throwspeed_threshold=TRUE, pain_stam_pct=0.2, pain_mult=1, jostle_pain_mult=2, remove_pain_mult = 2, rip_time=1 SECONDS)
embed_falloff_tile = -2.5
shrapnel_type = /obj/item/shrapnel/bullet/maginull

/obj/item/shrapnel/bullet/maginull
var/mob/living/carbon/spiked_mob

/obj/item/shrapnel/bullet/maginull/embedded(atom/embedded_target, obj/item/bodypart/part)
. = ..()
if(iscarbon(embedded_target))
spiked_mob = embedded_target
START_PROCESSING(SSprocessing, src)

/obj/item/shrapnel/bullet/maginull/process(seconds_per_tick)
if(spiked_mob?.mana_pool)
spiked_mob.safe_adjust_personal_mana(-1.5 * seconds_per_tick)

/obj/item/shrapnel/bullet/maginull/unembedded()
spiked_mob = null
STOP_PROCESSING(SSprocessing, src)
. = ..()
Binary file added maplestation_modules/icons/obj/storage/crates.dmi
Binary file not shown.
Binary file added maplestation_modules/icons/obj/weapons/guns/ammo.dmi
Binary file not shown.
Binary file not shown.

0 comments on commit 5f6ab17

Please sign in to comment.