Skip to content

Commit

Permalink
TGS Test Merge (#6938)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Sep 13, 2024
2 parents f92b81a + 4ac3831 commit 79d9949
Show file tree
Hide file tree
Showing 53 changed files with 603 additions and 11 deletions.
2 changes: 2 additions & 0 deletions code/__DEFINES/conflict.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
#define AMMO_MP (1<<21)
/// Handles sentry flamers glob
#define AMMO_FLAME (1<<22)
// If the projectile hits a dense turf it'll do on_hit_turf on the turf just in front of the turf instead of on the turf itself (This one does not work on mobs)
#define AMMO_STRIKES_SURFACE_ONLY (1<<23)
// NOTE: Don't add flags past 1<<23, it'll break things due to BYOND limitations. You can usually use a Component instead.

/// Projectile is shrpanel which allow it to skip some collisions
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/weapon_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ As such, don't expect any values assigned to common firearms to even consider ho
//How many ticks you have to wait between firing. Burst delay uses the same variable!
*/

#define FIRE_DELAY_TIER_SHARP 40
#define FIRE_DELAY_TIER_AMR 30
#define FIRE_DELAY_TIER_VULTURE 20
#define FIRE_DELAY_TIER_SNIPER 15
Expand Down
59 changes: 59 additions & 0 deletions code/datums/supply_packs/spec_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,65 @@
containername = "M4RA Scout Impact Magazine Crate"
group = "Weapons Specialist Ammo"

//SHARP

/datum/supply_packs/ammo_grenadier_sharp_mix
name = "SHARP Operator Mixed Magazine Crate (explosive x2, flechette x2, incendiary x2)"
contains = list(
/obj/item/ammo_magazine/rifle/sharp/explosive,
/obj/item/ammo_magazine/rifle/sharp/explosive,
/obj/item/ammo_magazine/rifle/sharp/flechette,
/obj/item/ammo_magazine/rifle/sharp/flechette,
/obj/item/ammo_magazine/rifle/sharp/incendiary,
/obj/item/ammo_magazine/rifle/sharp/incendiary,
)
cost = 40
containertype = /obj/structure/closet/crate/ammo
containername = "SHARP Operator Mixed Magazine Crate"
group = "Weapons Specialist Ammo"

/datum/supply_packs/ammo_grenadier_sharp_explosive
name = "SHARP Operator Explosive Magazine Crate (x5)"
contains = list(
/obj/item/ammo_magazine/rifle/sharp/explosive,
/obj/item/ammo_magazine/rifle/sharp/explosive,
/obj/item/ammo_magazine/rifle/sharp/explosive,
/obj/item/ammo_magazine/rifle/sharp/explosive,
/obj/item/ammo_magazine/rifle/sharp/explosive,
)
cost = 30
containertype = /obj/structure/closet/crate/ammo
containername = "SHARP Operator Explosive Magazine Crate"
group = "Weapons Specialist Ammo"

/datum/supply_packs/ammo_grenadier_sharp_flechette
name = "SHARP Operator Flechette Magazine Crate (x5)"
contains = list(
/obj/item/ammo_magazine/rifle/sharp/flechette,
/obj/item/ammo_magazine/rifle/sharp/flechette,
/obj/item/ammo_magazine/rifle/sharp/flechette,
/obj/item/ammo_magazine/rifle/sharp/flechette,
/obj/item/ammo_magazine/rifle/sharp/flechette,
)
cost = 30
containertype = /obj/structure/closet/crate/ammo
containername = "SHARP Operator Flechette Magazine Crate"
group = "Weapons Specialist Ammo"

/datum/supply_packs/ammo_grenadier_sharp_incendiary
name = "SHARP Operator incendiary Magazine Crate (x5)"
contains = list(
/obj/item/ammo_magazine/rifle/sharp/incendiary,
/obj/item/ammo_magazine/rifle/sharp/incendiary,
/obj/item/ammo_magazine/rifle/sharp/incendiary,
/obj/item/ammo_magazine/rifle/sharp/incendiary,
/obj/item/ammo_magazine/rifle/sharp/incendiary,
)
cost = 30
containertype = /obj/structure/closet/crate/ammo
containername = "SHARP Operator incendiary Magazine Crate"
group = "Weapons Specialist Ammo"

//M240-T

/datum/supply_packs/ammo_pyro_mix
Expand Down
17 changes: 13 additions & 4 deletions code/game/gamemodes/colonialmarines/whiskey_outpost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@
var/list/supplies = list(
"10x24mm, slugs, buckshot, and 10x20mm rounds",
"Explosives and grenades",
"SHARP ammo",
"Rocket ammo",
"Sniper ammo",
"Anti-Material Sniper ammo",
Expand Down Expand Up @@ -641,11 +642,14 @@
if("Explosives and grenades")
supply_drop = 5
to_chat(usr, SPAN_NOTICE("Explosives and grenades will now drop!"))
if("Pyrotechnician tanks")
if("SHARP ammo")
supply_drop = 6
to_chat(usr, SPAN_NOTICE("SHARP ammo will now drop!"))
if("Pyrotechnician tanks")
supply_drop = 7
to_chat(usr, SPAN_NOTICE("Pyrotechnician tanks will now drop!"))
if("Scout ammo")
supply_drop = 7
supply_drop = 8
to_chat(usr, SPAN_NOTICE("Scout ammo will now drop!"))
else
return
Expand Down Expand Up @@ -747,12 +751,17 @@
if(5) // Give them explosives + Grenades for the Grenade spec. Might be too many grenades, but we'll find out.
spawnitems = list(/obj/item/storage/box/explosive_mines,
/obj/item/storage/belt/grenade/full)
if(6) // Pyrotech
if(6) // SHARP ammo
spawnitems = list(/obj/item/ammo_magazine/rifle/sharp/explosive,
/obj/item/ammo_magazine/rifle/sharp/explosive,
/obj/item/ammo_magazine/rifle/sharp/incendiary,
/obj/item/ammo_magazine/rifle/sharp/flechette,)
if(7) // Pyrotech
var/fuel = pick(/obj/item/ammo_magazine/flamer_tank/large/B, /obj/item/ammo_magazine/flamer_tank/large/X)
spawnitems = list(/obj/item/ammo_magazine/flamer_tank/large,
/obj/item/ammo_magazine/flamer_tank/large,
fuel)
if(7) // Scout
if(8) // Scout
spawnitems = list(/obj/item/ammo_magazine/rifle/m4ra/custom,
/obj/item/ammo_magazine/rifle/m4ra/custom,
/obj/item/ammo_magazine/rifle/m4ra/custom/incendiary,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_spec, list(
list("WEAPONS SPECIALIST SETS (CHOOSE 1)", 0, null, null, null),
list("Demolitionist Set", 0, /obj/item/storage/box/spec/demolitionist, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_REGULAR),
list("Heavy Grenadier Set", 0, /obj/item/storage/box/spec/heavy_grenadier, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_REGULAR),
list("SHARP Operator Set", 0, /obj/item/storage/box/spec/sharp_operator, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_REGULAR),
list("Pyro Set", 0, /obj/item/storage/box/spec/pyro, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_REGULAR),
list("Scout Set", 0, /obj/item/storage/box/spec/scout, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_REGULAR),
list("Sniper Set", 0, /obj/item/storage/box/spec/sniper, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_RECOMMENDED),
Expand All @@ -25,6 +26,11 @@ GLOBAL_LIST_INIT(cm_vending_gear_spec, list(
list("84mm High-Explosive Rocket", 40, /obj/item/ammo_magazine/rocket, null, VENDOR_ITEM_REGULAR),
list("84mm White-Phosphorus Rocket", 40, /obj/item/ammo_magazine/rocket/wp, null, VENDOR_ITEM_REGULAR),

list("EXTRA SHARP AMMUNITION", 0, null, null, null),
list("SHARP 9X-E Sticky Explosive Dart magazine (darts)", 40, /obj/item/ammo_magazine/rifle/sharp/explosive, null, VENDOR_ITEM_REGULAR),
list("SHARP 9X-T Sticky incendiary Dart magazine (darts)", 40, /obj/item/ammo_magazine/rifle/sharp/incendiary, null, VENDOR_ITEM_REGULAR),
list("SHARP 9X-F Flechette Dart Magazine (darts)", 40, /obj/item/ammo_magazine/rifle/sharp/flechette, null, VENDOR_ITEM_REGULAR),

list("EXTRA GRENADES", 0, null, null, null),
list("M40 HEDP Grenades x6", 40, /obj/effect/essentials_set/hedp_6_pack, null, VENDOR_ITEM_REGULAR),
list("M40 HIDP Incendiary Grenades x6", 40, /obj/effect/essentials_set/hidp_6_pack, null, VENDOR_ITEM_REGULAR),
Expand Down
5 changes: 5 additions & 0 deletions code/game/machinery/vending/vendor_types/wo_vendors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@
list("84mm High-Explosive Rocket", floor(scale * 1), /obj/item/ammo_magazine/rocket, VENDOR_ITEM_REGULAR),
list("84mm White-Phosphorus Rocket", floor(scale * 1), /obj/item/ammo_magazine/rocket/wp, VENDOR_ITEM_REGULAR),

list("EXTRA SHARP AMMUNITION", -1, null, null, null),
list("SHARP 9X-E Sticky Explosive Dart magazine (darts)", round(scale * 1.5), /obj/item/ammo_magazine/rifle/sharp/explosive, null, VENDOR_ITEM_REGULAR),
list("SHARP 9X-T Sticky incendiary Dart magazine (darts)", round(scale * 1), /obj/item/ammo_magazine/rifle/sharp/incendiary, null, VENDOR_ITEM_REGULAR),
list("SHARP 9X-F Flechette Dart Magazine (darts)", round(scale * 1), /obj/item/ammo_magazine/rifle/sharp/flechette, null, VENDOR_ITEM_REGULAR),

list("EXTRA GRENADES", -1, null, null, null),
list("M40 HEDP Grenade Pack (x6)", floor(scale * 1.5), /obj/effect/essentials_set/hedp_6_pack, VENDOR_ITEM_REGULAR),
list("M40 HIDP Grenade Pack (x6)", floor(scale * 1.5), /obj/effect/essentials_set/hidp_6_pack, VENDOR_ITEM_REGULAR),
Expand Down
8 changes: 7 additions & 1 deletion code/game/objects/effects/effect_system/smoke.dm
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,17 @@
var/burn_damage = 40
var/applied_fire_stacks = 5
var/xeno_yautja_reduction = 0.75
var/reagent = new /datum/reagent/napalm/ut()

/obj/effect/particle_effect/smoke/phosphorus/weak
time_to_live = 2
smokeranking = SMOKE_RANK_MED
burn_damage = 30
xeno_yautja_reduction = 0.5

/obj/effect/particle_effect/smoke/phosphorus/sharp
reagent = new /datum/reagent/napalm/blue()

/obj/effect/particle_effect/smoke/phosphorus/Move()
. = ..()
for(var/mob/living/carbon/affected_mob in get_turf(src))
Expand Down Expand Up @@ -351,7 +355,6 @@
if(isyautja(affected_mob) || isxeno(affected_mob))
damage *= xeno_yautja_reduction

var/reagent = new /datum/reagent/napalm/ut()
affected_mob.burn_skin(damage)
affected_mob.adjust_fire_stacks(applied_fire_stacks, reagent)
affected_mob.IgniteMob()
Expand Down Expand Up @@ -761,6 +764,9 @@
/datum/effect_system/smoke_spread/phosphorus/weak
smoke_type = /obj/effect/particle_effect/smoke/phosphorus/weak

/datum/effect_system/smoke_spread/phosphorus/sharp
smoke_type = /obj/effect/particle_effect/smoke/phosphorus/sharp

/datum/effect_system/smoke_spread/cn20
smoke_type = /obj/effect/particle_effect/smoke/cn20

Expand Down
118 changes: 117 additions & 1 deletion code/game/objects/items/explosives/mine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@

if(!customizable)
set_tripwire()
return;
return

if(!detonator)
active = TRUE
Expand Down Expand Up @@ -339,3 +339,119 @@
/obj/item/explosive/mine/sebb/prime()
new /obj/item/explosive/grenade/sebb/primed(get_turf(src))
qdel(src)

/obj/item/explosive/mine/sharp
name = "\improper P9 SHARP explosive dart"
desc = "An experimental P9 SHARP proximity triggered explosive dart designed by Armat Systems for use by the United States Colonial Marines. This one has full 360 detection range."
icon_state = "sharp_explosive_mine"
angle = 360
var/disarmed = FALSE
var/explosion_size = 100
var/explosion_falloff = 50
var/mine_level = 1
var/deploy_time = 0
var/mine_state = ""

/obj/item/explosive/mine/sharp/proc/upgrade_mine()
mine_level++
icon_state = mine_state + "_[mine_level]"

/obj/item/explosive/mine/sharp/check_for_obstacles(mob/living/user)
return FALSE

/obj/item/explosive/mine/sharp/attackby(obj/item/W, mob/user)
return

/obj/item/explosive/mine/sharp/set_tripwire()
if(!active && !tripwire)
for(var/direction in CARDINAL_ALL_DIRS)
var/tripwire_loc = get_turf(get_step(loc,direction))
tripwire = new(tripwire_loc)
tripwire.linked_claymore = src
active = TRUE

/obj/item/explosive/mine/sharp/prime(mob/user)
set waitfor = FALSE
if(!cause_data)
cause_data = create_cause_data(initial(name), user)
if(mine_level == 1)
explosion_size = 100
else if(mine_level == 2)
explosion_size = 115
else if(mine_level == 3)
explosion_size = 130
else
explosion_size = 145
cell_explosion(loc, explosion_size, explosion_falloff, EXPLOSION_FALLOFF_SHAPE_LINEAR, CARDINAL_ALL_DIRS, cause_data)
playsound(loc, 'sound/weapons/gun_sharp_explode.ogg', 100)
qdel(src)

/obj/item/explosive/mine/sharp/disarm()
anchored = FALSE
active = FALSE
triggered = FALSE
icon_state = "sharp_mine_disarmed"
QDEL_NULL(tripwire)
disarmed = TRUE
add_to_garbage(src)

/obj/item/explosive/mine/sharp/attack_self(mob/living/user)
if(disarmed)
return
. = ..()

/obj/item/explosive/mine/sharp/deploy_mine(mob/user)
if(disarmed)
return
if(!hard_iff_lock && user)
iff_signal = user.faction


cause_data = create_cause_data(initial(name), user)
if(user)
user.drop_inv_item_on_ground(src)
setDir(user ? user.dir : dir) //The direction it is planted in is the direction the user faces at that time
activate_sensors()
update_icon()
deploy_time = world.time
mine_state = icon_state
addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/item/explosive/mine/sharp, upgrade_mine)), 30 SECONDS, TIMER_DELETE_ME)
addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/item/explosive/mine/sharp, upgrade_mine)), 60 SECONDS, TIMER_DELETE_ME)
addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/item/explosive/mine/sharp, upgrade_mine)), 90 SECONDS, TIMER_DELETE_ME)
for(var/mob/living/carbon/mob in range(1, src))
try_to_prime(mob)

