Skip to content

Commit

Permalink
Adds preset mineral walls for mappers. (#18958)
Browse files Browse the repository at this point in the history
Icons for these would be helpful if anyone were to provide them,
otherwise I'll have to shitsprite something up.

---------

Co-authored-by: Mattia <[email protected]>
  • Loading branch information
NonQueueingMatt and Mattia authored Apr 22, 2024
1 parent 07da31d commit 1b8c1c8
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 1 deletion.
57 changes: 56 additions & 1 deletion code/modules/mining/mine_turfs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var/list/mineral_can_smooth_with = list(
/turf/unsimulated/wall
)

/turf/simulated/mineral //wall piece
/turf/simulated/mineral
name = "rock"
icon = 'icons/turf/smooth/rock_dense.dmi'
icon_state = "preview_wall"
Expand Down Expand Up @@ -606,6 +606,61 @@ var/list/mineral_can_smooth_with = list(
if(destination.CanZPass(H, UP))
H.climb(UP, src, 20)

/** Preset mineral walls.
* These are used to spawn specific types of mineral walls in the map.
* Use one of the subtypes below or, in case a new ore is added but the preset isn't created, set preset_mineral_name to the ORE_X define.
*/
/turf/simulated/mineral/preset
var/preset_mineral_name

/turf/simulated/mineral/preset/Initialize(mapload)
..()
return INITIALIZE_HINT_LATELOAD

/turf/simulated/mineral/preset/LateInitialize()
. = ..()
change_mineral(preset_mineral_name, TRUE)

/turf/simulated/mineral/preset/phoron
name = "phoron mineral wall"
preset_mineral_name = ORE_PHORON

/turf/simulated/mineral/preset/coal
name = "coal mineral wall"
preset_mineral_name = ORE_COAL

/turf/simulated/mineral/preset/gold
name = "gold mineral wall"
preset_mineral_name = ORE_GOLD

/turf/simulated/mineral/preset/diamond
name = "diamond mineral wall"
preset_mineral_name = ORE_DIAMOND

/turf/simulated/mineral/preset/iron
name = "iron mineral wall"
preset_mineral_name = ORE_IRON

/turf/simulated/mineral/preset/platinum
name = "platinum mineral wall"
preset_mineral_name = ORE_PLATINUM

/turf/simulated/mineral/preset/bauxite
name = "bauxite mineral wall"
preset_mineral_name = ORE_BAUXITE

/turf/simulated/mineral/preset/galena
name = "galena mineral wall"
preset_mineral_name = ORE_GALENA

/turf/simulated/mineral/preset/uranium
name = "uranium mineral wall"
preset_mineral_name = ORE_URANIUM

/turf/simulated/mineral/preset/metallic_hydrogen
name = "metallic_hydrogen mineral wall"
preset_mineral_name = ORE_HYDROGEN

// Some extra types for the surface to keep things pretty.
/turf/simulated/mineral/surface
mined_turf = /turf/unsimulated/floor/asteroid/ash
Expand Down
13 changes: 13 additions & 0 deletions html/changelogs/mattatlas-minerals.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Your name.
author: MattAtlas

# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True

# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- qol: "Added preset mineral walls for mappers."

0 comments on commit 1b8c1c8

Please sign in to comment.