Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ammo Antics #3694

Merged
merged 30 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
db10fc3
wawa
Erikafox Nov 2, 2024
b4b7a6a
florp
Erikafox Nov 2, 2024
da109d7
sfwrag
Erikafox Nov 2, 2024
27fbd8e
ouhhh
Erikafox Nov 2, 2024
722a4af
Update _ammo_casing.dm
Erikafox Nov 2, 2024
603b5dc
Update pistol.dm
Erikafox Nov 2, 2024
7409c77
speed doublecheck
Erikafox Nov 2, 2024
502d4d0
Update all_nodes.dm
Erikafox Nov 2, 2024
40339e0
Update revolver.dm
Erikafox Nov 2, 2024
258b959
Update revolver.dm
Erikafox Nov 2, 2024
9b1c31a
Merge remote-tracking branch 'upstream/master' into ammo_checking
Erikafox Nov 2, 2024
d7d72b9
Merge branch 'master' into ammo_checking
Erikafox Nov 3, 2024
ae9b5d8
more churn
Erikafox Nov 3, 2024
5481c38
churg
Erikafox Nov 6, 2024
0fea4a2
Update ammo.dm
Erikafox Nov 9, 2024
df8e5ba
Update ammo.dm
Erikafox Nov 9, 2024
276f7ca
Update ammo.dm
Erikafox Nov 9, 2024
d0b4d49
Update premade_pistol_stacks.dm
Erikafox Nov 9, 2024
c1bb4bb
Update ammo.dm
Erikafox Nov 9, 2024
8cdbcfe
Update premade_rifle_stacks.dm
Erikafox Nov 9, 2024
9c0f998
e
Erikafox Nov 9, 2024
0ef369f
erasdf
Erikafox Nov 9, 2024
0240bce
Merge branch 'master' into ammo_checking
Erikafox Nov 10, 2024
3e21909
reduce
Erikafox Nov 10, 2024
d4ade60
fro
Erikafox Nov 10, 2024
85511b1
Update code/modules/projectiles/boxes_magazines/ammo_stacks/prefab_st…
Erikafox Nov 14, 2024
5745544
Update premade_smg_stacks.dm
Erikafox Nov 15, 2024
32e8064
Merge branch 'master' into ammo_checking
Erikafox Nov 20, 2024
141da1d
Update ammo.dm
Erikafox Nov 20, 2024
86d5b52
Merge branch 'master' into ammo_checking
Sun-Soaked Nov 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions code/__DEFINES/projectiles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,19 @@
#define PROJECTILE_BONUS_DAMAGE_WALLS (1<<1) // walls
#define PROJECTILE_BONUS_DAMAGE_RWALLS (1<<2) //reinforced walls

//vibes based bullet speed

#define BULLET_SPEED_SHOTGUN 0.5
#define BULLET_SPEED_HANDGUN 0.4
#define BULLET_SPEED_REVOLVER 0.4 //why do we have multiple defines for the same thing? future proofing.
#define BULLET_SPEED_PDW 0.3
#define BULLET_SPEED_RIFLE 0.3
#define BULLET_SPEED_SNIPER 0.2

//speed modifiers
#define BULLET_SPEED_AP_MOD -0.05
#define BULLET_SPEED_HP_MOD 0.05
#define BULLET_SPEED_RUBBER_MOD 0.1
#define BULLET_SPEED_HV_MOD -0.1
#define BULLET_SPEED_SURPLUS_MOD 0.05

2 changes: 0 additions & 2 deletions code/datums/components/fantasy/suffixes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,10 @@
/obj/projectile/meteor = 1,
/obj/projectile/energy/nuclear_particle = 1,
/obj/projectile/beam/pulse = 1,
/obj/projectile/bullet/honker = 15,
/obj/projectile/temp = 15,
/obj/projectile/ion = 15,
/obj/projectile/beam/emitter = 15,
/obj/projectile/energy/net = 15,
/obj/projectile/bullet/incendiary/c9mm = 15,
/obj/projectile/temp/hot = 15,
/obj/projectile/beam/disabler = 15
)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/material_container.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
if(!has_space(material_amount))
to_chat(user, "<span class='warning'>[parent] is full. Please remove materials from [parent] in order to insert more.</span>")
return
if(I.contents.len && !istype(I, /obj/item/stack))
if(I.contents.len && !istype(I, /obj/item/stack) && !istype(I, /obj/item/ammo_box/magazine/ammo_stack))
to_chat(user, span_warning("[I] has items inside of it. Please remove them before inserting it."))
return
user_insert(I, user)
Expand Down
69 changes: 0 additions & 69 deletions code/game/gamemodes/clown_ops/clown_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -178,72 +178,3 @@

