Skip to content

Commit

Permalink
mine implementation + training mine
Browse files Browse the repository at this point in the history
god have mercy on your souls
  • Loading branch information
Sun-Soaked committed Feb 28, 2024
1 parent 87ad48d commit 83c2cc7
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 61 deletions.
19 changes: 12 additions & 7 deletions code/datums/mapgen/planetary/LavaGenerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,15 @@
/obj/structure/flora/ash/fern = 5,
/obj/structure/flora/ash/fireblossom = 1,
/obj/structure/flora/ash/puce = 5,
/obj/item/mine/explosive/rusty = 1,
)
feature_spawn_chance = 0.3
feature_spawn_list = list(
/obj/structure/flora/rock/hell = 10,
/obj/structure/elite_tumor = 2,
/obj/structure/geyser/random = 2,
/obj/effect/spawner/lootdrop/anomaly/lava = 1,
/obj/structure/flora/rock/hell = 20,
/obj/structure/elite_tumor = 4,
/obj/structure/geyser/random = 4,
/obj/effect/spawner/lootdrop/anomaly/lava = 2,
/obj/effect/spawner/minefield = 1

)
mob_spawn_chance = 4
Expand Down Expand Up @@ -244,14 +246,16 @@
/obj/structure/flora/ash/cacti = 1,
/obj/structure/flora/ash/tall_shroom = 2,
/obj/structure/flora/ash/fern = 2,
/obj/structure/flora/ash/puce = 2
/obj/structure/flora/ash/puce = 2,
/obj/item/mine/explosive/rusty = 1
)

/datum/biome/cave/lavaland/rocky
open_turf_types = list(/turf/open/floor/plating/asteroid/purple = 1)
flora_spawn_list = list(
/obj/structure/flora/rock/pile/lava = 1,
/obj/structure/flora/rock/lava = 1
/obj/structure/flora/rock/pile/lava = 3,
/obj/structure/flora/rock/lava = 3,
/obj/item/mine/explosive/rusty = 1
)
flora_spawn_chance = 5

Expand All @@ -265,6 +269,7 @@
/obj/structure/flora/ash/cap_shroom = 2,
/obj/structure/flora/ash/stem_shroom = 2,
/obj/structure/flora/ash/cacti = 1,
/obj/item/mine/explosive/rusty = 1,
/obj/structure/flora/ash/tall_shroom = 2
)

Expand Down
40 changes: 23 additions & 17 deletions code/datums/mapgen/planetary/RockGenerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,19 @@
/obj/structure/geyser/random = 80,
/obj/structure/elite_tumor = 40,
/obj/effect/spawner/lootdrop/anomaly/rock = 10,
/obj/effect/spawner/minefield = 2,
/obj/effect/spawner/lootdrop/anomaly/big = 1 //get out of here stalker
)

flora_spawn_chance = 5
mob_spawn_chance = 3

flora_spawn_list = list(
/obj/structure/flora/rock/rockplanet = 3,
/obj/structure/flora/tree/cactus = 4,
/obj/structure/flora/ash/cacti = 1,
/obj/structure/flora/ash/garden/arid = 1,
/obj/structure/flora/rock/rockplanet = 6,
/obj/structure/flora/tree/cactus = 8,
/obj/structure/flora/ash/cacti = 2,
/obj/structure/flora/ash/garden/arid = 2,
/obj/item/mine/explosive/rusty = 1
)

mob_spawn_list = list(
Expand Down Expand Up @@ -133,24 +135,27 @@
/obj/structure/flora/ash/cacti = 2,
/obj/structure/flora/grass/rockplanet/dead = 8,
/obj/structure/flora/ash/garden/arid = 1,
/obj/item/mine/explosive/rusty = 1
)

