mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Adds Asteroid Cracks
Adds a new type of turf, which is a cracked asteroid floor. It is functionally a space tile, which means air can escape through the cracks and into the void. These cracks can be plugged by building a floor over them using rods and tiles. The cracks are generated randomly along with the asteroid whenever a floor is placed, with a 1 in 10 chance of it being a cracked floor.
This commit is contained in:
16
code/game/turfs/space/cracked_asteroid.dm
Normal file
16
code/game/turfs/space/cracked_asteroid.dm
Normal file
@@ -0,0 +1,16 @@
|
||||
// This is used to have vacuums inside the asteroid be more present.
|
||||
|
||||
/turf/space/cracked_asteroid
|
||||
icon = 'icons/turf/flooring/asteroid.dmi'
|
||||
name = "cracked sand"
|
||||
desc = "Rough sand with a huge crack. It probably leads out into the void."
|
||||
icon_state = "asteroid_cracked"
|
||||
dynamic_lighting = TRUE
|
||||
|
||||
/turf/space/cracked_asteroid/is_space() // So people don't start floating when standing on it.
|
||||
return FALSE
|
||||
|
||||
/turf/space/cracked_asteroid/New()
|
||||
..()
|
||||
spawn(2 SECONDS)
|
||||
overlays.Cut()
|
||||
@@ -9,7 +9,7 @@
|
||||
// heat_capacity = 700000 No.
|
||||
|
||||
/turf/space/New()
|
||||
if(!istype(src, /turf/space/transit))
|
||||
if(!istype(src, /turf/space/transit) && !istype(src, /turf/space/cracked_asteroid))
|
||||
icon_state = "[((x + y) ^ ~(x * y) + z) % 25]"
|
||||
update_starlight()
|
||||
..()
|
||||
|
||||
@@ -139,7 +139,7 @@ var/list/mining_overlay_cache = list()
|
||||
overlays += mining_overlay_cache["dug_overlay"]
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(istype(get_step(src, direction), /turf/space))
|
||||
if(istype(get_step(src, direction), /turf/space) && !istype(get_step(src, direction), /turf/space/cracked_asteroid))
|
||||
if(!mining_overlay_cache["asteroid_edge_[direction]"])
|
||||
mining_overlay_cache["asteroid_edge_[direction]"] = image('icons/turf/flooring/asteroid.dmi', "asteroid_edges", dir = direction)
|
||||
overlays += mining_overlay_cache["asteroid_edge_[direction]"]
|
||||
|
||||
@@ -45,7 +45,10 @@
|
||||
var/turf/simulated/mineral/T = locate((origin_x-1)+x,(origin_y-1)+y,origin_z)
|
||||
if(istype(T) && !T.ignore_mapgen)
|
||||
if(map[current_cell] == FLOOR_CHAR)
|
||||
T.make_floor()
|
||||
if(prob(90))
|
||||
T.make_floor()
|
||||
else
|
||||
T.ChangeTurf(/turf/space/cracked_asteroid)
|
||||
else
|
||||
T.make_wall()
|
||||
if(map[current_cell] == DOOR_CHAR)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 9.1 KiB |
@@ -994,6 +994,7 @@
|
||||
#include "code\game\turfs\simulated\wall_types.dm"
|
||||
#include "code\game\turfs\simulated\walls.dm"
|
||||
#include "code\game\turfs\snow\snow.dm"
|
||||
#include "code\game\turfs\space\cracked_asteroid.dm"
|
||||
#include "code\game\turfs\space\space.dm"
|
||||
#include "code\game\turfs\space\transit.dm"
|
||||
#include "code\game\turfs\unsimulated\beach.dm"
|
||||
|
||||
Reference in New Issue
Block a user