/obj/item/clothing/mask/fakemoustache/sticky/proc/unstick()
REMOVE_TRAIT(src, TRAIT_NODROP, STICKY_MOUSTACHE_TRAIT)

//DARK H.O.N.K. AND CLOWN MECH WEAPONS

/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar/bombanana
name = "bombanana mortar"
desc = "Equipment for clown exosuits. Launches exploding banana peels."
icon_state = "mecha_bananamrtr"
projectile = /obj/item/grown/bananapeel/bombanana
projectiles = 8
projectile_energy_cost = 1000

/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar/bombanana/can_attach(obj/mecha/combat/honker/M)
if(..())
if(istype(M))
return TRUE
return FALSE

/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/tearstache
name = "\improper HONKeR-6 grenade launcher"
desc = "A weapon for combat exosuits. Launches primed tear-stache grenades."
icon_state = "mecha_grenadelnchr"
projectile = /obj/item/grenade/chem_grenade/teargas/moustache
fire_sound = 'sound/weapons/gun/general/grenade_launch.ogg'
projectiles = 6
missile_speed = 1.5
projectile_energy_cost = 800
equip_cooldown = 60
det_time = 20

/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/tearstache/can_attach(obj/mecha/combat/honker/M)
if(..())
if(istype(M))
return TRUE
return FALSE