/datum/biome/cave/rock
closed_turf_types = list(/turf/closed/mineral/random/rockplanet = 1)
open_turf_types = list(/turf/open/floor/plating/asteroid/rockplanet/cracked = 1)
flora_spawn_chance = 4
flora_spawn_list = list(
/obj/structure/flora/rock/rockplanet = 4,
/obj/structure/flora/rock/pile/rockplanet = 4,
/obj/structure/flora/ash/fern = 2,
/obj/structure/flora/ash/puce = 1,
/obj/structure/flora/rock/rockplanet = 8,
/obj/structure/flora/rock/pile/rockplanet = 8,
/obj/structure/flora/ash/fern = 4,
/obj/structure/flora/ash/puce = 2,
/obj/item/mine/explosive/rusty = 1
)
feature_spawn_chance = 0.5
feature_spawn_list = list(
/obj/structure/geyser/random = 2,
/obj/structure/elite_tumor = 1,
/obj/structure/spawner/ice_moon/rockplanet = 4,
/obj/effect/spawner/lootdrop/anomaly/rock/cave = 1,
/obj/structure/geyser/random = 4,
/obj/structure/elite_tumor = 2,
/obj/structure/spawner/ice_moon/rockplanet = 6,
/obj/effect/spawner/lootdrop/anomaly/rock/cave = 2,
/obj/effect/spawner/minefield = 1
)
mob_spawn_chance = 6
mob_spawn_list = list(
Expand All @@ -166,11 +171,12 @@
open_turf_types = list(/turf/open/floor/plating/asteroid/rockplanet/cracked = 1)
flora_spawn_chance = 5
flora_spawn_list = list(
/obj/structure/flora/rock/rockplanet = 4,
/obj/structure/flora/rock/pile/rockplanet = 4,
/obj/structure/flora/ash/fern = 4,
/obj/structure/flora/ash/puce = 2,
/obj/structure/flora/ash/garden/arid = 1,
/obj/structure/flora/rock/rockplanet = 8,
/obj/structure/flora/rock/pile/rockplanet = 8,
/obj/structure/flora/ash/fern = 6,
/obj/structure/flora/ash/puce = 4,
/obj/structure/flora/ash/garden/arid = 2,
/obj/item/mine/explosive/rusty = 1
)
mob_spawn_list = list(
/mob/living/simple_animal/hostile/netherworld/asteroid = 30,
Expand Down
53 changes: 30 additions & 23 deletions code/datums/mapgen/planetary/SnowGenerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,13 @@
/turf/open/floor/plating/asteroid/snow/lit = 25
)
flora_spawn_list = list(
/obj/structure/flora/tree/pine = 2,
/obj/structure/flora/rock/icy = 2,
/obj/structure/flora/rock/pile/icy = 2,
/obj/structure/flora/grass/both = 6,
/obj/structure/flora/ash/chilly = 2,
/obj/structure/flora/ash/garden/frigid = 1,
/obj/structure/flora/tree/pine = 4,
/obj/structure/flora/rock/icy = 4,
/obj/structure/flora/rock/pile/icy = 4,
/obj/structure/flora/grass/both = 12,
/obj/structure/flora/ash/chilly = 4,
/obj/structure/flora/ash/garden/frigid = 2,
/obj/item/mine/explosive/rusty = 1
)
flora_spawn_chance = 10
mob_spawn_chance = 1
Expand All @@ -116,7 +117,8 @@
/obj/effect/spawner/lootdrop/anomaly/big = 1,
/obj/structure/spawner/ice_moon/demonic_portal/low_threat = 25,
/obj/structure/spawner/ice_moon/demonic_portal/medium_threat = 50,
/obj/structure/spawner/ice_moon/demonic_portal/high_threat = 13
/obj/structure/spawner/ice_moon/demonic_portal/high_threat = 13,
/obj/effect/spawner/minefield = 2
)

/datum/biome/snow/lush
Expand Down Expand Up @@ -145,9 +147,10 @@
/datum/biome/snow/forest
flora_spawn_chance = 15
flora_spawn_list = list(
/obj/structure/flora/tree/pine = 10,
/obj/structure/flora/tree/dead = 3,
/obj/structure/flora/grass/both = 4
/obj/structure/flora/tree/pine = 20,
/obj/structure/flora/tree/dead = 6,
/obj/structure/flora/grass/both = 8,
/obj/item/mine/explosive/rusty = 1,
)

/datum/biome/snow/forest/dense
Expand All @@ -156,6 +159,7 @@
/obj/structure/flora/tree/pine = 20,
/obj/structure/flora/grass/both = 6,
/obj/structure/flora/tree/dead = 3,
/obj/item/mine/explosive/rusty = 1,
)

