Skip to content

Commit

Permalink
TGS Test Merge (#5697)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Mar 27, 2024
2 parents 534acef + 4c26ecb commit 3fe6a10
Show file tree
Hide file tree
Showing 22 changed files with 254 additions and 6 deletions.
12 changes: 12 additions & 0 deletions code/datums/supply_packs/explosives.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@
containername = "\improper explosive M40 HEDP grenades crate (WARNING)"
group = "Explosives"

/datum/supply_packs/explosives_sebb
name = "G2 electroshock grenades crate (x6)"
contains = list(
/obj/item/storage/box/packet/sebb,
/obj/item/storage/box/packet/sebb,
)
cost = 30
containertype = /obj/structure/closet/crate/explosives
containername = "\improper G2 electroshock grenades crate (WARNING)"
group = "Explosives"


/datum/supply_packs/explosives_hedp
name = "M40 HEDP blast grenade box crate (x25)"
contains = list(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_commanding_officer, list(
list("HEDP Grenade Pack", 15, /obj/item/storage/box/packet/high_explosive, null, VENDOR_ITEM_REGULAR),
list("HEFA Grenade Pack", 15, /obj/item/storage/box/packet/hefa, null, VENDOR_ITEM_REGULAR),
list("WP Grenade Pack", 15, /obj/item/storage/box/packet/phosphorus, null, VENDOR_ITEM_REGULAR),
list("G2 Electroshock Grenade Packet (x3 grenades)", 15, /obj/item/storage/box/packet/sebb, null, VENDOR_ITEM_REGULAR),

list("RAIL ATTACHMENTS", 0, null, null, null),
list("Red-Dot Sight", 15, /obj/item/attachable/reddot, null, VENDOR_ITEM_REGULAR),
Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/vending/vendor_types/requisitions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
list("M40 MFHS Metal Foam Grenade", round(scale * 6), /obj/item/explosive/grenade/metal_foam, VENDOR_ITEM_REGULAR),
list("Plastic Explosives", round(scale * 3), /obj/item/explosive/plastic, VENDOR_ITEM_REGULAR),
list("Breaching Charge", round(scale * 2), /obj/item/explosive/plastic/breaching_charge, VENDOR_ITEM_REGULAR),
list("G2 Electroshock Grenade", round(scale * 5), /obj/item/explosive/grenade/sebb, null, VENDOR_ITEM_REGULAR),

list("WEBBINGS", -1, null, null),
list("Black Webbing Vest", round(scale * 2), /obj/item/clothing/accessory/storage/black_vest, VENDOR_ITEM_REGULAR),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_engi, list(
list("M74 AGM-Hornet Airburst Packet (x3 airburst grenades", 20, /obj/item/storage/box/packet/hornet, null, VENDOR_ITEM_REGULAR),
list("M20 Mine Box (x4 mines)", 18, /obj/item/storage/box/explosive_mines, null, VENDOR_ITEM_REGULAR),
list("M40 MFHS Metal Foam Grenade", 5, /obj/item/explosive/grenade/metal_foam, null, VENDOR_ITEM_REGULAR),
list("G2 Electroshock Grenade Packet (x3 grenades)", 18, /obj/item/storage/box/packet/sebb, null, VENDOR_ITEM_REGULAR),

list("PRIMARY AMMUNITION", 0, null, null, null),
list("M4RA AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_leader, list(
list("M74 AGM-Hornet Airburst Packet (x3 airburst grenades", 20, /obj/item/storage/box/packet/hornet, null, VENDOR_ITEM_REGULAR),
list("M20 Mine Box (x4 mines)", 20, /obj/item/storage/box/explosive_mines, null, VENDOR_ITEM_REGULAR),
list("M40 MFHS Metal Foam Grenade", 5, /obj/item/explosive/grenade/metal_foam, null, VENDOR_ITEM_REGULAR),
list("G2 Electroshock Grenade Packet (x3 grenades)", 18, /obj/item/storage/box/packet/sebb, null, VENDOR_ITEM_REGULAR),

list("MEDICAL SUPPLIES", 0, null, null, null),
list("Burn Kit", 2, /obj/item/stack/medical/advanced/ointment, null, VENDOR_ITEM_REGULAR),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_medic, list(
list("M74 AGM-Smoke Airburst Packet (x3 airburst grenades)", 10, /obj/item/storage/box/packet/airburst_smoke, null, VENDOR_ITEM_REGULAR),
list("M74 AGM-Hornet Airburst Packet (x3 airburst grenades", 20, /obj/item/storage/box/packet/hornet, null, VENDOR_ITEM_REGULAR),
list("M20 Mine Box (x4 mines)", 20, /obj/item/storage/box/explosive_mines, null, VENDOR_ITEM_REGULAR),
list("G2 Electroshock Grenade Packet (x3 grenades)", 18, /obj/item/storage/box/packet/sebb, null, VENDOR_ITEM_REGULAR),

list("PRIMARY AMMUNITION", 0, null, null, null),
list("M4RA AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_spec, list(
list("M74 AGM-F Fragmentation Grenades x6", 40, /obj/effect/essentials_set/agmf_6_pack, null, VENDOR_ITEM_REGULAR),
list("M74 AGM-I Incendiary Grenades x6", 40, /obj/effect/essentials_set/agmi_6_pack, null, VENDOR_ITEM_REGULAR),
list("M74 AGM-S Smoke Grenades x6", 20, /obj/effect/essentials_set/agms_6_pack, null, VENDOR_ITEM_REGULAR),
list("G2 Electroshock Grenade Pack x6", 40, /obj/effect/essentials_set/sebb_6_pack, null, VENDOR_ITEM_REGULAR),

list("EXTRA FLAMETHROWER TANKS", 0, null, null, null),
list("Large Incinerator Tank", 40, /obj/item/ammo_magazine/flamer_tank/large, null, VENDOR_ITEM_REGULAR),
Expand Down Expand Up @@ -230,3 +231,13 @@ GLOBAL_LIST_INIT(cm_vending_clothing_specialist, list(
/obj/item/explosive/grenade/smokebomb/airburst,
/obj/item/explosive/grenade/smokebomb/airburst,
)

/obj/effect/essentials_set/sebb_6_pack
spawned_gear_list = list(
/obj/item/explosive/grenade/sebb,
/obj/item/explosive/grenade/sebb,
/obj/item/explosive/grenade/sebb,
/obj/item/explosive/grenade/sebb,
/obj/item/explosive/grenade/sebb,
/obj/item/explosive/grenade/sebb,
)
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_tl, list(
list("M74 AGM-Hornet Airburst Packet (x3 airburst grenades", 20, /obj/item/storage/box/packet/hornet, null, VENDOR_ITEM_REGULAR),
list("M20 Mine Box (x4 mines)", 20, /obj/item/storage/box/explosive_mines, null, VENDOR_ITEM_REGULAR),
list("M40 MFHS Metal Foam Grenade", 5, /obj/item/explosive/grenade/metal_foam, null, VENDOR_ITEM_REGULAR),
list("G2 Electroshock Grenade Packet (x3 grenades)", 18, /obj/item/storage/box/packet/sebb, null, VENDOR_ITEM_REGULAR),

list("PRIMARY AMMUNITION", 0, null, null, null),
list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR),
Expand Down
8 changes: 7 additions & 1 deletion code/game/objects/effects/overlays.dm
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@
icon_state = "empdisable"
name = "emp sparks"
effect_duration = 10
mouse_opacity = MOUSE_OPACITY_TRANSPARENT

/obj/effect/overlay/temp/emp_sparks/New(loc)
setDir(pick(GLOB.cardinals))
Expand All @@ -235,7 +236,12 @@
effect_duration = 20



/obj/effect/overlay/temp/elec_arc
icon = 'icons/effects/effects.dmi'
icon_state = "electricity"
name = "electric arc"
effect_duration = 3 SECONDS
mouse_opacity = MOUSE_OPACITY_TRANSPARENT

//gib animation

Expand Down
178 changes: 178 additions & 0 deletions code/game/objects/items/explosives/grenades/marines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,184 @@
icon_state = "grenade_phos_clf"
item_state = "grenade_phos_clf"

/obj/item/explosive/grenade/sebb
name = "\improper G2 Electroshock grenade"
desc = "This is a G2 Electroshock Grenade. Produced by Armat Battlefield Systems, it's sometimes referred to as the Sonic Electric Ball Breaker, \
after a rash of incidents where the intense 1.2 gV sonic payload caused... rupturing. \
A bounding landmine mode is available for this weapon which activates a small drill to self-bury itself when planted. Simply plant it at your feet and walk away."
icon_state = "grenade_sebb"
item_state = "grenade_sebb"
/// Maximum range of effect
var/range = 5
/// Maximum possible damage before falloff.
var/damage = 110
/// Factor to mutiply the effect range has on damage.
var/falloff_dam_reduction_mult = 20
/// Post falloff calc damage is divided by this to get xeno slowdown
var/xeno_slowdown_numerator = 12
/// Post falloff calc damage is multipled by this to get human stamina damage
var/human_stam_dam_factor = 0.9

/obj/item/explosive/grenade/sebb/get_examine_text(mob/user)
. = ..()
. += SPAN_NOTICE("To put into mine mode, plant at feet.")

/obj/item/explosive/grenade/sebb/afterattack(atom/target, mob/user, proximity)
var/turf/user_turf = get_turf(user)
if(active)
return

if(!isturf(target))
return

if(user.action_busy)
return

if(target != get_turf(user))
return

if(locate(/obj/item/explosive/mine) in get_turf(src))
to_chat(user, SPAN_WARNING("There already is a mine at this position!"))
return

if(antigrief_protection && user.faction == FACTION_MARINE && explosive_antigrief_check(src, user))
to_chat(user, SPAN_WARNING("\The [name]'s safe-area accident inhibitor prevents you from planting!"))
msg_admin_niche("[key_name(user)] attempted to plant \a [name] in [get_area(src)] [ADMIN_JMP(src.loc)]")
return

if(ishuman(user))
var/mob/living/carbon/human/human = user
if(!human.allow_gun_usage)
to_chat(user, SPAN_WARNING("Your programming prevents you from using this!"))
return

if(user_turf && (user_turf.density || locate(/obj/structure/fence) in user_turf))
to_chat(user, SPAN_WARNING("You can't plant a mine here."))
return

if(Adjacent(/obj/item/explosive/mine)) // bit more strict on this than normal mines
to_chat(user, SPAN_WARNING("Too close to another mine! Plant it somewhere less obvious."))
return

user.visible_message(SPAN_NOTICE("[user] starts deploying [src]."),
SPAN_NOTICE("You switch [src] into landmine mode and start placing it..."))
playsound(user.loc, 'sound/effects/thud.ogg', 40)
if(!do_after(user, 5 SECONDS * user.get_skill_duration_multiplier(SKILL_CONSTRUCTION), INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD))
to_chat(user, SPAN_NOTICE("You stop planting."))
return

user.visible_message(SPAN_NOTICE("[user] finishes deploying [src]."),
SPAN_NOTICE("You finish deploying [src]."))
var/obj/item/explosive/mine/sebb/planted = new /obj/item/explosive/mine/sebb(get_turf(user))
planted.iff_signal = user.faction // assuring IFF is set
planted.pixel_x += rand(-5, 5)
planted.pixel_y += rand(-5, 5)
qdel(src)

/obj/item/explosive/grenade/sebb/activate()
..()
var/beeplen = 6 // Actual length of the sound rounded up to nearest decisecond
var/soundtime = det_time - beeplen
if(det_time < beeplen) // just play sound if detonation shorter than the sound
playsound(src.loc, 'sound/effects/sebb_explode.ogg', 90, 0, 10)
else
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(playsound), src.loc, 'sound/effects/sebb_beep.ogg', 60, 0, 10), soundtime)


/obj/item/explosive/grenade/sebb/prime()
var/datum/effect_system/spark_spread/sparka = new
var/turf/sebb_turf = get_turf(src)
var/list/full_range = oview(range, src) // Fill a list of stuff in the range so we won't have to spam oview
new /obj/effect/overlay/temp/sebb(sebb_turf)

playsound(src.loc, 'sound/effects/sebb_explode.ogg', 90, 0, 10)

for(var/obj/structure/machinery/defenses/sentry/sentry_stun in full_range)
sentry_stun.sentry_range = 0 // Temporarily "disable" the sentry by killing its range then setting it back.
new /obj/effect/overlay/temp/elec_arc(get_turf(sentry_stun)) // sprites are meh but we need visual indication that the sentry was messed up
addtimer(VARSET_CALLBACK(sentry_stun, sentry_range, initial(sentry_stun.sentry_range)), 5 SECONDS) // assure to set it back
sentry_stun.visible_message(SPAN_DANGER("[src]'s screen flickes violently as it's shocked!"))
sentry_stun.visible_message(SPAN_DANGER("[src] says \"ERROR: Fire control system resetting due to critical voltage flucuation!\""))
sparka.set_up(1, 1, sentry_stun)
sparka.start()

for(var/turf/turf in full_range)
if(prob(8))
var/datum/effect_system/spark_spread/sparkTurf = new //using a different spike system because the spark system doesn't like when you reuse it for differant things
sparkTurf.set_up(1, 1, turf)
sparkTurf.start()
if(prob(10))
new /obj/effect/overlay/temp/emp_sparks(turf)

for(var/mob/living/carbon/mob in full_range) // no legacy mob support

var/mob_dist = get_dist(src, mob) // Distance from mob

/**
* Damage equation: damage - (mob distance * falloff_dam_reduction_mult)
* Example: A marine is 3 tiles out, the distance (3) is multiplied by falloff_dam_reduction_mult to get falloff.
* The raw damage is minused by falloff to get actual damage
*/

var/falloff = mob_dist * falloff_dam_reduction_mult
var/damage_applied = damage - falloff // Final damage applied after falloff calc
sparka.set_up(1, 1, mob)
sparka.start()
shake_camera(mob, 1, 1)
if(ishuman(mob))
var/mob/living/carbon/human/shocked_human = mob
if(isspeciessynth(shocked_human)) // Massive overvoltage to ungrounded robots is pretty bad
shocked_human.Stun(1 + (damage_applied/40))
damage_applied *= 1.5
new /obj/effect/overlay/temp/elec_arc(get_turf(shocked_human))
to_chat(mob, SPAN_HIGHDANGER("All of your systems jam up as your main bus is overvolted by [damage_applied*2] volts."))
mob.visible_message(SPAN_WARNING("[mob] seizes up from the elctric shock"))
shocked_human.take_overall_armored_damage(damage_applied, ARMOR_ENERGY, BURN, 90) // 90% chance to be on additional limbs
shocked_human.make_dizzy(damage_applied)
mob.apply_stamina_damage(damage_applied*human_stam_dam_factor) // Stamina damage
shocked_human.emote("pain")
else //nonhuman damage + slow
mob.apply_damage(damage_applied, BURN)
if((mob_dist < (range-3))) // 2 tiles around small superslow
mob.Superslow(2)
mob.Slow(damage_applied/11)

if(mob_dist < 1) // Range based stuff, standing ontop of the equivalent of a canned lighting bolt should mess you up.
mob.Superslow(3) // Note that humans will likely be in stamcrit so it's always worse for them when ontop of it and we can just balancing it on xenos.
mob.eye_blurry = damage_applied/4
mob.Daze(1)
else if((mob_dist < (range-1)) && (mob.mob_size < MOB_SIZE_XENO_VERY_SMALL)) // Flicker stun humans that are closer to the grenade and larvas too.
mob.apply_effect(1 + (damage_applied/100),WEAKEN) // 1 + damage/40
mob.eye_blurry = damage_applied/8

else
to_chat(mob, SPAN_HIGHDANGER("Your entire body seizes up as a powerful shock courses through it!"))


new /obj/effect/overlay/temp/emp_sparks(mob)
mob.make_jittery(damage_applied*2)
empulse(src, 1, 2) // mini EMP
qdel(src)


/obj/item/explosive/grenade/sebb/primed
desc = "A G2 Electroshock Grenade, looks like it's quite angry! Oh shit!"
det_time = 7 // 0.7 seconds to blow up. We want them to get caught if they go through.

/obj/item/explosive/grenade/sebb/primed/Initialize()
. = ..()
src.visible_message(SPAN_HIGHDANGER("[src] pops out of the ground!"))
activate()

/obj/effect/overlay/temp/sebb
icon = 'icons/effects/sebb.dmi'
icon_state = "sebb_explode"
layer = ABOVE_LIGHTING_PLANE
pixel_x = -175 // We need these offsets to force center the sprite because BYOND is dumb
pixel_y = -175
appearance_flags = RESET_COLOR


/*
//================================================
Nerve Gas Grenades
Expand Down
25 changes: 23 additions & 2 deletions code/game/objects/items/explosives/mine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
throw_speed = SPEED_VERY_FAST
unacidable = TRUE
flags_atom = FPRINT|CONDUCT
antigrief_protection = TRUE
allowed_sensors = list(/obj/item/device/assembly/prox_sensor)
max_container_volume = 120
reaction_limits = list( "max_ex_power" = 105, "base_ex_falloff" = 60, "max_ex_shards" = 32,
Expand Down Expand Up @@ -71,7 +72,12 @@
if(active || user.action_busy)
return

user.visible_message(SPAN_NOTICE("[user] starts deploying [src]."), \
if(antigrief_protection && user.faction == FACTION_MARINE && explosive_antigrief_check(src, user))
to_chat(user, SPAN_WARNING("\The [name]'s safe-area accident inhibitor prevents you from planting!"))
msg_admin_niche("[key_name(user)] attempted to plant \a [name] in [get_area(src)] [ADMIN_JMP(src.loc)]")
return

user.visible_message(SPAN_NOTICE("[user] starts deploying [src]."),
SPAN_NOTICE("You start deploying [src]."))
if(!do_after(user, 40, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE))
user.visible_message(SPAN_NOTICE("[user] stops deploying [src]."), \
Expand Down Expand Up @@ -297,7 +303,6 @@
/obj/item/explosive/mine/active/no_iff
iff_signal = null


/obj/item/explosive/mine/pmc
name = "\improper M20P Claymore anti-personnel mine"
desc = "The M20P Claymore is a directional proximity triggered anti-personnel mine designed by Armat Systems for use by the United States Colonial Marines. It has been modified for use by the Wey-Yu PMC forces."
Expand All @@ -317,3 +322,19 @@
customizable = TRUE
matter = list("metal" = 3750)
has_blast_wave_dampener = TRUE

/obj/item/explosive/mine/sebb
name = "\improper G2 Electroshock grenade"
icon_state = "grenade_sebb_planted"
desc = "A G2 electroshock grenade planted as a landmine."
pixel_y = -5
anchored = TRUE // this is supposed to be planeted already when spawned

/obj/item/explosive/mine/sebb/disarm()
. = ..()
new /obj/item/explosive/grenade/sebb(get_turf(src))
qdel(src)

/obj/item/explosive/mine/sebb/prime()
new /obj/item/explosive/grenade/sebb/primed(get_turf(src))
qdel(src)
2 changes: 1 addition & 1 deletion code/modules/clothing/head/helmet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ GLOBAL_LIST_INIT(allowed_helmet_items, list(
armor_melee = CLOTHING_ARMOR_MEDIUM
armor_bullet = CLOTHING_ARMOR_MEDIUM
armor_laser = CLOTHING_ARMOR_MEDIUMLOW
armor_energy = CLOTHING_ARMOR_NONE
armor_energy = CLOTHING_ARMOR_LOW
armor_bomb = CLOTHING_ARMOR_LOW
armor_bio = CLOTHING_ARMOR_MEDIUM
armor_rad = CLOTHING_ARMOR_LOW
Expand Down
6 changes: 5 additions & 1 deletion code/modules/clothing/suits/marine_armor/_marine_armor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
armor_melee = CLOTHING_ARMOR_MEDIUM
armor_bullet = CLOTHING_ARMOR_MEDIUM
armor_laser = CLOTHING_ARMOR_MEDIUMLOW
armor_energy = CLOTHING_ARMOR_NONE
armor_energy = CLOTHING_ARMOR_LOW
armor_bomb = CLOTHING_ARMOR_MEDIUMLOW
armor_bio = CLOTHING_ARMOR_MEDIUM
armor_rad = CLOTHING_ARMOR_MEDIUMLOW
Expand Down Expand Up @@ -361,6 +361,7 @@
armor_bomb = CLOTHING_ARMOR_MEDIUM
armor_bio = CLOTHING_ARMOR_MEDIUMHIGH
armor_internaldamage = CLOTHING_ARMOR_MEDIUMHIGH
armor_energy = CLOTHING_ARMOR_MEDIUM
specialty = "B12 pattern marine"
light_range = 5

Expand Down Expand Up @@ -534,6 +535,7 @@
armor_bomb = CLOTHING_ARMOR_HIGHPLUS
armor_bio = CLOTHING_ARMOR_MEDIUMHIGH
armor_rad = CLOTHING_ARMOR_MEDIUM
armor_energy = CLOTHING_ARMOR_MEDIUMLOW
armor_internaldamage = CLOTHING_ARMOR_MEDIUMHIGH
storage_slots = 2
slowdown = SLOWDOWN_ARMOR_LOWHEAVY
Expand Down Expand Up @@ -578,6 +580,7 @@
armor_bio = CLOTHING_ARMOR_MEDIUMLOW
armor_rad = CLOTHING_ARMOR_MEDIUMHIGH
armor_internaldamage = CLOTHING_ARMOR_MEDIUMHIGH
armor_energy = CLOTHING_ARMOR_MEDIUM
storage_slots = 2
flags_inventory = BLOCKSHARPOBJ|BLOCK_KNOCKDOWN
flags_armor_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_ARMS|BODY_FLAG_LEGS|BODY_FLAG_FEET
Expand Down Expand Up @@ -619,6 +622,7 @@
armor_bullet = CLOTHING_ARMOR_MEDIUMHIGH
armor_bomb = CLOTHING_ARMOR_VERYHIGH
armor_bio = CLOTHING_ARMOR_MEDIUMLOW
armor_energy = CLOTHING_ARMOR_MEDIUM
armor_internaldamage = CLOTHING_ARMOR_MEDIUMHIGH
flags_inventory = BLOCKSHARPOBJ|BLOCK_KNOCKDOWN
flags_item = MOB_LOCK_ON_EQUIP|NO_CRYO_STORE
Expand Down
Loading

0 comments on commit 3fe6a10

Please sign in to comment.