/obj/mecha/combat/honker/dark
desc = "Produced by \"Tyranny of Honk, INC\", this exosuit is designed as heavy clown-support. This one has been painted black for maximum fun. HONK!"
name = "\improper Dark H.O.N.K"
icon_state = "darkhonker"
max_integrity = 300
deflect_chance = 15
armor = list("melee" = 40, "bullet" = 40, "laser" = 50, "energy" = 35, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
max_temperature = 35000
operation_req_access = list(ACCESS_SYNDICATE)
internals_req_access = list(ACCESS_SYNDICATE)
wreckage = /obj/structure/mecha_wreckage/honker/dark
max_equip = 4

/obj/mecha/combat/honker/dark/add_cell(obj/item/stock_parts/cell/C)
if(C)
C.forceMove(src)
cell = C
return
cell = new /obj/item/stock_parts/cell/hyper(src)

/obj/mecha/combat/honker/dark/loaded/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/thrusters/ion(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/honker()
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar/bombanana()//Needed more offensive weapons.
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/tearstache()//The mousetrap mortar was not up-to-snuff.
ME.attach(src)

/obj/structure/mecha_wreckage/honker/dark
name = "\improper Dark H.O.N.K wreckage"
icon_state = "darkhonker-broken"
18 changes: 0 additions & 18 deletions code/game/machinery/porta_turret/portable_turret.dm
Original file line number Diff line number Diff line change
Expand Up @@ -772,24 +772,6 @@ DEFINE_BITFIELD(turret_flags, list(
stun_projectile = /obj/projectile/bullet/syndicate_turret
lethal_projectile = /obj/projectile/bullet/syndicate_turret

/obj/machinery/porta_turret/syndicate/shuttle
scan_range = 9
shot_delay = 3
stun_projectile = /obj/projectile/bullet/p50/penetrator/shuttle
lethal_projectile = /obj/projectile/bullet/p50/penetrator/shuttle
lethal_projectile_sound = 'sound/weapons/gun/smg/shot.ogg'
stun_projectile_sound = 'sound/weapons/gun/smg/shot.ogg'
armor = list("melee" = 50, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 80, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90)

/obj/machinery/porta_turret/syndicate/shuttle/target(atom/movable/target)
if(target)
setDir(get_dir(base, target))//even if you can't shoot, follow the target
shootAt(target)
addtimer(CALLBACK(src, PROC_REF(shootAt), target), 5)
addtimer(CALLBACK(src, PROC_REF(shootAt), target), 10)
addtimer(CALLBACK(src, PROC_REF(shootAt), target), 15)
return TRUE

/obj/machinery/porta_turret/ai
faction = list("silicon")
turret_flags = TURRET_FLAG_SHOOT_CRIMINALS | TURRET_FLAG_SHOOT_ANOMALOUS | TURRET_FLAG_SHOOT_HEADS
Expand Down
4 changes: 0 additions & 4 deletions code/game/machinery/syndicatebeacon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,3 @@
/obj/item/sbeacondrop/heavylaserturret
desc = "A label on it reads: <i>Warning: Activating this device will send a heavy laser turret to your location</i>."
droptype = /obj/machinery/porta_turret/syndicate/energy/heavy

/obj/item/sbeacondrop/penetratorturret
desc = "A label on it reads: <i>Warning: Activating this device will send a penetrator turret to your location</i>."
droptype = /obj/machinery/porta_turret/syndicate/shuttle
28 changes: 0 additions & 28 deletions code/game/mecha/combat/reticence.dm

This file was deleted.

58 changes: 0 additions & 58 deletions code/game/mecha/equipment/weapons/weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -179,53 +179,6 @@
projectile = /obj/projectile/energy/electrode
fire_sound = 'sound/weapons/taser.ogg'


/obj/item/mecha_parts/mecha_equipment/weapon/honker
name = "\improper HoNkER BlAsT 5000"
desc = "Equipment for clown exosuits. Spreads fun and joy to everyone around. Honk!"
icon_state = "mecha_honker"
energy_drain = 200
equip_cooldown = 150
range = MECHA_MELEE|MECHA_RANGED
kickback = FALSE

/obj/item/mecha_parts/mecha_equipment/weapon/honker/can_attach(obj/mecha/combat/honker/M)
if(..())
if(istype(M))
return 1
return 0

/obj/item/mecha_parts/mecha_equipment/weapon/honker/action(target, params)
if(!action_checks(target))
return
playsound(chassis, 'sound/items/airhorn.ogg', 100, TRUE)
chassis.occupant_message("<font color='red' size='5'>HONK</font>")
for(var/mob/living/carbon/M in ohearers(6, chassis))
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(istype(H.ears, /obj/item/clothing/ears/earmuffs))
continue
var/turf/turf_check = get_turf(M)
if(isspaceturf(turf_check) && !turf_check.Adjacent(src)) //in space nobody can hear you honk.
continue
to_chat(M, "<font color='red' size='7'>HONK</font>")
M.SetSleeping(0)
M.stuttering += 20
M.adjustEarDamage(0, 30)
M.Paralyze(60)
if(prob(30))
M.Stun(200)
M.Unconscious(80)
else
M.Jitter(500)

log_message("Honked from [src.name]. HONK!", LOG_MECHA)
var/turf/T = get_turf(src)
message_admins("[ADMIN_LOOKUPFLW(chassis.occupant)] used a Mecha Honker in [ADMIN_VERBOSEJMP(T)]")
log_game("[key_name(chassis.occupant)] used a Mecha Honker in [AREACOORD(T)]")
return 1


//Base ballistic weapon type
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic
name = "general ballistic weapon"
Expand Down Expand Up @@ -311,17 +264,6 @@
harmful = TRUE
ammo_type = "incendiary"

/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced
name = "\improper S.H.H. \"Quietus\" Carbine"
desc = "A weapon for combat exosuits. A mime invention, field tests have shown that targets cannot even scream before going down."
fire_sound = 'sound/weapons/gun/general/heavy_shot_suppressed.ogg'
icon_state = "mecha_mime"
equip_cooldown = 30
projectile = /obj/projectile/bullet/mime
projectiles = 6
projectile_energy_cost = 50
harmful = TRUE

/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot
name = "\improper LBX-10 \"Scattershot\" Heavy Shotgun"
desc = "A weapon for combat exosuits. Shoots a spread of pellets."
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/granters.dm
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@

/obj/item/book/granter/spell/random/Initialize()
. = ..()
var/static/banned_spells = list(/obj/item/book/granter/spell/mimery_blockade, /obj/item/book/granter/spell/mimery_guns)
var/static/banned_spells = list(/obj/item/book/granter/spell/mimery_blockade)
var/real_type = pick(subtypesof(/obj/item/book/granter/spell) - banned_spells)
new real_type(loc)
return INITIALIZE_HINT_QDEL
Expand Down
7 changes: 4 additions & 3 deletions code/game/objects/items/implants/implant_track.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@
///The id of the timer that's qdeleting us
var/timerid

/obj/item/implant/tracking/c38
/obj/item/implant/tracking/bullet
name = "TRAC implant"
desc = "A smaller tracking implant that supplies power for only a few minutes."
var/lifespan = 3000 //how many deciseconds does the implant last?
allow_teleport = FALSE

/obj/item/implant/tracking/c38/Initialize()
/obj/item/implant/tracking/bullet/Initialize()
. = ..()
timerid = QDEL_IN(src, lifespan)
AddComponent(/datum/component/gps/item, "*TRAC")

/obj/item/implant/tracking/c38/Destroy()
/obj/item/implant/tracking/bullet/Destroy()
deltimer(timerid)
return ..()

Expand Down
31 changes: 31 additions & 0 deletions code/game/objects/items/shrapnel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,37 @@
name = "\improper .38 DumDum bullet"
embedding = list(embed_chance=70, fall_chance=7, jostle_chance=7, ignore_throwspeed_threshold=TRUE, pain_stam_pct=0.4, pain_mult=5, jostle_pain_mult=6, rip_time=10, embed_chance_turf_mod=-100)

/obj/item/shrapnel/bullet/tracker
name = "\improper bullet tracker"
embedding = list(embed_chance=100, fall_chance=0, jostle_chance=1, ignore_throwspeed_threshold=TRUE, pain_stam_pct=0.4, pain_mult=1, jostle_pain_mult=2, rip_time=100, embed_chance_turf_mod=-100)
var/lifespan = 3000
var/gps_tag = "*TRAC"
var/timer_id

/obj/item/shrapnel/bullet/tracker/Initialize()
. = ..()
timer_id = QDEL_IN(src, lifespan)
AddComponent(/datum/component/gps/item, gps_tag)

/obj/item/shrapnel/bullet/tracker/Destroy()
deltimer(timer_id)
return ..()

/obj/item/shrapnel/bullet/tracker/c38
name = ".38 Tracker"

/obj/item/shrapnel/bullet/tracker/a8_50r
name = "8x50mm Tracker"

/obj/item/shrapnel/bullet/tracker/a858
name = "8x58mm Tracker"

/obj/item/shrapnel/bullet/tracker/a65clip
name = "6.5x57mm Tracker"

/obj/item/shrapnel/bullet/tracker/a308
name = ".308 Tracker"

/obj/projectile/bullet/shrapnel
name = "flying shrapnel shard"
damage = 10
Expand Down
1 change: 0 additions & 1 deletion code/game/objects/items/storage/uplink_kits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,6 @@

/obj/item/storage/box/syndie_kit/mimery/PopulateContents()
new /obj/item/book/granter/spell/mimery_blockade(src)
new /obj/item/book/granter/spell/mimery_guns(src)

/obj/item/storage/box/syndie_kit/centcom_costume/PopulateContents()
new /obj/item/clothing/under/rank/centcom/official(src)
Expand Down
29 changes: 29 additions & 0 deletions code/modules/cargo/blackmarket/blackmarket_items/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,32 @@
stock_min = 3
stock_max = 8
availability_prob = 50

/datum/blackmarket_item/ammo/a8x50match
name = "8x50mm Match Box"
desc = "We found this dead guy with a recording of him going \"Watch this!\", and richoetting something before crumbling over. This is the ammo he had!"
item = /obj/item/storage/box/ammo/a8_50r/match
price_min = 500
price_max = 1000
stock_min = 1
stock_max = 4
availability_prob = 30

/datum/blackmarket_item/ammo/c22rub
name = ".22lr Rubbers"
desc = "A 100 round box of .22 rubbershot from some godsforsaken frontier world. We're pretty sure the use-case is making someone think that they just pissed off a beehive"
item = /obj/item/storage/box/ammo/c22lr/rubber
price_min = 400
price_max = 800
stock_min = 1
stock_max = 4
availability_prob = 40

/datum/blackmarket_item/ammo/a8x58trac
name = "8x58mm Tracker"
desc = "We hot glued a GPS onto the inside of this 8x58mm shell! For the low low price of. Whatever the price is. You can have it!"
item = /obj/item/ammo_casing/caseless/a858/trac
price_min = 50
price_max = 500
stock_min = 4
stock_max = 8
Loading
Loading