/datum/biome/arctic
Expand Down Expand Up @@ -233,15 +237,16 @@
)
flora_spawn_chance = 6
flora_spawn_list = list(
/obj/structure/flora/grass/both = 5,
/obj/structure/flora/rock/pile/icy = 1,
/obj/structure/flora/rock/icy = 1,
/obj/structure/flora/ash/space = 1,
/obj/structure/flora/ash/leaf_shroom = 1,
/obj/structure/flora/ash/cap_shroom = 1,
/obj/structure/flora/ash/stem_shroom = 1,
/obj/structure/flora/ash/puce = 1,
/obj/structure/flora/ash/garden/frigid = 1,
/obj/structure/flora/grass/both = 10,
/obj/structure/flora/rock/pile/icy = 2,
/obj/structure/flora/rock/icy = 2,
/obj/structure/flora/ash/space = 2,
/obj/structure/flora/ash/leaf_shroom = 2,
/obj/structure/flora/ash/cap_shroom = 2,
/obj/structure/flora/ash/stem_shroom = 2,
/obj/structure/flora/ash/puce = 2,
/obj/structure/flora/ash/garden/frigid = 2,
/obj/item/mine/explosive/rusty = 1
)
closed_turf_types = list(
/turf/closed/mineral/random/snow = 1
Expand All @@ -266,7 +271,8 @@
/obj/structure/spawner/ice_moon/demonic_portal/extreme_threat = 2,
/obj/structure/spawner/ice_moon = 30,
/obj/structure/spawner/ice_moon/polarbear = 30,
/obj/effect/spawner/lootdrop/anomaly/ice/cave = 10
/obj/effect/spawner/lootdrop/anomaly/ice/cave = 10,
/obj/effect/spawner/minefield = 2,
)

/datum/biome/cave/snow/thawed
Expand Down Expand Up @@ -305,9 +311,10 @@
)
flora_spawn_chance = 3
flora_spawn_list = list(
/obj/structure/flora/ash/leaf_shroom = 1,
/obj/structure/flora/ash/cap_shroom = 1,
/obj/structure/flora/ash/stem_shroom = 1,
/obj/structure/flora/ash/leaf_shroom = 3,
/obj/structure/flora/ash/cap_shroom = 3,
/obj/structure/flora/ash/stem_shroom = 3,
/obj/item/mine/explosive/fire = 1,
)
feature_spawn_chance = 0.2

Expand Down
31 changes: 24 additions & 7 deletions code/datums/mapgen/planetary/WasteGenerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@


//the illusive shrapnel plant
/obj/item/mine/explosive/shrapnel/carbon_only = 10
/obj/item/mine/explosive/shrapnel/live = 30,
/obj/effect/spawner/lootdrop/mine = 8,
/obj/effect/spawner/minefield = 2
)

feature_spawn_list = list(
Expand Down Expand Up @@ -202,7 +204,9 @@
/obj/effect/spawner/lootdrop/maintenance/four = 20,
/obj/structure/flora/ash/garden/waste = 300,
/obj/structure/flora/ash/glowshroom = 1800,
/obj/item/mine/explosive/shrapnel/carbon_only = 10
/obj/item/mine/explosive/shrapnel/live = 30,
/obj/effect/spawner/lootdrop/mine = 8,
/obj/effect/spawner/minefield = 2
)

/datum/biome/waste/tar_bed //tar colorings
Expand Down Expand Up @@ -246,7 +250,10 @@
/obj/structure/closet/crate/secure/loot = 30,
/obj/effect/spawner/lootdrop/waste/atmos_can = 180,
/obj/effect/spawner/lootdrop/waste/atmos_can/rare = 1,
/obj/effect/spawner/lootdrop/waste/salvageable = 300
/obj/effect/spawner/lootdrop/waste/salvageable = 300,
/obj/item/mine/explosive/rad/live = 30,
/obj/effect/spawner/lootdrop/mine = 8,
/obj/effect/spawner/minefield = 2
)
mob_spawn_list = list( //nor organics, more biased towards hivebots though
/mob/living/simple_animal/hostile/hivebot/wasteplanet/strong = 80,
Expand Down Expand Up @@ -308,7 +315,9 @@
/obj/effect/spawner/lootdrop/waste/salvageable = 400,
/obj/structure/flora/ash/garden/waste = 70,
/obj/structure/flora/ash/glowshroom = 400, //more common in caves
/obj/item/mine/explosive/shrapnel/carbon_only = 10
/obj/item/mine/explosive/rad/live = 10,
/obj/effect/spawner/lootdrop/mine = 8,
/obj/effect/spawner/minefield = 2
)

feature_spawn_list = list(
Expand Down Expand Up @@ -362,7 +371,10 @@
/obj/effect/spawner/lootdrop/maintenance/two = 50,
/obj/effect/spawner/lootdrop/maintenance/three = 100,
/obj/effect/spawner/lootdrop/maintenance/four = 200,
/obj/structure/flora/ash/glowshroom = 1800
/obj/structure/flora/ash/glowshroom = 1800,
/obj/item/mine/explosive/rad/live = 30,
/obj/effect/spawner/lootdrop/mine = 8,
/obj/effect/spawner/minefield = 2
)
feature_spawn_chance = 12

