mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Light floor added
For non-coders: - Added floor lights - To build: Use wire on glass, use metal on the assembly you get, use it on a plating. To fix flickering or broken tiles, use a lightbulb on them. - To deconstruct: Crowbar on floor to remove it, crowbar on light tile to remove metal, wirecutters to separate the wire from the glass. - Click on tile with an empty hand to turn it on/off For coders: - The turf system has been rewritten to contain a tile variable which defines what kind of turf it is. The 'intact' var can no longer be used to determine if the turf is a steel floor. Intact only tells if wires and pipes are to be hidden (for hide() procs) - Use is_plating(), is_steel_floor() and is_light_floor() to determine the floor type. - Use make_plating(), make_steel_floor() and make_light_floor() to do this. They take the floor tile by default as a parameter, if none is given they will make one themselves. Credits for the sprites go to Hempuli, used with permission. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1513 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -960,7 +960,7 @@ NINJA MASK
|
||||
var/mob/living/carbon/human/U = usr
|
||||
if(candrain&&!draining)
|
||||
var/turf/T = U.loc
|
||||
if(isturf(T) && !T.intact)
|
||||
if(isturf(T) && T.is_plating())
|
||||
attached = locate() in T
|
||||
if(!attached)
|
||||
U << "\red Warning: no exposed cable available."
|
||||
|
||||
@@ -78,7 +78,21 @@ SHARDS
|
||||
|
||||
/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user)
|
||||
..()
|
||||
if( istype(W, /obj/item/stack/rods) )
|
||||
if(istype(W,/obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/CC = W
|
||||
if(CC.amount < 5)
|
||||
user << "\b There is not enough wire in this coil. You need 5 lengths."
|
||||
CC.amount -= 5
|
||||
amount -= 1
|
||||
user << "\blue You attack wire to the [name]."
|
||||
new/obj/item/stack/light_w(user.loc)
|
||||
if(CC.amount <= 0)
|
||||
user.u_equip(CC)
|
||||
del(CC)
|
||||
if(src.amount <= 0)
|
||||
user.u_equip(src)
|
||||
del(src)
|
||||
else if( istype(W, /obj/item/stack/rods) )
|
||||
var/obj/item/stack/rods/V = W
|
||||
var/obj/item/stack/sheet/rglass/RG = new (user.loc)
|
||||
RG.add_fingerprint(user)
|
||||
|
||||
@@ -66,7 +66,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||
null, \
|
||||
new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 2, one_per_turf = 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("floor tile", /obj/item/stack/tile, 1, 4, 10), \
|
||||
new/datum/stack_recipe("floor tile", /obj/item/stack/tile/steel, 1, 4, 10), \
|
||||
new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60), \
|
||||
new/datum/stack_recipe("reinforced sheet", /obj/item/stack/sheet/r_metal, 2, 1, 50), \
|
||||
null, \
|
||||
@@ -102,13 +102,13 @@ var/global/list/datum/stack_recipe/r_metal_recipes = list ( \
|
||||
|
||||
// TILES
|
||||
|
||||
/obj/item/stack/tile/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/tile/steel/New(var/loc, var/amount=null)
|
||||
..()
|
||||
src.pixel_x = rand(1, 14)
|
||||
src.pixel_y = rand(1, 14)
|
||||
return
|
||||
|
||||
/obj/item/stack/tile/attack_self(mob/user as mob)
|
||||
/obj/item/stack/tile/steel/attack_self(mob/user as mob)
|
||||
if (usr.stat)
|
||||
return
|
||||
var/T = user.loc
|
||||
@@ -123,7 +123,7 @@ var/global/list/datum/stack_recipe/r_metal_recipes = list ( \
|
||||
use(1)
|
||||
return
|
||||
|
||||
/obj/item/stack/tile/proc/build(turf/S as turf)
|
||||
/obj/item/stack/tile/steel/proc/build(turf/S as turf)
|
||||
var/turf/simulated/floor/W = S.ReplaceWithFloor()
|
||||
W.to_plating()
|
||||
W.make_plating()
|
||||
return
|
||||
Reference in New Issue
Block a user