Skip to content

Commit

Permalink
SHIPPING
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantomEpicness committed Feb 11, 2024
1 parent daf8a19 commit ec4893f
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"**/.pnp.*": true
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"files.eol": "\n",
"files.insertFinalNewline": true,
Expand Down
4 changes: 2 additions & 2 deletions code/datums/supply_packs/explosives.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@
group = "Explosives"

/datum/supply_packs/explosives_sebb
name = "M40 HEDP blast grenades crate (x6)"
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 explosive M40 HEDP grenades crate (WARNING)"
containername = "\improper G2 electroshock grenades crate (WARNING)"
group = "Explosives"

/datum/supply_packs/explosives_hedp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +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 Pack", 15, /obj/item/storage/box/packet/sebb, null, VENDOR_ITEM_REGULAR),
list("G2 Electroshock Grenade Pack", 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
87 changes: 49 additions & 38 deletions code/game/objects/items/explosives/grenades/marines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -723,98 +723,109 @@
*/
/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."
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"
det_time = 40
var/range = 5
det_time = 4 SECONDS
var/range = 5 // Maximum range of effect
var/damage = 120 // Generic Energy damage from 1.2 GV. Distance scaled
var/dam_range_mult = 15 // Range is multiplied by this, then damage is subracted by this
var/spark_count = 12 // Stylistic effect only

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

/obj/item/explosive/grenade/afterattack(atom/target, mob/user, proximity)
if(!proximity || active || !isturf(target))
if(active)
return

if(!isturf(target))
return

if(user.action_busy)
return

if(target != user.loc)
if(target != get_turf(user))
return

to_chat(user, SPAN_NOTICE("You switch \the [src] into landmine mode and start burying it..."))
to_chat(user, SPAN_NOTICE("You switch [src] into landmine mode and start placing it..."))
playsound(user.loc, 'sound/effects/thud.ogg', 100, 6)
if(!do_after(user,20 * user.get_skill_duration_multiplier(SKILL_CONSTRUCTION), INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD))
if(!do_after(user,2 SECONDS * user.get_skill_duration_multiplier(SKILL_CONSTRUCTION), INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD))
to_chat(user, SPAN_NOTICE("You stop digging."))
return
new /obj/item/explosive/mine/sebb(user.loc)
var/obj/item/explosive/mine/sebb/planted = new /obj/item/explosive/mine/sebb(get_turf(user))
planted.pixel_x += rand(-5,5)
planted.pixel_y += rand(-5,5)
qdel(src)

/obj/item/explosive/grenade/sebb/activate()
..()
var/soundtime = det_time - 5
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound,src.loc,'sound/effects/sebb_beep.ogg',60,0, 10),soundtime)
//playsound(src.loc, 'sound/effects/sebb.ogg', 60, 1, 10)
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()
//flick('icons/effects/sebb.dmi',src)

new /obj/effect/overlay/sebb(src.loc)
/obj/item/explosive/grenade/sebb/prime()
var/list/full_range = oview(range,src) // Fill a list of stuff in the range so we won't have to spam it
new /obj/effect/overlay/sebb(get_turf(src))
playsound(src.loc, 'sound/effects/sebb_explode.ogg', 100, 0, 10)
for(var/turf/turf in oview(range,src)) // special effect funnies
create_shrapnel(loc, spark_count/2, , ,/datum/ammo/bullet/shrapnel/light/effect/ver1, cause_data)
create_shrapnel(loc, spark_count/2, , ,/datum/ammo/bullet/shrapnel/light/effect/ver2, cause_data)

