diff --git a/code/datums/mapgen/single_biome/WasteplanetCaves.dm b/code/datums/mapgen/single_biome/WasteplanetCaves.dm
index 557988cfc1ec..352759e20c50 100644
--- a/code/datums/mapgen/single_biome/WasteplanetCaves.dm
+++ b/code/datums/mapgen/single_biome/WasteplanetCaves.dm
@@ -39,10 +39,12 @@
/obj/structure/salvageable/circuit_imprinter = 8,
/obj/structure/salvageable/destructive_analyzer = 8,
/obj/structure/salvageable/server = 8,
+ /obj/item/mine/explosive/rusty = 30,
+ /obj/effect/spawner/lootdrop/mine = 8
)
feature_spawn_list = list(
/obj/structure/geyser/random = 1,
- /obj/item/mine/explosive/shrapnel/carbon_only = 1
+ /obj/effect/spawner/minefield = 1
)
mob_spawn_list = list(
//hivebots, not too difficult
diff --git a/code/datums/wires/mines.dm b/code/datums/wires/mines.dm
index f8aa2f05799c..381b45891e31 100644
--- a/code/datums/wires/mines.dm
+++ b/code/datums/wires/mines.dm
@@ -40,14 +40,7 @@
if(ourmine.armed && ourmine.anchored)
holder.visible_message(span_notice("[icon2html(ourmine, viewers(holder))] \The [ourmine]'s arming lights fade, and the securing bolts loosen. "))
playsound(ourmine, 'sound/machines/click.ogg', 100, TRUE)
- ourmine.armed = FALSE
- ourmine.clicked = FALSE
- ourmine.anchored = FALSE
- ourmine.alpha = 255
- var/mob/living/defuser = ourmine.foot_on_mine.resolve()
- defuser.remove_movespeed_modifier(/datum/movespeed_modifier/stepped_on_mine)
- ourmine.foot_on_mine = null
- ourmine.update_appearance(UPDATE_ICON_STATE)
+ ourmine.disarm()
else if(ourmine.anchored)
holder.visible_message(span_notice("[icon2html(ourmine, viewers(holder))] \The [ourmine]'s yellow arming light flickers."))
else
@@ -93,14 +86,7 @@
if(ourmine.armed && ourmine.anchored)
holder.visible_message(span_notice("[icon2html(ourmine, viewers(holder))] \The [ourmine]'s arming lights fade, and the securing bolts loosen. Disarmed. "))
playsound(ourmine, 'sound/machines/click.ogg', 100, TRUE)
- ourmine.armed = FALSE
- ourmine.clicked = FALSE
- ourmine.anchored = FALSE
- ourmine.alpha = 255
- var/mob/living/defuser = ourmine.foot_on_mine.resolve()
- defuser.remove_movespeed_modifier(/datum/movespeed_modifier/stepped_on_mine)
- ourmine.foot_on_mine = null
- ourmine.update_appearance(UPDATE_ICON_STATE)
+ ourmine.disarm()
else if(ourmine.anchored)
holder.visible_message(span_notice("[icon2html(ourmine, viewers(holder))] \The [ourmine]'s yellow arming light flickers."))
else
diff --git a/code/game/objects/items/devices/mines.dm b/code/game/objects/items/devices/mines.dm
index 161b2d0be326..9a84744e631f 100644
--- a/code/game/objects/items/devices/mines.dm
+++ b/code/game/objects/items/devices/mines.dm
@@ -39,9 +39,6 @@
var/manufacturer = MANUFACTURER_NONE
- /// A surprised tool that'll help us later (handles turf slowdown manipulation)
- var/oldslow
-
/// Who's got their foot on the mine's pressure plate
/// Stepping on the mine will set this to the first mob who stepped over it
/// The mine will not detonate via movement unless the first mob steps off of it
@@ -56,6 +53,7 @@
)
AddElement(/datum/element/connect_loc, loc_connections)
wires = new /datum/wires/mine(src)
+ alpha = stealthpwr
/obj/item/mine/examine(mob/user)
. = ..()
@@ -120,7 +118,7 @@
//step 2: the consequences
/obj/item/mine/proc/on_exited(datum/source, atom/movable/gone)
SIGNAL_HANDLER
- if(!clicked )
+ if(!clicked)
return
if(!can_trigger(gone))
return
@@ -130,10 +128,10 @@
INVOKE_ASYNC(src, PROC_REF(triggermine), gone)
foot_on_mine = null
-//mines may be triggered by damage, but they take longer to explode
+//mines have a small chance to be triggered by damage, but they take longer to explode
/obj/item/mine/take_damage(damage_amount, damage_type, damage_flag, sound_effect, attack_dir)
. = ..()
- if(prob(65))
+ if(prob(35))
blast_delay = blast_delay * 3
triggermine()
@@ -164,9 +162,6 @@
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(3, 1, src)
s.start()
- if(isopenturf(loc) || oldslow)
- var/turf/open/locturf = loc
- locturf.slowdown = oldslow
if(ismob(triggerer))
mineEffect(triggerer)
else
@@ -215,14 +210,7 @@
if(do_after(user, 5 SECONDS, target = src))//SO SO generous. You can still step back from the edge.
if(prob(10))
user.visible_message(span_notice("[user] picks up \the [src], which miraculously doesn't explode!"), span_notice("You pick up \the [src], which miraculously doesn't explode!"))
- anchored = FALSE
- armed = FALSE
- clicked = FALSE
- alpha = 255
- var/mob/living/defuser = foot_on_mine.resolve()
- defuser.remove_movespeed_modifier(/datum/movespeed_modifier/stepped_on_mine)
- foot_on_mine = null
- update_appearance(UPDATE_ICON_STATE)
+ disarm()
else
user.visible_message(span_danger("[user] attempts to pick up \the [src] only to hear a beep as it activates in their hand!"), span_danger("You attempt to pick up \the [src] only to hear a beep as it activates in your hands!"))
triggermine(user)
@@ -253,6 +241,18 @@
user.visible_message(span_danger("[user] hits \the [src] with [I], activating it!"), span_userdanger("[icon2html(src, viewers(src))]You hit \the [src] with [I]. The light goes red."))
triggermine(user)
+//handles controlled deactivation (from wires/pickup success)
+/obj/item/mine/proc/disarm()
+ anchored = FALSE
+ armed = FALSE
+ clicked = FALSE
+ alpha = 255
+ var/mob/living/defuser = foot_on_mine.resolve()
+ defuser.remove_movespeed_modifier(/datum/movespeed_modifier/stepped_on_mine)
+ foot_on_mine = null
+ update_appearance(UPDATE_ICON_STATE)
+ return
+
//
//LANDMINE TYPES
//Rylie please help me make these more immersive
@@ -273,12 +273,12 @@
//customize shrapnel. Magnitude zero prevents them from spawning
var/shrapnel_type = /obj/projectile/bullet/shrapnel
- var/shrapnel_magnitude = 5
+ var/shrapnel_magnitude = 3
/// If TRUE, we spawn extra pellets to eviscerate a person still sitting on it, otherwise it just spawns a ring of pellets around the tile we're on (making setting it off an offensive move)
var/shred_triggerer = TRUE
- stealthpwr = 100
+ stealthpwr = 75
manufacturer = MANUFACTURER_SCARBOROUGH
/obj/item/mine/explosive/mineEffect(mob/victim)
@@ -303,7 +303,7 @@
range_flash = 3
shrapnel_type = /obj/projectile/bullet/shrapnel/hot
- shrapnel_magnitude = 6
+ shrapnel_magnitude = 4
/obj/item/mine/explosive/fire/mineEffect(mob/victim)
for(var/turf/T in view(4,src))
@@ -329,7 +329,7 @@
range_heavy = 1
range_light = 4
- shrapnel_magnitude = 9
+ shrapnel_magnitude = 6
shred_triggerer = TRUE
/obj/item/mine/explosive/shrapnel/carbon_only
@@ -388,8 +388,22 @@
//WIP variants(CLEAN THIS UP BEFORE UNDRAFTING)
/obj/item/mine/spawner
-//mannhacks go here :)
+ name = "debug spawner mine"
+ desc = "Real no Virus. 100% free. Coders hate him!"
+ var/spawn_type = null //manhacks go here :)
+ var/spawn_number = 6
+
+/obj/item/mine/spawner/mineEffect(mob/victim)
+ var/turf/T = get_turf(src)
+ playsound(T, 'sound/effects/phasein.ogg', 100, TRUE)
+ spawn_and_random_walk(spawn_type, T, spawn_number, walk_chance=50, admin_spawn=((flags_1 & ADMIN_SPAWNED_1) ? TRUE : FALSE))
+ . = ..()
+/obj/item/mine/spawner/manhack
+ name = "\improper G-83 Lacerator"
+ desc = "An anti-infantry explosive produced during the corporate wars. The explosive payload has been swapped out for 'viscerator'-type antipersonnel drones."
+ spawn_type = /mob/living/simple_animal/hostile/viscerator
+ hair_trigger = TRUE//they take a second to lock on anyway
//
//UNUSED MINES//
@@ -563,3 +577,53 @@
/obj/item/mine/pickup/speed/proc/finish_effect(mob/living/carbon/victim)
victim.remove_movespeed_modifier(/datum/movespeed_modifier/yellow_orb)
to_chat(victim, "You slow down.")
+
+//
+//mapping tool that generates "live" variants of all mine subtypes, which are anchored and ready to blow.
+//Add new mine variants you make below as a LIVE_MINE_HELPER define containing their subtyping.
+//
+
+#define LIVE_MINE_HELPER(mine_type) \
+ /obj/item/mine/##mine_type/live { \
+ anchored = TRUE; \
+ armed = TRUE; \
+ }
+
+LIVE_MINE_HELPER(explosive)
+LIVE_MINE_HELPER(explosive/fire)
+LIVE_MINE_HELPER(explosive/rusty)
+LIVE_MINE_HELPER(explosive/rad)
+LIVE_MINE_HELPER(explosive/plasma)
+LIVE_MINE_HELPER(explosive/heavy)
+LIVE_MINE_HELPER(explosive/shrapnel)
+LIVE_MINE_HELPER(explosive/shrapnel/sting)
+LIVE_MINE_HELPER(spawner/manhack)
+//
+// spawners (random mines, minefields, non-guaranteed mine)
+//
+
+/obj/effect/spawner/lootdrop/mine
+ name = "live mine spawner (random)"
+ lootcount = 1
+ fan_out_items = TRUE
+ loot = list(
+ /obj/item/mine/explosive/live = 10,
+ /obj/item/mine/explosive/shrapnel/live = 3,
+ /obj/item/mine/explosive/rad/live = 3,
+ /obj/item/mine/spawner/manhack/live = 3,
+ /obj/item/mine/explosive/fire/live = 3)
+
+/obj/effect/spawner/minefield
+ name = "minefield spawner"
+ var/minerange = 7
+ var/minetype = /obj/item/mine/explosive/rusty/live
+
+/obj/effect/spawner/minefield/Initialize(mapload)
+ . = ..()
+ for(var/turf/open/T in view(minerange,loc))
+ if(prob(10))
+ new minetype(T)
+
+/obj/effect/spawner/minefield/random
+ name = "random minefield spawner"
+ minetype = /obj/effect/spawner/lootdrop/mine
diff --git a/code/game/objects/items/shrapnel.dm b/code/game/objects/items/shrapnel.dm
index 9ebb9c6617f1..c9583d299043 100644
--- a/code/game/objects/items/shrapnel.dm
+++ b/code/game/objects/items/shrapnel.dm
@@ -33,10 +33,10 @@
/obj/projectile/bullet/shrapnel
name = "flying shrapnel shard"
- damage = 12
+ damage = 14
range = 10
armour_penetration = -20
- dismemberment = 10
+ dismemberment = 15
ricochets_max = 2
ricochet_chance = 40
shrapnel_type = /obj/item/shrapnel
@@ -46,12 +46,11 @@
/obj/projectile/bullet/shrapnel/rusty
damage = 10
armour_penetration = -35
- dismemberment = 5
ricochets_max = 3//duller = less likely to stick in a wall
ricochet_chance = 60
/obj/projectile/bullet/shrapnel/mega
- damage = 17
+ damage = 20
name = "flying shrapnel hunk"
range = 25
dismemberment = 20
@@ -72,7 +71,7 @@
. = ..()
if(iscarbon(target))
var/mob/living/carbon/M = target
- M.adjust_fire_stacks(10)
+ M.adjust_fire_stacks(15)
M.IgniteMob()
/obj/projectile/bullet/shrapnel/spicy
@@ -87,7 +86,7 @@
. = ..()
if(iscarbon(target))
var/mob/living/carbon/M = target
- M.apply_effect(150,EFFECT_IRRADIATE,0)
+ M.apply_effect(250,EFFECT_IRRADIATE,0)
/obj/projectile/bullet/pellet/stingball
name = "ballistic gel clump"