Merge pull request #5357 from tkdrg/attackoftheturfs

Floor refactor
This commit is contained in:
hornygranny
2014-10-30 17:23:20 -07:00
22 changed files with 603 additions and 842 deletions
+6 -10
View File
@@ -341,7 +341,7 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
result = scan_target
if(REPLACE_TILE)
F = scan_target
if(F.is_plating()) //The floor must not already have a tile.
if(istype(F, /turf/simulated/floor/plating)) //The floor must not already have a tile.
result = F
if(FIX_TILE) //Selects only damaged floors.
F = scan_target
@@ -349,7 +349,7 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
result = F
if(TILE_EMAG) //Emag mode! Rip up the floor and cause breaches to space!
F = scan_target
if(!F.is_plating())
if(!istype(F, /turf/simulated/floor/plating))
result = F
else //If no special processing is needed, simply return the result.
result = scan_target
@@ -368,8 +368,6 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
mode = BOT_IDLE
target = null
return
var/turf/simulated/floor/F
var/obj/item/stack/tile/plasteel/T = new /obj/item/stack/tile/plasteel
anchored = 1
icon_state = "floorbot-c"
if(istype(target_turf, /turf/space/)) //If we are fixing an area not part of pure space, it is
@@ -378,23 +376,21 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
spawn(50)
if(mode == BOT_REPAIRING)
if(autotile) //Build the floor and include a tile.
F = target_turf.ChangeTurf(/turf/simulated/floor)
target_turf.ChangeTurf(/turf/simulated/floor)
else //Build a hull plating without a floor tile.
T.build(loc)
target_turf.ChangeTurf(/turf/simulated/floor/plating)
mode = BOT_IDLE
amount -= 1
updateicon()
anchored = 0
target = null
else
F = target_turf
var/turf/simulated/floor/F = target_turf
mode = BOT_REPAIRING
visible_message("<span class='notice'> [src] begins repairing the floor.</span>")
spawn(50)
if(mode == BOT_REPAIRING)
F = target_turf
F.make_plasteel_floor(T)
F.make_floor(/turf/simulated/floor)
mode = BOT_IDLE
amount -= 1
updateicon()
@@ -281,25 +281,22 @@
// Holographic Items!
/turf/simulated/floor/holofloor/
/turf/simulated/floor/holofloor
thermal_conductivity = 0
/turf/simulated/floor/holofloor/grass
gender = PLURAL
name = "lush grass"
icon_state = "grass1"
floor_tile = new/obj/item/stack/tile/grass
floor_tile = /obj/item/stack/tile/grass
New()
floor_tile.New() //I guess New() isn't run on objects spawned without the definition of a turf to house them, ah well.
icon_state = "grass[pick("1","2","3","4")]"
..()
spawn(4)
/turf/simulated/floor/holofloor/grass/New()
..()
icon_state = "grass[pick("1","2","3","4")]"
spawn(1)
if(src)
update_icon()
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding get updated properly
fancy_update(type)
/turf/simulated/floor/holofloor/attackby(obj/item/weapon/W as obj, mob/user as mob)
return
+2 -2
View File
@@ -488,9 +488,9 @@
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer/proc/dismantleFloor(var/turf/new_turf)
if(istype(new_turf, /turf/simulated/floor))
var/turf/simulated/floor/T = new_turf
if(!T.is_plating())
if(!istype(T, /turf/simulated/floor/plating))
if(!T.broken && !T.burnt)
new T.floor_tile.type(T)
new T.floor_tile(T)
T.make_plating()
return !new_turf.intact
+2
View File
@@ -3,6 +3,8 @@
icon = 'icons/turf/floors.dmi' // That are set in stone to check the west turf for recharge port
icon_state = "recharge_floor" // Some people just want to watch the world burn i guess
/turf/simulated/floor/mech_bay_recharge_floor/break_tile()
src.ChangeTurf(/turf/simulated/floor/plating)
/turf/simulated/floor/mech_bay_recharge_floor/airless
icon_state = "recharge_floor_asteroid"
@@ -11,8 +11,8 @@
flags = CONDUCT
max_amount = 60
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
var/on = 1
var/state //0 = fine, 1 = flickering, 2 = breaking, 3 = broken
turf_type = /turf/simulated/floor/light
var/state = 0
/obj/item/stack/tile/light/New(var/loc, var/amount=null)
..()
@@ -11,6 +11,7 @@
throw_range = 7
flags = CONDUCT
max_amount = 60
turf_type = /turf/simulated/floor
/obj/item/stack/tile/plasteel/cyborg
desc = "The ground you walk on" //Not the usual floor tile desc as that refers to throwing, Cyborgs can't do that - RR
@@ -47,29 +48,3 @@
return
else
..()
/*
/obj/item/stack/tile/plasteel/attack_self(mob/user as mob)
if (usr.stat)
return
var/T = user.loc
if (!( istype(T, /turf) ))
user << "\red You must be on the ground!"
return
if (!( istype(T, /turf/space) ))
user << "\red You cannot build on or repair this turf!"
return
src.build(T)
src.add_fingerprint(user)
use(1)
return
*/
/obj/item/stack/tile/plasteel/proc/build(turf/S as turf)
S.ChangeTurf(/turf/simulated/floor/plating)
// var/turf/simulated/floor/W = S.ReplaceWithFloor()
// W.make_plating()
return
@@ -10,6 +10,7 @@
throw_range = 7
max_amount = 60
origin_tech = "plasma=1"
turf_type = /turf/simulated/floor/mineral/plasma
/obj/item/stack/tile/mineral/uranium
name = "uranium tile"
@@ -23,6 +24,7 @@
throw_range = 7
max_amount = 60
origin_tech = "material=1"
turf_type = /turf/simulated/floor/mineral/uranium
/obj/item/stack/tile/mineral/gold
name = "gold tile"
@@ -36,6 +38,7 @@
throw_range = 7
max_amount = 60
origin_tech = "material=1"
turf_type = /turf/simulated/floor/mineral/gold
/obj/item/stack/tile/mineral/silver
name = "silver tile"
@@ -49,6 +52,7 @@
throw_range = 7
max_amount = 60
origin_tech = "material=1"
turf_type = /turf/simulated/floor/mineral/silver
/obj/item/stack/tile/mineral/diamond
name = "diamond tile"
@@ -62,6 +66,7 @@
throw_range = 7
max_amount = 60
origin_tech = "material=2"
turf_type = /turf/simulated/floor/mineral/diamond
/obj/item/stack/tile/mineral/bananium
name = "bananium tile"
@@ -75,4 +80,5 @@
throw_range = 7
max_amount = 60
origin_tech = "material=1"
turf_type = /turf/simulated/floor/mineral/bananium
@@ -1,10 +1,20 @@
/* Diffrent misc types of tiles
/* Diffrent misc types of tiles & the tile prototype
* Contains:
Tile
* Grass
* Wood
* Carpet
*/
/*
* Tile
*/
/obj/item/stack/tile
name = "broken tile"
singular_name = "broken tile"
desc = "A broken tile. This should not exist."
var/turf_type = null
/*
* Grass
*/
@@ -20,6 +30,7 @@
throw_range = 7
max_amount = 60
origin_tech = "biotech=1"
turf_type = /turf/simulated/floor/grass
/*
* Wood
@@ -36,6 +47,8 @@
throw_range = 7
max_amount = 60
origin_tech = "biotech=1"
turf_type = /turf/simulated/floor/wood
/*
* Carpets
*/
@@ -50,3 +63,4 @@
throw_speed = 3
throw_range = 7
max_amount = 60
turf_type = /turf/simulated/floor/carpet
+71 -491
View File
@@ -12,22 +12,14 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
"ironsand6", "ironsand7", "ironsand8", "ironsand9", "ironsand10", "ironsand11",
"ironsand12", "ironsand13", "ironsand14", "ironsand15")
var/list/plating_icons = list("plating","platingdmg1","platingdmg2","platingdmg3","asteroid","asteroid_dug",
"ironsand1", "ironsand2", "ironsand3", "ironsand4", "ironsand5", "ironsand6", "ironsand7",
"ironsand8", "ironsand9", "ironsand10", "ironsand11",
"ironsand12", "ironsand13", "ironsand14", "ironsand15")
var/list/wood_icons = list("wood","wood-broken")
var/list/gold_icons = list("gold","gold_dam")
var/list/silver_icons = list("silver","silver_dam")
var/list/plasma_icons = list("plasma","plasma_dam")
var/list/diamond_icons = list("diamond","diamond_dam")
var/list/uranium_icons = list("uranium","uranium_dam")
var/list/bananium_icons = list("bananium","bananium_dam")
/turf/simulated/floor
//Note to coders, the 'intact' var can no longer be used to determine if the floor is a plating or not.
//Use the is_plating(), is_plasteel_floor() and is_light_floor() procs instead. --Errorage
//NOTE: Floor code has been refactored, many procs were removed
//using intact should be safe, you can also use istype
//also worhy of note: floor_tile is now a path, and not a tile obj
//future improvements:
//- move fancy_update() to a new /turf/simulated/floor/fancy
//- move the default floor to /turf/simulated/floor/plasteel
//- unsnowflake the light floors somehow
name = "floor"
icon = 'icons/turf/floors.dmi'
icon_state = "floor"
@@ -36,13 +28,14 @@ var/list/bananium_icons = list("bananium","bananium_dam")
var/icon_plating = "plating"
thermal_conductivity = 0.040
heat_capacity = 10000
intact = 1
var/lava = 0
var/broken = 0
var/burnt = 0
var/mineral = "metal"
var/floortype = "metal"
var/obj/item/stack/tile/floor_tile = new/obj/item/stack/tile/plasteel
var/floor_tile = /obj/item/stack/tile/plasteel
var/obj/item/stack/tile/builtin_tile = null //needed for performance reasons when the singularity rips off floor tiles
var/list/broken_states = list("damaged1", "damaged2", "damaged3", "damaged4", "damaged5")
var/list/burnt_states = list()
/turf/simulated/floor/New()
..()
@@ -50,6 +43,8 @@ var/list/bananium_icons = list("bananium","bananium_dam")
icon_regular_floor = "floor"
else
icon_regular_floor = icon_state
if(floor_tile)
builtin_tile = new floor_tile
//turf/simulated/floor/CanPass(atom/movable/mover, turf/target, height=0)
// if ((istype(mover, /obj/machinery/vehicle) && !(src.burnt)))
@@ -58,7 +53,6 @@ var/list/bananium_icons = list("bananium","bananium_dam")
// return ..()
/turf/simulated/floor/ex_act(severity)
//set src in oview(1)
switch(severity)
if(1.0)
src.ChangeTurf(/turf/space)
@@ -85,506 +79,92 @@ var/list/bananium_icons = list("bananium","bananium_dam")
/turf/simulated/floor/blob_act()
return
turf/simulated/floor/proc/update_icon()
/turf/simulated/floor/proc/update_icon()
if(lava)
return
return 0
else if(is_plasteel_floor())
if(!broken && !burnt)
icon_state = icon_regular_floor
else if(is_plating())
if(!broken && !burnt)
icon_state = icon_plating //Because asteroids are 'platings' too.
else if(is_light_floor())
var/obj/item/stack/tile/light/T = floor_tile
if(T.on)
switch(T.state)
if(0)
icon_state = "light_on"
SetLuminosity(1)
if(1)
var/num = pick("1","2","3","4")
icon_state = "light_on_flicker[num]"
SetLuminosity(1)
if(2)
icon_state = "light_on_broken"
SetLuminosity(1)
if(3)
icon_state = "light_off"
SetLuminosity(0)
else
SetLuminosity(0)
icon_state = "light_off"
else if(is_grass_floor())
if(!broken && !burnt)
if(!(icon_state in list("grass1","grass2","grass3","grass4")))
icon_state = "grass[pick("1","2","3","4")]"
else if(is_carpet_floor())
if(!broken && !burnt)
if(icon_state == "carpetsymbol") //le snowflake :^)
return
var/connectdir = 0
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
if(FF.is_carpet_floor())
connectdir |= direction
//Check the diagonal connections for corners, where you have, for example, connections both north and east. In this case it checks for a north-east connection to determine whether to add a corner marker or not.
var/diagonalconnect = 0 //1 = NE; 2 = SE; 4 = NW; 8 = SW
//Northeast
if(connectdir & NORTH && connectdir & EAST)
if(istype(get_step(src,NORTHEAST),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,NORTHEAST)
if(FF.is_carpet_floor())
diagonalconnect |= 1
//Southeast
if(connectdir & SOUTH && connectdir & EAST)
if(istype(get_step(src,SOUTHEAST),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,SOUTHEAST)
if(FF.is_carpet_floor())
diagonalconnect |= 2
//Northwest
if(connectdir & NORTH && connectdir & WEST)
if(istype(get_step(src,NORTHWEST),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,NORTHWEST)
if(FF.is_carpet_floor())
diagonalconnect |= 4
//Southwest
if(connectdir & SOUTH && connectdir & WEST)
if(istype(get_step(src,SOUTHWEST),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,SOUTHWEST)
if(FF.is_carpet_floor())
diagonalconnect |= 8
icon_state = "carpet[connectdir]-[diagonalconnect]"
else if(is_wood_floor())
if(!broken && !burnt)
if( !(icon_state in wood_icons) )
icon_state = "wood"
//world << "[icon_state]y's got [icon_state]"
else if(is_gold_floor())
if(!broken && !burnt)
if( !(icon_state in gold_icons) )
icon_state = "gold"
else if(is_silver_floor())
if(!broken && !burnt)
if( !(icon_state in silver_icons) )
icon_state = "silver"
else if(is_plasma_floor())
if(!broken && !burnt)
if( !(icon_state in plasma_icons) )
icon_state = "plasma"
else if(is_uranium_floor())
if(!broken && !burnt)
if( !(icon_state in uranium_icons) )
icon_state = "uranium"
else if(is_diamond_floor())
if(!broken && !burnt)
if( !(icon_state in diamond_icons) )
icon_state = "diamond"
else if(is_bananium_floor())
if(!broken && !burnt)
if( !(icon_state in bananium_icons) )
icon_state = "bananium"
spawn(1)
if(istype(src,/turf/simulated/floor)) //Was throwing runtime errors due to a chance of it changing to space halfway through.
if(air)
update_visuals(air)
/turf/simulated/floor/return_siding_icon_state()
..()
if(is_grass_floor())
var/dir_sum = 0
for(var/direction in cardinal)
var/turf/T = get_step(src,direction)
if(!(T.is_grass_floor()))
dir_sum += direction
if(dir_sum)
return "wood_siding[dir_sum]"
else
return 0
return 0
if(air)
update_visuals(air)
return 1
/turf/simulated/floor/attack_paw(mob/user as mob)
return src.attack_hand(user)
/turf/simulated/floor/attack_hand(mob/user as mob)
if (is_light_floor())
var/obj/item/stack/tile/light/T = floor_tile
T.on = !T.on
update_icon()
..()
/turf/simulated/floor/proc/gets_drilled()
return
/turf/simulated/floor/proc/break_tile_to_plating()
if(!is_plating())
make_plating()
break_tile()
/turf/simulated/floor/is_plasteel_floor()
if(istype(floor_tile, /obj/item/stack/tile/plasteel))
if(ispath(floor_tile, /obj/item/stack/tile/plasteel))
return 1
else
return 0
/turf/simulated/floor/is_light_floor()
if(istype(floor_tile, /obj/item/stack/tile/light))
return 1
else
return 0
//updates neighboring carpet & grass
/turf/simulated/floor/proc/fancy_update(fancy_type)
for(var/direction in list(1,2,4,8,5,6,9,10))
if(istype(get_step(src,direction), fancy_type))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon()
/turf/simulated/floor/is_grass_floor()
if(istype(floor_tile, /obj/item/stack/tile/grass))
return 1
else
return 0
/turf/simulated/floor/is_wood_floor()
if(istype(floor_tile, /obj/item/stack/tile/wood))
return 1
else
return 0
/turf/simulated/floor/is_gold_floor()
if(istype(floor_tile, /obj/item/stack/tile/mineral/gold))
return 1
else
return 0
/turf/simulated/floor/is_silver_floor()
if(istype(floor_tile, /obj/item/stack/tile/mineral/silver))
return 1
else
return 0
/turf/simulated/floor/is_plasma_floor()
if(istype(floor_tile, /obj/item/stack/tile/mineral/plasma))
return 1
else
return 0
/turf/simulated/floor/is_uranium_floor()
if(istype(floor_tile, /obj/item/stack/tile/mineral/uranium))
return 1
else
return 0
/turf/simulated/floor/is_diamond_floor()
if(istype(floor_tile, /obj/item/stack/tile/mineral/diamond))
return 1
else
return 0
/turf/simulated/floor/is_bananium_floor()
if(istype(floor_tile, /obj/item/stack/tile/mineral/bananium))
return 1
else
return 0
/turf/simulated/floor/is_carpet_floor()
if(istype(floor_tile, /obj/item/stack/tile/carpet))
return 1
else
return 0
/turf/simulated/floor/is_plating()
if(!floor_tile)
return 1
return 0
/turf/simulated/floor/proc/break_tile_to_plating()
var/turf/simulated/floor/plating/T = make_plating()
T.break_tile()
/turf/simulated/floor/proc/break_tile()
if(istype(src,/turf/simulated/floor/engine)) return
if(istype(src,/turf/simulated/floor/mech_bay_recharge_floor))
src.ChangeTurf(/turf/simulated/floor/plating)
if(broken) return
if(is_plasteel_floor())
src.icon_state = "damaged[pick(1,2,3,4,5)]"
broken = 1
else if(is_light_floor())
src.icon_state = "light_broken"
broken = 1
else if(is_plating())
src.icon_state = "platingdmg[pick(1,2,3)]"
broken = 1
else if(is_wood_floor())
src.icon_state = "wood-broken"
broken = 1
else if(is_carpet_floor())
src.icon_state = "carpet-broken"
broken = 1
else if(is_grass_floor())
src.icon_state = "sand[pick("1","2","3")]"
broken = 1
else if(is_gold_floor())
src.icon_state = "gold_dam"
broken = 1
else if(is_silver_floor())
src.icon_state = "silver_dam"
broken = 1
else if(is_diamond_floor())
src.icon_state = "diamond_dam"
broken = 1
else if(is_bananium_floor())
src.icon_state = "bananium_dam"
broken = 1
else if(is_uranium_floor())
src.icon_state = "uranium_dam"
broken = 1
else if(is_plasma_floor())
src.icon_state = "plasma_dam"
broken = 1
if(broken)
return
icon_state = pick(broken_states)
broken = 1
/turf/simulated/floor/proc/burn_tile()
if(istype(src,/turf/simulated/floor/engine)) return
if(istype(src,/turf/simulated/floor/plating/asteroid/airless)) return//Asteroid tiles don't burn
if(broken || burnt) return
if(is_plasteel_floor())
src.icon_state = "damaged[pick(1,2,3,4,5)]"
burnt = 1
else if(is_plasteel_floor())
src.icon_state = "floorscorched[pick(1,2)]"
burnt = 1
else if(is_plating())
src.icon_state = "panelscorched"
burnt = 1
else if(is_wood_floor())
src.icon_state = "wood-broken"
burnt = 1
else if(is_carpet_floor())
src.icon_state = "carpet-broken"
burnt = 1
else if(is_grass_floor())
src.icon_state = "sand[pick("1","2","3")]"
burnt = 1
else if(is_gold_floor())
src.icon_state = "gold_dam"
burnt = 1
else if(is_silver_floor())
src.icon_state = "silver_dam"
burnt = 1
else if(is_diamond_floor())
src.icon_state = "diamond_dam"
burnt = 1
else if(is_bananium_floor())
src.icon_state = "bananium_dam"
burnt = 1
else if(is_uranium_floor())
src.icon_state = "uranium_dam"
burnt = 1
//This proc will delete the floor_tile and the update_iocn() proc will then change the icon_state of the turf
//This proc auto corrects the grass tiles' siding.
/turf/simulated/floor/proc/make_plating()
if(istype(src,/turf/simulated/floor/engine)) return
if(is_grass_floor())
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding get updated properly
else if(is_carpet_floor())
spawn(5)
if(src)
for(var/direction in list(1,2,4,8,5,6,9,10))
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding get updated properly
if (icon_plating)
icon_state = icon_plating
else
icon_state = "plating" //Nothing is defined, so just make it plating
icon_plating = "plating"
if(floor_tile)
qdel(floor_tile)
SetLuminosity(0)
floor_tile = null
intact = 0
broken = 0
burnt = 0
update_icon()
levelupdate()
//This proc will make the turf a plasteel floor tile. The expected argument is the tile to make the turf with
//If none is given it will make a new object. dropping or unequipping must be handled before or after calling
//this proc.
/turf/simulated/floor/proc/make_plasteel_floor(var/obj/item/stack/tile/plasteel/T = null)
broken = 0
burnt = 0
intact = 1
SetLuminosity(0)
if(T)
if(istype(T, /obj/item/stack/tile/plasteel))
floor_tile = T
if (icon_regular_floor)
icon_state = icon_regular_floor
else
icon_state = "floor"
icon_regular_floor = "floor"
update_icon()
levelupdate()
return
//if you gave a valid parameter, it won't get this far.
floor_tile = new/obj/item/stack/tile/plasteel
icon_state = "floor"
icon_regular_floor = "floor"
update_icon()
levelupdate()
/turf/simulated/floor/proc/make_floor(floor_tile, T)
broken = 0
burnt = 0
intact = 1
if(T)
floor_tile = T
update_icon()
levelupdate()
if(broken || burnt)
return
//This proc will make the turf a light floor tile. The expected argument is the tile to make the turf with
//If none is given it will make a new object. dropping or unequipping must be handled before or after calling
//this proc.
if(is_plasteel_floor())
icon_state = "floorscorched[pick(1,2)]"
else if(burnt_states)
icon_state = pick(burnt_states)
else
icon_state = pick(broken_states)
burnt = 1
/turf/simulated/floor/proc/make_plating()
return make_floor(/turf/simulated/floor/plating)
//wrapper for ChangeTurf that handles flooring properly
/turf/simulated/floor/proc/make_floor(turf/simulated/floor/T as turf)
SetLuminosity(0)
var/old_type = type
var/old_icon = icon_regular_floor
var/old_dir = dir
var/turf/simulated/floor/W = ChangeTurf(T)
W.icon_regular_floor = old_icon
W.dir = old_dir
W.update_icon()
W.fancy_update(old_type)
return W
/turf/simulated/floor/attackby(obj/item/C as obj, mob/user as mob)
if(!C || !user)
return 0
if(istype(C,/obj/item/weapon/light/bulb)) //only for light tiles
if(is_light_floor())
var/obj/item/stack/tile/light/T = floor_tile
if(T.state)
user.drop_item()
qdel(C)
T.state = C //fixing it by bashing it with a light bulb, fun eh?
update_icon()
user << "<span class='notice'>You replace the light bulb.</span>"
else
user << "<span class='notice'>The lightbulb seems fine, no need to replace it.</span>"
if(istype(C, /obj/item/weapon/crowbar) && (!(is_plating())))
return 1
if(istype(C, /obj/item/weapon/crowbar))
if(broken || burnt)
broken = 0
burnt = 0
user << "<span class='danger'>You remove the broken plating.</span>"
else
if(is_wood_floor())
if(istype(src, /turf/simulated/floor/wood))
user << "<span class='danger'>You forcefully pry off the planks, destroying them in the process.</span>"
else
user << "<span class='danger'>You remove the [floor_tile.name].</span>"
new floor_tile.type(src)
user << "<span class='danger'>You remove the floor tile.</span>"
var/obj/item/stack/tile/T = new floor_tile(src)
if(istype(T, /obj/item/stack/tile/light))
var/obj/item/stack/tile/light/L = T
var/turf/simulated/floor/light/F = src
L.state = F.state
make_plating()
playsound(src, 'sound/items/Crowbar.ogg', 80, 1)
return
if(istype(C, /obj/item/weapon/screwdriver) && is_wood_floor())
if(broken || burnt)
return
else
if(is_wood_floor())
user << "<span class='danger'>You unscrew the planks.</span>"
new floor_tile.type(src)
make_plating()
playsound(src, 'sound/items/Screwdriver.ogg', 80, 1)
return
if(istype(C, /obj/item/stack/rods))
var/obj/item/stack/rods/R = C
if (is_plating())
if (R.get_amount() < 2)
user << "<span class='warning'>You need two rods to make a reinforced floor.</span>"
return
else
user << "<span class='notice'>Reinforcing the floor...</span>"
if(do_after(user, 30))
if (R.get_amount() >= 2 && is_plating())
ChangeTurf(/turf/simulated/floor/engine)
playsound(src, 'sound/items/Deconstruct.ogg', 80, 1)
R.use(2)
user << "<span class='notice'>You have reinforced the floor.</span>"
return
else
user << "<span class='warning'>You must remove the plating first.</span>"
return
if(istype(C, /obj/item/stack/tile))
if(is_plating())
if(!broken && !burnt)
var/obj/item/stack/tile/T = C
if(istype(T, /obj/item/stack/tile/plasteel/cyborg))
floor_tile = new /obj/item/stack/tile/plasteel
else
floor_tile = new T.type
intact = 1
if(istype(T,/obj/item/stack/tile/light))
var/obj/item/stack/tile/light/L = T
var/obj/item/stack/tile/light/F = floor_tile
F.state = L.state
F.on = L.on
if(istype(T,/obj/item/stack/tile/grass))
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding gets updated properly
else if(istype(T,/obj/item/stack/tile/carpet))
for(var/direction in list(1,2,4,8,5,6,9,10))
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding gets updated properly
T.use(1)
update_icon()
levelupdate()
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
else
user << "<span class='notice'>This section is too damaged to support a tile. Use a welder to fix the damage.</span>"
if(istype(C, /obj/item/stack/cable_coil))
if(is_plating())
var/obj/item/stack/cable_coil/coil = C
for(var/obj/structure/cable/LC in src)
if((LC.d1==0)||(LC.d2==0))
LC.attackby(C,user)
return
coil.turf_place(src, user)
else
user << "<span class='warning'>You must remove the plating first.</span>"
if(istype(C, /obj/item/weapon/shovel))
if(is_grass_floor())
new /obj/item/weapon/ore/glass(src)
new /obj/item/weapon/ore/glass(src) //Make some sand if you shovel grass
user << "<span class='notice'>You shovel the grass.</span>"
make_plating()
else
user << "<span class='danger'>You cannot shovel this.</span>"
if(istype(C, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/welder = C
if(welder.isOn() && (is_plating()))
if(broken || burnt)
if(welder.remove_fuel(0,user))
user << "<span class='danger'>You fix some dents on the broken plating.</span>"
playsound(src, 'sound/items/Welder.ogg', 80, 1)
icon_state = icon_plating
burnt = 0
broken = 0
return 1
return 0
@@ -0,0 +1,115 @@
/* In this file:
* Wood floor
* Grass floor
* Carpet floor
*/
/turf/simulated/floor/wood
name = "floor"
icon_state = "wood"
floor_tile = /obj/item/stack/tile/wood
broken_states = list("wood-broken", "wood-broken2", "wood-broken3", "wood-broken4", "wood-broken5", "wood-broken6", "wood-broken7")
/turf/simulated/floor/wood/attackby(obj/item/C as obj, mob/user as mob)
if(..())
return
if(istype(C, /obj/item/weapon/screwdriver))
if(broken || burnt)
return
user << "<span class='danger'>You unscrew the planks.</span>"
new floor_tile(src)
make_plating()
playsound(src, 'sound/items/Screwdriver.ogg', 80, 1)
return
/turf/simulated/floor/grass
name = "Grass patch"
icon_state = "grass1"
floor_tile = /obj/item/stack/tile/grass
broken_states = list("sand1", "sand2", "sand3")
/turf/simulated/floor/grass/New()
..()
icon_state = "grass[pick("1","2","3","4")]"
spawn(1)
if(src)
update_icon()
fancy_update(type)
/turf/simulated/floor/grass/attackby(obj/item/C as obj, mob/user as mob)
if(..())
return
if(istype(C, /obj/item/weapon/shovel))
new /obj/item/weapon/ore/glass(src)
new /obj/item/weapon/ore/glass(src) //Make some sand if you shovel grass
user << "<span class='notice'>You shovel the grass.</span>"
make_plating()
/turf/simulated/floor/grass/return_siding_icon_state()
..()
var/dir_sum = 0
for(var/direction in cardinal)
if(!istype(get_step(src,direction), /turf/simulated/floor/grass))
dir_sum += direction
if(dir_sum)
return "wood_siding[dir_sum]"
else
return 0
/turf/simulated/floor/carpet
name = "Carpet"
icon_state = "carpet"
floor_tile = /obj/item/stack/tile/carpet
broken_states = list("carpet-broken")
/turf/simulated/floor/carpet/New()
..()
spawn(1)
if(src)
update_icon()
fancy_update(type)
/turf/simulated/floor/carpet/update_icon()
if(!broken && !burnt)
if(icon_state == "carpetsymbol") //le snowflake :^)
return
var/connectdir = 0
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor/carpet))
var/turf/simulated/floor/carpet/FF = get_step(src,direction)
if(istype(FF, /turf/simulated/floor/carpet))
connectdir |= direction
//Check the diagonal connections for corners, where you have, for example, connections both north and east. In this case it checks for a north-east connection to determine whether to add a corner marker or not.
var/diagonalconnect = 0 //1 = NE; 2 = SE; 4 = NW; 8 = SW
//Northeast
if(connectdir & NORTH && connectdir & EAST)
if(istype(get_step(src,NORTHEAST),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,NORTHEAST)
if(istype(FF, /turf/simulated/floor/carpet))
diagonalconnect |= 1
//Southeast
if(connectdir & SOUTH && connectdir & EAST)
if(istype(get_step(src,SOUTHEAST),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,SOUTHEAST)
if(istype(FF, /turf/simulated/floor/carpet))
diagonalconnect |= 2
//Northwest
if(connectdir & NORTH && connectdir & WEST)
if(istype(get_step(src,NORTHWEST),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,NORTHWEST)
if(istype(FF, /turf/simulated/floor/carpet))
diagonalconnect |= 4
//Southwest
if(connectdir & SOUTH && connectdir & WEST)
if(istype(get_step(src,SOUTHWEST),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,SOUTHWEST)
if(istype(FF, /turf/simulated/floor/carpet))
diagonalconnect |= 8
icon_state = "carpet[connectdir]-[diagonalconnect]"
@@ -0,0 +1,56 @@
/* In this file:
*
* Light floor
*/
/turf/simulated/floor/light
name = "Light floor"
luminosity = 5
icon_state = "light_on"
floor_tile = /obj/item/stack/tile/light
broken_states = list("light-broken")
var/on = 1
var/state //0 = fine, 1 = flickering, 2 = breaking, 3 = broken
/turf/simulated/floor/light/New()
..()
update_icon()
/turf/simulated/floor/light/update_icon()
if(on)
switch(state)
if(0)
icon_state = "light_on"
SetLuminosity(1)
if(1)
var/num = pick("1","2","3","4")
icon_state = "light_on_flicker[num]"
SetLuminosity(1)
if(2)
icon_state = "light_on_broken"
SetLuminosity(1)
if(3)
icon_state = "light_off"
SetLuminosity(0)
else
SetLuminosity(0)
icon_state = "light_off"
/turf/simulated/floor/light/attack_hand(mob/user as mob)
on = !on
update_icon()
..()
/turf/simulated/floor/light/attackby(obj/item/C as obj, mob/user as mob)
if(..())
return
if(istype(C,/obj/item/weapon/light/bulb)) //only for light tiles
if(state)
user.drop_item()
qdel(C)
state = 0 //fixing it by bashing it with a light bulb, fun eh?
update_icon()
user << "<span class='notice'>You replace the light bulb.</span>"
else
user << "<span class='notice'>The lightbulb seems fine, no need to replace it.</span>"
return
@@ -0,0 +1,64 @@
/* In this file:
*
* Plasma floor
* Gold floor
* Silver floor
* Bananium floor
* Diamond floor
* Uranium floor
*/
/turf/simulated/floor/mineral
name = "mineral floor"
icon_state = ""
var/list/icons = list()
/turf/simulated/floor/mineral/New()
..()
broken_states = list("[initial(icon_state)]_dam")
/turf/simulated/floor/mineral/update_icon()
if(!broken && !burnt)
if( !(icon_state in icons) )
icon_state = initial(icon_state)
/turf/simulated/floor/mineral/plasma
name = "plasma floor"
icon_state = "plasma"
floor_tile = /obj/item/stack/tile/mineral/plasma
icons = list("plasma","plasma_dam")
/turf/simulated/floor/mineral/gold
name = "gold floor"
icon_state = "gold"
floor_tile = /obj/item/stack/tile/mineral/gold
icons = list("gold","gold_dam")
/turf/simulated/floor/mineral/silver
name = "silver floor"
icon_state = "silver"
floor_tile = /obj/item/stack/tile/mineral/silver
icons = list("silver","silver_dam")
/turf/simulated/floor/mineral/bananium
name = "bananium floor"
icon_state = "bananium"
floor_tile = /obj/item/stack/tile/mineral/bananium
icons = list("bananium","bananium_dam")
/turf/simulated/floor/mineral/bananium/airless
oxygen = 0.01
nitrogen = 0.01
temperature = TCMB
/turf/simulated/floor/mineral/diamond
name = "diamond floor"
icon_state = "diamond"
floor_tile = /obj/item/stack/tile/mineral/diamond
icons = list("diamond","diamond_dam")
/turf/simulated/floor/mineral/uranium
name = "uranium floor"
icon_state = "uranium"
floor_tile = /obj/item/stack/tile/mineral/uranium
icons = list("uranium","uranium_dam")
@@ -0,0 +1,93 @@
/* In this file:
*
* Commemorative Plaque
* Vault floor
* Vault wall (why)
* Blue grid
* Green grid
* Shuttle floor
* Beach
* Ocean
* Iron Sand
* Snow
*/
/turf/simulated/floor/goonplaque
name = "Commemorative Plaque"
icon_state = "plaque"
desc = "\"This is a plaque in honour of our comrades on the G4407 Stations. Hopefully TG4407 model can live up to your fame and fortune.\" Scratched in beneath that is a crude image of a meteor and a spaceman. The spaceman is laughing. The meteor is exploding."
/turf/simulated/floor/vault
icon_state = "rockvault"
/turf/simulated/wall/vault
icon_state = "rockvault"
/turf/simulated/floor/bluegrid
icon = 'icons/turf/floors.dmi'
icon_state = "bcircuit"
/turf/simulated/floor/greengrid
icon = 'icons/turf/floors.dmi'
icon_state = "gcircuit"
/turf/simulated/shuttle
name = "shuttle"
icon = 'icons/turf/shuttle.dmi'
thermal_conductivity = 0.05
heat_capacity = 0
layer = 2
/turf/simulated/shuttle/wall
name = "wall"
icon_state = "wall1"
opacity = 1
density = 1
blocks_air = 1
/turf/simulated/shuttle/floor
name = "floor"
icon_state = "floor"
/turf/simulated/shuttle/plating
name = "plating"
icon = 'icons/turf/floors.dmi'
icon_state = "plating"
/turf/simulated/shuttle/floor4 // Added this floor tile so that I have a seperate turf to check in the shuttle -- Polymorph
name = "Brig floor" // Also added it into the 2x3 brig area of the shuttle.
icon_state = "floor4"
/turf/simulated/floor/beach
name = "Beach"
icon = 'icons/misc/beach.dmi'
/turf/simulated/floor/beach/ex_act(severity)
return
/turf/simulated/floor/beach/sand
name = "Sand"
icon_state = "sand"
/turf/simulated/floor/beach/coastline
name = "Coastline"
icon = 'icons/misc/beach2.dmi'
icon_state = "sandwater"
/turf/simulated/floor/beach/water
name = "Water"
icon_state = "water"
/turf/simulated/floor/plating/ironsand/New()
..()
name = "Iron Sand"
icon_state = "ironsand[rand(1,15)]"
/turf/simulated/floor/plating/snow
name = "snow"
icon = 'icons/turf/snow.dmi'
icon_state = "snow"
/turf/simulated/floor/plating/snow/ex_act(severity)
return
+145
View File
@@ -0,0 +1,145 @@
/* In this file:
*
* Plating
* Airless
* Airless plating
* Engine floor
*/
// note that plating and engine floor do not call their parent attackby, unlike other flooring
// this is done in order to avoid inheriting the crowbar attackby
/turf/simulated/floor/plating
name = "plating"
icon_state = "plating"
floor_tile = null
intact = 0
broken_states = list("platingdmg1", "platingdmg2", "platingdmg3")
burnt_states = list("panelscorched")
/turf/simulated/floor/plating/New()
..()
icon_plating = icon_state
/turf/simulated/floor/plating/update_icon()
if(..())
return
if(!broken && !burnt)
icon_state = icon_plating //Because asteroids are 'platings' too.
/turf/simulated/floor/plating/attackby(obj/item/C as obj, mob/user as mob)
if(!C || !user)
return
if(istype(C, /obj/item/stack/rods))
var/obj/item/stack/rods/R = C
if (R.get_amount() < 2)
user << "<span class='warning'>You need two rods to make a reinforced floor.</span>"
return
else
user << "<span class='notice'>Reinforcing the floor...</span>"
if(do_after(user, 30))
if (R.get_amount() >= 2)
ChangeTurf(/turf/simulated/floor/engine)
playsound(src, 'sound/items/Deconstruct.ogg', 80, 1)
R.use(2)
user << "<span class='notice'>You have reinforced the floor.</span>"
return
else if(istype(C, /obj/item/stack/tile))
if(!broken && !burnt)
var/obj/item/stack/tile/W = C
var/turf/simulated/floor/T = make_floor(W.turf_type)
if(istype(W,/obj/item/stack/tile/light))
var/obj/item/stack/tile/light/L = W
var/turf/simulated/floor/light/F = T
F.state = L.state
W.use(1)
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
else
user << "<span class='notice'>This section is too damaged to support a tile. Use a welder to fix the damage.</span>"
else if(istype(C, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/coil = C
for(var/obj/structure/cable/LC in src)
if((LC.d1==0)||(LC.d2==0))
LC.attackby(C,user)
return
coil.turf_place(src, user)
else if(istype(C, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/welder = C
if( welder.isOn() && (broken || burnt) )
if(welder.remove_fuel(0,user))
user << "<span class='danger'>You fix some dents on the broken plating.</span>"
playsound(src, 'sound/items/Welder.ogg', 80, 1)
icon_state = icon_plating
burnt = 0
broken = 0
/turf/simulated/floor/plating/airless
icon_state = "plating"
name = "airless plating"
oxygen = 0.01
nitrogen = 0.01
temperature = TCMB
/turf/simulated/floor/plating/airless/New()
..()
name = "plating"
/turf/simulated/floor/engine
name = "reinforced floor"
icon_state = "engine"
thermal_conductivity = 0.025
heat_capacity = 325000
/turf/simulated/floor/engine/break_tile()
return //unbreakable
/turf/simulated/floor/engine/burn_tile()
return //unburnable
/turf/simulated/floor/engine/make_plating()
return //unplateable
/turf/simulated/floor/engine/attackby(obj/item/weapon/C as obj, mob/user as mob)
if(!C || !user)
return
if(istype(C, /obj/item/weapon/wrench))
user << "<span class='notice'>Removing rods...</span>"
playsound(src, 'sound/items/Ratchet.ogg', 80, 1)
if(do_after(user, 30))
new /obj/item/stack/rods(src, 2)
make_plating()
return
/turf/simulated/floor/engine/cult
name = "engraved floor"
icon_state = "cult"
/turf/simulated/floor/engine/n20/New()
..()
var/datum/gas_mixture/adding = new
var/datum/gas/sleeping_agent/trace_gas = new
trace_gas.moles = 6000
adding.trace_gases += trace_gas
adding.temperature = T20C
assume_air(adding)
/turf/simulated/floor/engine/vacuum
name = "vacuum floor"
icon_state = "engine"
oxygen = 0
nitrogen = 0.001
temperature = TCMB
/turf/simulated/floor/airless
icon_state = "floor"
name = "airless floor"
oxygen = 0.01
nitrogen = 0.01
temperature = TCMB
/turf/simulated/floor/airless/New()
..()
name = "floor"
@@ -1,53 +0,0 @@
/turf/simulated/floor/mineral
name = "mineral floor"
icon_state = ""
var/last_event = 0
var/active = null
/turf/simulated/floor/mineral/plasma
name = "plasma floor"
icon_state = "plasma"
mineral = "plasma"
floortype = "plasma"
floor_tile = new/obj/item/stack/tile/mineral/plasma
/turf/simulated/floor/mineral/gold
name = "gold floor"
icon_state = "gold"
mineral = "gold"
floortype = "gold"
floor_tile = new/obj/item/stack/tile/mineral/gold
/turf/simulated/floor/mineral/silver
name = "silver floor"
icon_state = "silver"
mineral = "silver"
floortype = "silver"
floor_tile = new/obj/item/stack/tile/mineral/silver
/turf/simulated/floor/mineral/bananium
name = "bananium floor"
icon_state = "bananium"
mineral = "clown"
floortype = "clown"
floor_tile = new/obj/item/stack/tile/mineral/bananium
/turf/simulated/floor/mineral/bananium/airless
oxygen = 0.01
nitrogen = 0.01
temperature = TCMB
/turf/simulated/floor/mineral/diamond
name = "diamond floor"
icon_state = "diamond"
mineral = "diamond"
floortype = "diamond"
floor_tile = new/obj/item/stack/tile/mineral/diamond
/turf/simulated/floor/mineral/uranium
name = "uranium floor"
icon_state = "uranium"
mineral = "uranium"
floortype = "uranium"
floor_tile = new/obj/item/stack/tile/mineral/uranium
-208
View File
@@ -1,208 +0,0 @@
/turf/simulated/floor/airless
icon_state = "floor"
name = "airless floor"
oxygen = 0.01
nitrogen = 0.01
temperature = TCMB
/turf/simulated/floor/airless/New()
..()
name = "floor"
/turf/simulated/floor/light
name = "Light floor"
luminosity = 5
icon_state = "light_on"
floor_tile = new/obj/item/stack/tile/light
/turf/simulated/floor/light/New()
floor_tile.New() //I guess New() isn't run on objects spawned without the definition of a turf to house them, ah well.
var/n = name //just in case commands rename it in the ..() call
..()
spawn(4)
if(src)
update_icon()
name = n
/turf/simulated/floor/wood
name = "floor"
icon_state = "wood"
floor_tile = new/obj/item/stack/tile/wood
/turf/simulated/floor/goonplaque
name = "Commemorative Plaque"
icon_state = "plaque"
desc = "\"This is a plaque in honour of our comrades on the G4407 Stations. Hopefully TG4407 model can live up to your fame and fortune.\" Scratched in beneath that is a crude image of a meteor and a spaceman. The spaceman is laughing. The meteor is exploding."
/turf/simulated/floor/vault
icon_state = "rockvault"
/turf/simulated/wall/vault
icon_state = "rockvault"
/turf/simulated/floor/engine
name = "reinforced floor"
icon_state = "engine"
thermal_conductivity = 0.025
heat_capacity = 325000
/turf/simulated/floor/engine/attackby(obj/item/weapon/C as obj, mob/user as mob)
if(!C)
return
if(!user)
return
if(istype(C, /obj/item/weapon/wrench))
user << "<span class='notice'>Removing rods...</span>"
playsound(src, 'sound/items/Ratchet.ogg', 80, 1)
if(do_after(user, 30))
new /obj/item/stack/rods(src, 2)
ChangeTurf(/turf/simulated/floor)
var/turf/simulated/floor/F = src
F.make_plating()
return
/turf/simulated/floor/engine/cult
name = "engraved floor"
icon_state = "cult"
/turf/simulated/floor/engine/n20/New()
..()
var/datum/gas_mixture/adding = new
var/datum/gas/sleeping_agent/trace_gas = new
trace_gas.moles = 6000
adding.trace_gases += trace_gas
adding.temperature = T20C
assume_air(adding)
/turf/simulated/floor/engine/vacuum
name = "vacuum floor"
icon_state = "engine"
oxygen = 0
nitrogen = 0.001
temperature = TCMB
/turf/simulated/floor/plating
name = "plating"
icon_state = "plating"
floor_tile = null
intact = 0
/turf/simulated/floor/plating/airless
icon_state = "plating"
name = "airless plating"
oxygen = 0.01
nitrogen = 0.01
temperature = TCMB
/turf/simulated/floor/plating/airless/New()
..()
name = "plating"
/turf/simulated/floor/bluegrid
icon = 'icons/turf/floors.dmi'
icon_state = "bcircuit"
/turf/simulated/floor/greengrid
icon = 'icons/turf/floors.dmi'
icon_state = "gcircuit"
/turf/simulated/shuttle
name = "shuttle"
icon = 'icons/turf/shuttle.dmi'
thermal_conductivity = 0.05
heat_capacity = 0
layer = 2
/turf/simulated/shuttle/wall
name = "wall"
icon_state = "wall1"
opacity = 1
density = 1
blocks_air = 1
/turf/simulated/shuttle/floor
name = "floor"
icon_state = "floor"
/turf/simulated/shuttle/plating
name = "plating"
icon = 'icons/turf/floors.dmi'
icon_state = "plating"
/turf/simulated/shuttle/floor4 // Added this floor tile so that I have a seperate turf to check in the shuttle -- Polymorph
name = "Brig floor" // Also added it into the 2x3 brig area of the shuttle.
icon_state = "floor4"
/turf/simulated/floor/beach
name = "Beach"
icon = 'icons/misc/beach.dmi'
/turf/simulated/floor/beach/sand
name = "Sand"
icon_state = "sand"
/turf/simulated/floor/beach/coastline
name = "Coastline"
icon = 'icons/misc/beach2.dmi'
icon_state = "sandwater"
/turf/simulated/floor/beach/water
name = "Water"
icon_state = "water"
/turf/simulated/floor/grass
name = "Grass patch"
icon_state = "grass1"
floor_tile = new/obj/item/stack/tile/grass
/turf/simulated/floor/grass/New()
floor_tile.New() //I guess New() isn't ran on objects spawned without the definition of a turf to house them, ah well.
icon_state = "grass[pick("1","2","3","4")]"
..()
spawn(4)
if(src)
update_icon()
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding get updated properly
/turf/simulated/floor/carpet
name = "Carpet"
icon_state = "carpet"
floor_tile = new/obj/item/stack/tile/carpet
/turf/simulated/floor/carpet/New()
floor_tile.New() //I guess New() isn't ran on objects spawned without the definition of a turf to house them, ah well.
if(!icon_state)
icon_state = "carpet"
..()
spawn(4)
if(src)
update_icon()
for(var/direction in list(1,2,4,8,5,6,9,10))
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding get updated properly
/turf/simulated/floor/plating/ironsand/New()
..()
name = "Iron Sand"
icon_state = "ironsand[rand(1,15)]"
/turf/simulated/floor/plating/snow
name = "snow"
icon = 'icons/turf/snow.dmi'
icon_state = "snow"
/turf/simulated/floor/plating/snow/ex_act(severity)
return
+2 -2
View File
@@ -41,7 +41,7 @@
qdel(L)
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
user << "<span class='notice'>You build a floor.</span>"
S.build(src)
ChangeTurf(/turf/simulated/floor)
else
user << "<span class='warning'>You need one floor tile to build a floor.</span>"
else
@@ -209,4 +209,4 @@ proc/setup_map_transitions() //listamania
S.Assign_Destination()
/turf/space/singularity_act()
return
return
+1 -26
View File
@@ -2,7 +2,6 @@
icon = 'icons/turf/floors.dmi'
level = 1.0
//for floors, use is_plating(), is_plasteel_floor() and is_light_floor()
var/intact = 1
//Properties for open tiles (/floor)
@@ -94,32 +93,8 @@
loopsanity--
A.HasProximity(M, 1)
/turf/proc/is_plating()
return 0
/turf/proc/is_asteroid_floor()
return 0
/turf/proc/is_plasteel_floor()
return 0
/turf/proc/is_light_floor()
return 0
/turf/proc/is_grass_floor()
return 0
/turf/proc/is_wood_floor()
return 0
/turf/proc/is_gold_floor()
return 0
/turf/proc/is_silver_floor()
return 0
/turf/proc/is_plasma_floor()
return 0
/turf/proc/is_uranium_floor()
return 0
/turf/proc/is_bananium_floor()
return 0
/turf/proc/is_diamond_floor()
return 0
/turf/proc/is_carpet_floor()
return 0
/turf/proc/return_siding_icon_state() //used for grass floors, which have siding.
return 0
@@ -356,4 +331,4 @@
if(O.invisibility == 101)
O.singularity_act()
ChangeTurf(/turf/space)
return(2)
return(2)
+2 -2
View File
@@ -623,7 +623,7 @@ spideros = text2num(return_to)//Maximum length here is 6. Use (return_to, X) to
var/mob/living/carbon/human/U = loc
if(candrain&&!draining)
var/turf/T = U.loc
if(isturf(T) && T.is_plating())
if(isturf(T) && istype(T, /turf/simulated/floor/plating)
attached = locate() in T
if(!attached)
U << "\red Warning: no exposed cable available."
@@ -2747,4 +2747,4 @@ proc/create_ninja_mind(key)
Mind.assigned_role = "MODE"
Mind.special_role = "Space Ninja"
ticker.mode.traitors |= Mind //Adds them to current traitor list. Which is really the extra antagonist list.
return Mind
return Mind
+3
View File
@@ -490,6 +490,9 @@
// spawn(2)
//O updateMineralOverlays()
/turf/simulated/floor/plating/asteroid/burn_tile()
return
/turf/simulated/floor/plating/asteroid/ex_act(severity)
switch(severity)
if(3.0)
+4 -6
View File
@@ -692,12 +692,10 @@
var/turf/target
if(istype(T, /turf/simulated/floor)) //intact floor, pop the tile
var/turf/simulated/floor/F = T
if(F.floor_tile)
F.floor_tile.loc = H //It took me a day to figure out this was the right way to do it.
F.floor_tile = null //So it doesn't get deleted in make_plating()
F.make_plating()
if(istype(T, /turf/simulated/floor) && !istype(T, /turf/simulated/floor/plating)) //intact floor, pop the tile
var/turf/simulated/floor/myturf = T
new myturf.floor_tile(T)
myturf.make_plating()
if(direction) // direction is specified
if(istype(T, /turf/space)) // if ended in space, then range is unlimited
+5 -2
View File
@@ -689,12 +689,15 @@
#include "code\game\turfs\unsimulated.dm"
#include "code\game\turfs\simulated\dirtystation.dm"
#include "code\game\turfs\simulated\floor.dm"
#include "code\game\turfs\simulated\floor_mineral.dm"
#include "code\game\turfs\simulated\floor_types.dm"
#include "code\game\turfs\simulated\walls.dm"
#include "code\game\turfs\simulated\walls_mineral.dm"
#include "code\game\turfs\simulated\walls_misc.dm"
#include "code\game\turfs\simulated\walls_reinforced.dm"
#include "code\game\turfs\simulated\floor\fancy_floor.dm"
#include "code\game\turfs\simulated\floor\light_floor.dm"
#include "code\game\turfs\simulated\floor\mineral_floor.dm"
#include "code\game\turfs\simulated\floor\misc_floor.dm"
#include "code\game\turfs\simulated\floor\plating.dm"
#include "code\game\turfs\space\space.dm"
#include "code\game\turfs\space\transit.dm"
#include "code\game\turfs\unsimulated\beach.dm"