/obj/item/explosive/mine/sharp/attack_alien()
if(disarmed)
..()
else
return

/obj/item/explosive/mine/sharp/incendiary
name = "\improper P9 SHARP incendiary dart"
desc = "An experimental P9 SHARP proximity triggered explosive dart designed by Armat Systems for use by the United States Colonial Marines. This one has full 360 detection range."
icon_state = "sharp_incendiary_mine"

/obj/item/explosive/mine/sharp/incendiary/prime(mob/user)
set waitfor = FALSE
if(!cause_data)
cause_data = create_cause_data(initial(name), user)
if(mine_level == 1)
var/datum/effect_system/smoke_spread/phosphorus/smoke = new /datum/effect_system/smoke_spread/phosphorus/sharp
var/smoke_radius = 2
smoke.set_up(smoke_radius, 0, loc)
smoke.start()
playsound(loc, 'sound/weapons/gun_sharp_explode.ogg', 100)
else if(mine_level == 2)
var/datum/reagent/napalm/green/reagent = new()
new /obj/flamer_fire(loc, cause_data, reagent, 2)
playsound(loc, 'sound/weapons/gun_flamethrower3.ogg', 45)
else if(mine_level == 3)
var/datum/reagent/napalm/ut/reagent = new()
new /obj/flamer_fire(loc, cause_data, reagent, 2)
playsound(loc, 'sound/weapons/gun_flamethrower3.ogg', 45)
else
var/datum/reagent/napalm/ut/reagent = new()
new /obj/flamer_fire(loc, cause_data, reagent, 3)
playsound(loc, 'sound/weapons/gun_flamethrower3.ogg', 45)
qdel(src)
54 changes: 53 additions & 1 deletion code/game/objects/items/shards.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
icon_state = "phoron"
source_sheet_type = /obj/item/stack/sheet/glass/phoronglass