Expand Down Expand Up @@ -397,6 +409,9 @@
/obj/effect/spawner/lootdrop/maintenance/three = 20,
/obj/effect/spawner/lootdrop/maintenance/four = 40,
/obj/effect/spawner/lootdrop/waste/salvageable = 80,
/obj/item/mine/spawner/manhack = 40,
/obj/effect/spawner/lootdrop/mine = 8,
/obj/effect/spawner/minefield/manhack = 2
)
mob_spawn_list = list( //nor organics, more biased towards hivebots though
/mob/living/simple_animal/hostile/hivebot/wasteplanet/strong = 80,
Expand Down Expand Up @@ -427,7 +442,8 @@
/obj/effect/spawner/lootdrop/maintenance/three = 10,
/obj/effect/spawner/lootdrop/maintenance/four = 20,
/obj/effect/spawner/lootdrop/waste/salvageable = 40,
/obj/structure/foamedmetal = 100
/obj/structure/foamedmetal = 100,
/obj/item/mine/spawner/manhack = 20
)
mob_spawn_list = list( //Whoops! All hivebots!
/mob/living/simple_animal/hostile/hivebot/wasteplanet/strong = 80,
Expand All @@ -440,6 +456,7 @@
/obj/structure/spawner/wasteplanet/hivebot/low_threat = 20,
/obj/structure/spawner/wasteplanet/hivebot/medium_threat = 10,
/obj/structure/spawner/wasteplanet/hivebot/high_threat = 5,
/obj/structure/spawner/wasteplanet/hivebot/extreme_threat = 2
/obj/structure/spawner/wasteplanet/hivebot/extreme_threat = 2,
/obj/effect/spawner/minefield/manhack = 2
)
feature_spawn_chance = 2 //hivebot biomes should have their dongles
28 changes: 21 additions & 7 deletions code/game/objects/items/devices/mines.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

/obj/item/mine
name = "dummy mine"
desc = "An anti-personnel mine. This one is designed for training actions. Explodes into harmless sparks."
desc = "An anti-personnel mine. This one explodes into nothing. Why can you see this? You should't be able to see this. Stop looking at this."
icon = 'icons/obj/device.dmi'
w_class = WEIGHT_CLASS_SMALL
throw_speed = 3
Expand Down Expand Up @@ -247,9 +247,10 @@
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
if(foot_on_mine?.resolve())
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

Expand Down Expand Up @@ -278,7 +279,7 @@
/// 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 = 75
stealthpwr = 100
manufacturer = MANUFACTURER_SCARBOROUGH

/obj/item/mine/explosive/mineEffect(mob/victim)
Expand Down Expand Up @@ -386,7 +387,6 @@
T.IgniteTurf(25, "green")
. = ..()

//WIP variants(CLEAN THIS UP BEFORE UNDRAFTING)
/obj/item/mine/spawner
name = "debug spawner mine"
desc = "Real no Virus. 100% free. Coders hate him!"
Expand All @@ -401,10 +401,20 @@

/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."
desc = "An anti-infantry device 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

//put this on military ships for disarming practice
/obj/item/mine/training
name = "\improper G-MTH Defusal Trainer"
desc = "A mothballed anti-personnel explosive, equipped with VISCERAL DEFUSAL ACTION for training purposes. Though Scarborough was forced to mothball their stockpiles of mines as part of the ceasefire, the deployed minefields remain."

/obj/item/mine/training/mineEffect(mob/living/victim)
src.say("BOOM! Better luck next time!")
src.visible_message(span_notice("The mine resets itself for another disarming attempt."))
new /obj/item/mine/training (loc)

//
//UNUSED MINES//
//mainly remain to demonstrate possible mine effects.
Expand Down Expand Up @@ -629,3 +639,7 @@ LIVE_MINE_HELPER(gas/water_vapor)
/obj/effect/spawner/minefield/random
name = "random minefield spawner"
minetype = /obj/effect/spawner/lootdrop/mine

/obj/effect/spawner/minefield/manhack
name = "manhack field spawner"
minetype = /obj/item/mine/spawner/manhack
1 change: 1 addition & 0 deletions code/game/objects/items/shrapnel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
/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

Expand Down

0 comments on commit 83c2cc7

Please sign in to comment.