game folder

This commit is contained in:
Poojawa
2018-04-23 00:17:28 -05:00
parent e5f9765d2a
commit cc6b320f83
64 changed files with 1188 additions and 3020 deletions
+15 -8
View File
@@ -4,6 +4,7 @@
//- floor_tile is now a path, and not a tile obj
name = "floor"
icon = 'icons/turf/floors.dmi'
baseturfs = /turf/open/floor/plating
var/icon_regular_floor = "floor" //used to remember what icon the tile should have by default
var/icon_plating = "plating"
@@ -59,21 +60,25 @@
switch(severity)
if(1)
ScrapeAway()
ScrapeAway(2)
if(2)
switch(pick(1,2;75,3))
if(1)
src.ReplaceWithLattice()
if(!length(baseturfs) || !ispath(baseturfs[baseturfs.len-1], /turf/open/floor))
ScrapeAway()
ReplaceWithLattice()
else
ScrapeAway(2)
if(prob(33))
new /obj/item/stack/sheet/metal(src)
if(2)
ScrapeAway()
ScrapeAway(2)
if(3)
if(prob(80))
src.break_tile_to_plating()
ScrapeAway()
else
src.break_tile()
src.hotspot_expose(1000,CELL_VOLUME)
break_tile()
hotspot_expose(1000,CELL_VOLUME)
if(prob(33))
new /obj/item/stack/sheet/metal(src)
if(3)
@@ -94,13 +99,15 @@
return 1
/turf/open/floor/attack_paw(mob/user)
return src.attack_hand(user)
return attack_hand(user)
/turf/open/floor/proc/gets_drilled()
return
/turf/open/floor/proc/break_tile_to_plating()
var/turf/open/floor/plating/T = make_plating()
if(!istype(T))
return
T.break_tile()
/turf/open/floor/proc/break_tile()
@@ -119,7 +126,7 @@
burnt = 1
/turf/open/floor/proc/make_plating()
return ChangeTurf(/turf/open/floor/plating)
return ScrapeAway()
/turf/open/floor/ChangeTurf(path, new_baseturf, flags)
if(!isfloorturf(src))
@@ -219,6 +219,7 @@
icon_state = "alienpod1"
floor_tile = /obj/item/stack/tile/mineral/abductor
icons = list("alienpod1", "alienpod2", "alienpod3", "alienpod4", "alienpod5", "alienpod6", "alienpod7", "alienpod8", "alienpod9")
baseturfs = /turf/open/floor/plating/abductor2
/turf/open/floor/mineral/abductor/Initialize()
. = ..()
@@ -229,6 +230,3 @@
/turf/open/floor/mineral/abductor/burn_tile()
return //unburnable
/turf/open/floor/mineral/abductor/make_plating()
return ChangeTurf(/turf/open/floor/plating/abductor2)
+6 -2
View File
@@ -11,6 +11,7 @@
name = "plating"
icon_state = "plating"
intact = FALSE
baseturfs = /turf/open/space
var/attachment_holes = TRUE
/turf/open/floor/plating/examine(mob/user)
@@ -55,7 +56,7 @@
to_chat(user, "<span class='notice'>You begin reinforcing the floor...</span>")
if(do_after(user, 30, target = src))
if (R.get_amount() >= 2 && !istype(src, /turf/open/floor/engine))
ChangeTurf(/turf/open/floor/engine)
PlaceOnTop(/turf/open/floor/engine)
playsound(src, 'sound/items/deconstruct.ogg', 80, 1)
R.use(2)
to_chat(user, "<span class='notice'>You reinforce the floor.</span>")
@@ -70,7 +71,7 @@
var/obj/item/stack/tile/W = C
if(!W.use(1))
return
var/turf/open/floor/T = ChangeTurf(W.turf_type)
var/turf/open/floor/T = PlaceOnTop(W.turf_type)
if(istype(W, /obj/item/stack/tile/light)) //TODO: get rid of this ugly check somehow
var/obj/item/stack/tile/light/L = W
var/turf/open/floor/light/F = T
@@ -88,6 +89,9 @@
return TRUE
/turf/open/floor/plating/make_plating()
return
/turf/open/floor/plating/foam
name = "metal foam plating"
desc = "Thin, fragile flooring created with metal foam."
@@ -1,6 +1,4 @@
/**********************Asteroid**************************/
/turf/open/floor/plating/asteroid //floor piece
@@ -43,12 +41,9 @@
if(..())
return TRUE
if(istype(W, /obj/item/storage/bag/ore))
var/obj/item/storage/bag/ore/S = W
if(S.collection_mode == 1)
for(var/obj/item/stack/ore/O in contents)
O.attackby(W,user)
return
for(var/obj/item/stack/ore/O in src)
W.SendSignal(COMSIG_PARENT_ATTACKBY, O)
/turf/open/floor/plating/asteroid/singularity_act()
if(is_planet_level(z))
return ..()
@@ -198,6 +193,9 @@
if(istype(tunnel))
// Small chance to have forks in our tunnel; otherwise dig our tunnel.
if(i > 3 && prob(20))
if(istype(tunnel.loc, /area/mine/explored) || (istype(tunnel.loc, /area/lavaland/surface/outdoors) && !istype(tunnel.loc, /area/lavaland/surface/outdoors/unexplored)))
sanity = 0
break
var/turf/open/floor/plating/asteroid/airless/cave/C = tunnel.ChangeTurf(data_having_type, null, CHANGETURF_IGNORE_AIR)
C.going_backwards = FALSE
C.produce_tunnel_from_data(rand(10, 15), dir)
@@ -216,7 +214,7 @@
/turf/open/floor/plating/asteroid/airless/cave/proc/SpawnFloor(turf/T)
for(var/S in RANGE_TURFS(1, src))
var/turf/NT = S
if(!NT || isspaceturf(NT) || istype(NT.loc, /area/mine/explored) || istype(NT.loc, /area/lavaland/surface/outdoors/explored))
if(!NT || isspaceturf(NT) || istype(NT.loc, /area/mine/explored) || (istype(NT.loc, /area/lavaland/surface/outdoors) && !istype(NT.loc, /area/lavaland/surface/outdoors/unexplored)))
sanity = 0
break
if(!sanity)
@@ -37,7 +37,7 @@
if(!istype(src, /turf/open/floor/engine))
return TRUE
new /obj/item/stack/rods(src, 2)
ChangeTurf(/turf/open/floor/plating)
ScrapeAway()
return TRUE
/turf/open/floor/engine/acid_act(acidpwr, acid_volume)
@@ -55,14 +55,18 @@
switch(severity)
if(1)
if(prob(80))
ReplaceWithLattice()
if(!length(baseturfs) || !ispath(baseturfs[baseturfs.len-1], /turf/open/floor))
ScrapeAway()
ReplaceWithLattice()
else
ScrapeAway(2)
else if(prob(50))
ScrapeAway()
ScrapeAway(2)
else
make_plating(1)
ScrapeAway()
if(2)
if(prob(50))
make_plating(1)
ScrapeAway()
/turf/open/floor/engine/singularity_pull(S, current_size)
..()
+1 -1
View File
@@ -48,7 +48,7 @@
switch(passed_mode)
if(RCD_FLOORWALL)
to_chat(user, "<span class='notice'>You build a floor.</span>")
ChangeTurf(/turf/open/floor/plating)
PlaceOnTop(/turf/open/floor/plating)
return TRUE
return FALSE
+2 -2
View File
@@ -78,7 +78,7 @@
var/flags = NONE
if(defer_change) // TODO: make the defer change var a var for any changeturf flag
flags = CHANGETURF_DEFER_CHANGE
ChangeTurf(turf_type, null, flags)
ScrapeAway(null, flags)
addtimer(CALLBACK(src, .proc/AfterChange), 1, TIMER_UNIQUE)
playsound(src, 'sound/effects/break_stone.ogg', 50, 1) //beautiful destruction
@@ -513,7 +513,7 @@
var/flags = NONE
if(defer_change)
flags = CHANGETURF_DEFER_CHANGE
ChangeTurf(turf_type, null, flags)
ScrapeAway(null, flags)
addtimer(CALLBACK(src, .proc/AfterChange), 1, TIMER_UNIQUE)
+1 -1
View File
@@ -4,7 +4,7 @@
#define RANDOM_LOWER_X 50
#define RANDOM_LOWER_Y 50
/proc/spawn_rivers(target_z, nodes = 4, turf_type = /turf/open/lava/smooth/lava_land_surface, whitelist_area = /area/lavaland/surface/outdoors, min_x = RANDOM_LOWER_X, min_y = RANDOM_LOWER_Y, max_x = RANDOM_UPPER_X, max_y = RANDOM_UPPER_Y)
/proc/spawn_rivers(target_z, nodes = 4, turf_type = /turf/open/lava/smooth/lava_land_surface, whitelist_area = /area/lavaland/surface/outdoors/unexplored, min_x = RANDOM_LOWER_X, min_y = RANDOM_LOWER_Y, max_x = RANDOM_UPPER_X, max_y = RANDOM_UPPER_Y)
var/list/river_nodes = list()
var/num_spawned = 0
var/list/possible_locs = block(locate(min_x, min_y, target_z), locate(max_x, max_y, target_z))
@@ -102,7 +102,7 @@
/turf/closed/wall/mineral/plasma/proc/PlasmaBurn(temperature)
new girder_type(src)
src.ChangeTurf(/turf/open/floor/plasteel)
ScrapeAway()
var/turf/open/T = src
T.atmos_spawn_air("plasma=400;TEMP=[temperature]")
@@ -27,7 +27,7 @@
to_chat(user, "<span class='notice'>The support lines have been <i>unscrewed</i>, and the metal cover is <b>welded</b> firmly in place.</span>")
if(CUT_COVER)
to_chat(user, "<span class='notice'>The metal cover has been <i>sliced through</i>, and is <b>connected loosely</b> to the girder.</span>")
if(BOLTS)
if(ANCHOR_BOLTS)
to_chat(user, "<span class='notice'>The outer cover has been <i>pried away</i>, and the bolts anchoring the support rods are <b>wrenched</b> in place.</span>")
if(SUPPORT_RODS)
to_chat(user, "<span class='notice'>The bolts anchoring the support rods have been <i>loosened</i>, but are still <b>welded</b> firmly to the girder.</span>")
@@ -120,7 +120,7 @@
if(W.use_tool(src, user, 100, volume=100))
if(!istype(src, /turf/closed/wall/r_wall) || d_state != CUT_COVER)
return 1
d_state = BOLTS
d_state = ANCHOR_BOLTS
update_icon()
to_chat(user, "<span class='notice'>You pry off the cover.</span>")
return 1
@@ -137,11 +137,11 @@
to_chat(user, "<span class='notice'>The metal cover has been welded securely to the frame.</span>")
return 1
if(BOLTS)
if(ANCHOR_BOLTS)
if(istype(W, /obj/item/wrench))
to_chat(user, "<span class='notice'>You start loosening the anchoring bolts which secure the support rods to their frame...</span>")
if(W.use_tool(src, user, 40, volume=100))
if(!istype(src, /turf/closed/wall/r_wall) || d_state != BOLTS)
if(!istype(src, /turf/closed/wall/r_wall) || d_state != ANCHOR_BOLTS)
return 1
d_state = SUPPORT_RODS
update_icon()
@@ -151,7 +151,7 @@
if(istype(W, /obj/item/crowbar))
to_chat(user, "<span class='notice'>You start to pry the cover back into place...</span>")
if(W.use_tool(src, user, 20, volume=100))
if(!istype(src, /turf/closed/wall/r_wall) || d_state != BOLTS)
if(!istype(src, /turf/closed/wall/r_wall) || d_state != ANCHOR_BOLTS)
return 1
d_state = CUT_COVER
update_icon()
@@ -177,7 +177,7 @@
if(W.use_tool(src, user, 40))
if(!istype(src, /turf/closed/wall/r_wall) || d_state != SUPPORT_RODS)
return 1
d_state = BOLTS
d_state = ANCHOR_BOLTS
update_icon()
to_chat(user, "<span class='notice'>You tighten the bolts anchoring the support rods.</span>")
return 1