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 29, 2024
2 parents 3449382 + db04ccd commit f2dc894
Show file tree
Hide file tree
Showing 54 changed files with 644 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
4 changes: 4 additions & 0 deletions code/game/objects/effects/aliens.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@
W.acid_spray_act()
continue

if(istype(atm, /obj/item/explosive/mine/sharp))
var/obj/item/explosive/mine/sharp/sharp_mine = atm
sharp_mine.prime()

// Humans?
if(isliving(atm)) //For extinguishing mobs on fire
var/mob/living/M = atm
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
152 changes: 151 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,153 @@
/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"
layer = ABOVE_OBJ_LAYER
angle = 360
health = 50
var/disarmed = FALSE
var/explosion_size = 100
var/explosion_falloff = 50
var/mine_level = 1
var/deploy_time = 0
var/mine_state = ""
var/timer_id

/obj/item/explosive/mine/sharp/proc/upgrade_mine()
mine_level++
icon_state = mine_state + "_[mine_level]"
if(mine_level < 4)
timer_id = addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/item/explosive/mine/sharp, upgrade_mine)), 30 SECONDS, TIMER_DELETE_ME | TIMER_STOPPABLE)

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

/obj/item/explosive/mine/sharp/attackby(obj/item/W, mob/user)
if(user.action_busy)
return
else if(HAS_TRAIT(W, TRAIT_TOOL_MULTITOOL))
user.visible_message(SPAN_NOTICE("[user] starts disarming [src]."), \
SPAN_NOTICE("You start disarming [src]."))
if(!do_after(user, 30, INTERRUPT_NO_NEEDHAND, BUSY_ICON_FRIENDLY))
user.visible_message(SPAN_WARNING("[user] stops disarming [src]."), \
SPAN_WARNING("You stop disarming [src]."))
return
if(!active)//someone beat us to it
return
user.visible_message(SPAN_NOTICE("[user] finishes disarming [src]."), \
SPAN_NOTICE("You finish disarming [src]."))
disarm()
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 = 100
explosion_falloff = 25
else if(mine_level == 3)
explosion_size = 125
explosion_falloff = 30
else
explosion_size = 125
explosion_falloff = 25
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"
desc = "A disarmed P9 SHARP rifle dart, useless now."
QDEL_NULL(tripwire)
disarmed = TRUE
deltimer(timer_id)
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
timer_id = addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/item/explosive/mine/sharp, upgrade_mine)), 30 SECONDS, TIMER_DELETE_ME | TIMER_STOPPABLE)
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

//basically copy pasted from welding kit code
/obj/item/explosive/mine/sharp/bullet_act(obj/projectile/bullet)
var/damage = bullet.damage
health -= damage
..()
healthcheck()
return TRUE

/obj/item/explosive/mine/sharp/proc/healthcheck()
if(health <= 0)
prime()

/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)
Loading

0 comments on commit f2dc894

Please sign in to comment.