for(var/turf/turf in full_range)
if(prob(25))
var/datum/effect_system/spark_spread/spark = new /datum/effect_system/spark_spread
spark.set_up(2, 1, turf)
spark.start()
for(var/mob/living/Mob in oview(range,src))
var/mob_range = get_dist(src,Mob)
for(var/mob/living/mob in full_range)
var/mob_range = get_dist(src,mob)
to_chat(world,mob_range) /// REMOVETHIS REMOVETHIS
var/dam_factor = mob_range * dam_range_mult
to_chat(world,dam_factor) /// REMOVETHIS REMOVETHIS
var/damage_applied = damage - dam_factor //divides damage
if(ishuman(Mob))
var/mob/living/carbon/human/shockedH = Mob
shockedH.take_overall_armored_damage(damage_applied ,ARMOR_ENERGY,BURN, 90) // 90% chance to be on additional limbs
shockedH.make_dizzy(damage_applied*3)
shockedH.make_jittery(damage_applied*3)
shockedH.emote("pain")
if(ishuman(mob))
var/mob/living/carbon/human/shocked_human = mob
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*3)
shocked_human.make_jittery(damage_applied*3)
shocked_human.emote("pain")
else
Mob.apply_damage(damage_applied, BURN)
//Mob.KnockDown(5) /// REMOVETHIS REMOVETHIS
if(!(Mob.client)) continue
mob.apply_damage(damage_applied, BURN)
//mob.KnockDown(5) /// REMOVETHIS REMOVETHIS
if(!(mob.client)) continue // REMOVETHIS REMOVETHIS anticrash
if(mob_range < 1) // they are probably dead if human so no unique human stuff.
Mob.KnockDown(2)
Mob.Superslow(3)
Mob.eye_blurry = damage_applied/4
mob.KnockDown(2)
mob.Superslow(3)
mob.eye_blurry = damage_applied/4
else
Mob.Slow(damage_applied/mob_range)
to_chat(Mob,SPAN_HIGHDANGER("Your entire body seizes up as a powerful shock courses through it!"))

mob.Slow(damage_applied/mob_range)
to_chat(mob,SPAN_HIGHDANGER("Your entire body seizes up as a powerful shock courses through it!"))
qdel(src)


/obj/item/explosive/grenade/sebb/primed
icon_state = "grenade_sebb"
name = "\improper G2 Electroshock grenade"
desc = "A G2 Electroshock Grenade, looks like its quite angry! Oh shit!"
det_time = 10
det_time = 1 SECONDS // 1 second to blow it up

/obj/item/explosive/grenade/sebb/primed/New()
activate()

/obj/effect/overlay/sebb
name = "Danger"
icon = 'icons/effects/sebb.dmi'
icon_state = "sebb_explode" // testing
icon_state = "sebb_explode"
layer = ABOVE_LIGHTING_PLANE
var/time_to_live = 1 SECONDS
pixel_x = -175
var/time_to_live = 1 SECONDS // How long the sprite placeholder lives
pixel_x = -175 // We need these offsets to force center the sprite because BYOND is dumb
pixel_y = -175
appearance_flags = RESET_COLOR


/obj/effect/overlay/sebb/New()
addtimer(CALLBACK(GLOBAL_PROC,.proc/qdel,src),time_to_live)
/obj/effect/overlay/sebb/Initialize()
..()
QDEL_IN(src,time_to_live)


// abstract grenades used for hijack explosions
Expand Down
9 changes: 6 additions & 3 deletions code/game/objects/items/explosives/mine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@

//checks for things that would prevent us from placing the mine.
/obj/item/explosive/mine/proc/check_for_obstacles(mob/living/user)
var/turf/user_turf = get_turf(user)
if(locate(/obj/item/explosive/mine) in get_turf(src))
to_chat(user, SPAN_WARNING("There already is a mine at this position!"))
return TRUE
if(user.loc && (user.loc.density || locate(/obj/structure/fence) in user.loc))
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 TRUE
if(SSinterior.in_interior(user))
Expand All @@ -62,8 +63,10 @@
/obj/item/explosive/mine/sebb
name = "\improper G2 Electroshock grenade"
icon_state = "grenade_sebb_planted"
desc = "A G2 electroshock grenade planted as a landmine"
desc = "A G2 electroshock grenade planted as a landmine."
map_deployed = TRUE
invisibility = 25
pixel_y = -5

/obj/item/explosive/mine/sebb/disarm()
. = ..()
Expand All @@ -72,7 +75,7 @@

/obj/item/explosive/mine/sebb/prime()
set waitfor = 0
new /obj/item/explosive/grenade/sebb/primed(src.loc)
new /obj/item/explosive/grenade/sebb/primed(get_turf(src))
if(!QDELETED(src))
disarm()

Expand Down

0 comments on commit ec4893f

Please sign in to comment.