// Shrapnel.
// on_embed is called from projectile.dm, bullet_act(obj/projectile/P).
// on_embedded_movement is called from human.dm, handle_embedded_objects().
Expand Down Expand Up @@ -265,3 +264,56 @@
/obj/item/shard/shrapnel/tutorial
damage_on_move = 0


/obj/item/sharp
name = "sharp dart shrapnel"
desc = "It looks like a used 9X-E Sticky Explosive Dart, useless now."
icon = 'icons/obj/items/weapons/projectiles.dmi'
icon_state = "sharp_explosive_dart"
sharp = IS_SHARP_ITEM_BIG
w_class = SIZE_SMALL
edge = TRUE
force = 0
throwforce = 0
garbage = TRUE
var/damage_on_move = 3
var/count = 1

/obj/item/sharp/Initialize(mapload, dir)
. = ..()
if(dir && dir <= 6)
turn_object(90)
else
turn_object(270)

/obj/item/sharp/proc/on_embed(mob/embedded_mob, obj/limb/target_organ)
return

/obj/item/sharp/proc/on_embedded_movement(mob/living/embedded_mob)
if(!ishuman(embedded_mob))
return
var/mob/living/carbon/human/H = embedded_mob
if(H.species.flags & NO_SHRAPNEL)
return
var/obj/limb/organ = embedded_organ
if(istype(organ))
organ.take_damage(damage_on_move * count, 0, 0, no_limb_loss = TRUE)
embedded_mob.pain.apply_pain(damage_on_move * count)

/obj/item/sharp/proc/turn_object(amount)
var/matrix/initial_matrix = matrix(transform)
initial_matrix.Turn(amount)
apply_transform(initial_matrix)

/obj/item/sharp/explosive
name = "\improper 9X-E Sticky Explosive Dart"

/obj/item/sharp/incendiary
name = "\improper 9X-T Sticky Incendiary Dart"
desc = "It looks like a used 9X-T Sticky Incendiary Dart, useless now."
icon_state = "sharp_incendiary_dart"

/obj/item/sharp/flechette
name = "\improper 9X-F Flechette Dart"
desc = "It looks like a used 9X-F Flechette Dart, useless now."
icon_state = "sharp_flechette_dart"
Loading

0 comments on commit 79d9949

Please sign in to comment.