Finalized wall refactor.

This commit is contained in:
Zuhayr
2015-04-22 23:19:31 +09:30
parent dbf8e53020
commit 79e3acc95e
48 changed files with 2017 additions and 2698 deletions

View File

@@ -214,7 +214,6 @@
#include "code\game\response_team.dm"
#include "code\game\shuttle_engines.dm"
#include "code\game\skincmd.dm"
#include "code\game\smoothwall.dm"
#include "code\game\sound.dm"
#include "code\game\supplyshuttle.dm"
#include "code\game\antagonist\antagonist.dm"
@@ -372,6 +371,7 @@
#include "code\game\machinery\turret_control.dm"
#include "code\game\machinery\turrets.dm"
#include "code\game\machinery\vending.dm"
#include "code\game\machinery\wall_frames.dm"
#include "code\game\machinery\washing_machine.dm"
#include "code\game\machinery\wishgranter.dm"
#include "code\game\machinery\atmoalter\area_atmos_computer.dm"
@@ -710,7 +710,6 @@
#include "code\game\objects\structures\door_assembly.dm"
#include "code\game\objects\structures\electricchair.dm"
#include "code\game\objects\structures\extinguisher.dm"
#include "code\game\objects\structures\false_walls.dm"
#include "code\game\objects\structures\flora.dm"
#include "code\game\objects\structures\girders.dm"
#include "code\game\objects\structures\grille.dm"
@@ -774,10 +773,10 @@
#include "code\game\turfs\unsimulated.dm"
#include "code\game\turfs\simulated\floor.dm"
#include "code\game\turfs\simulated\floor_types.dm"
#include "code\game\turfs\simulated\wall_attacks.dm"
#include "code\game\turfs\simulated\wall_icon.dm"
#include "code\game\turfs\simulated\wall_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\space\space.dm"
#include "code\game\turfs\space\transit.dm"
#include "code\game\turfs\unsimulated\beach.dm"
@@ -1035,6 +1034,7 @@
#include "code\modules\maps\reader.dm"
#include "code\modules\maps\swapmaps.dm"
#include "code\modules\maps\writer.dm"
#include "code\modules\materials\materials.dm"
#include "code\modules\mining\abandonedcrates.dm"
#include "code\modules\mining\alloys.dm"
#include "code\modules\mining\coins.dm"
@@ -1045,7 +1045,6 @@
#include "code\modules\mining\mine_items.dm"
#include "code\modules\mining\mine_turfs.dm"
#include "code\modules\mining\mineral_effect.dm"
#include "code\modules\mining\minerals.dm"
#include "code\modules\mining\mint.dm"
#include "code\modules\mining\money_bag.dm"
#include "code\modules\mining\ore.dm"

View File

@@ -838,8 +838,7 @@
else if(istype(W, /obj/item/weapon/wrench))
user << "You remove the fire alarm assembly from the wall!"
var/obj/item/alarm_frame/frame = new /obj/item/alarm_frame()
frame.loc = user.loc
new /obj/item/frame/air_alarm(get_turf(user))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
del(src)
@@ -868,50 +867,6 @@ Just a object used in constructing air alarms
w_class = 2.0
matter = list("steel" = 50, "glass" = 50)
/*
AIR ALARM ITEM
Handheld air alarm frame, for placing on walls
Code shamelessly copied from apc_frame
*/
/obj/item/alarm_frame
name = "air alarm frame"
desc = "Used for building Air Alarms"
icon = 'icons/obj/monitors.dmi'
icon_state = "alarm_bitem"
flags = CONDUCT
/obj/item/alarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
del(src)
return
..()
/obj/item/alarm_frame/proc/try_build(turf/on_wall)
if (get_dist(on_wall,usr)>1)
return
var/ndir = get_dir(on_wall,usr)
if (!(ndir in cardinal))
return
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red Air Alarm cannot be placed on this spot."
return
if (A.requires_power == 0 || A.name == "Space")
usr << "\red Air Alarm cannot be placed in this area."
return
if(gotwallitem(loc, ndir))
usr << "\red There's already an item on this wall!"
return
new /obj/machinery/alarm(loc, ndir, 1)
del(src)
/*
FIRE ALARM
*/
@@ -1021,8 +976,7 @@ FIRE ALARM
else if(istype(W, /obj/item/weapon/wrench))
user << "You remove the fire alarm assembly from the wall!"
var/obj/item/firealarm_frame/frame = new /obj/item/firealarm_frame()
frame.loc = user.loc
new /obj/item/frame/fire_alarm(get_turf(user))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
del(src)
return
@@ -1190,52 +1144,6 @@ Just a object used in constructing fire alarms
w_class = 2.0
matter = list("steel" = 50, "glass" = 50)
/*
FIRE ALARM ITEM
Handheld fire alarm frame, for placing on walls
Code shamelessly copied from apc_frame
*/
/obj/item/firealarm_frame
name = "fire alarm frame"
desc = "Used for building Fire Alarms"
icon = 'icons/obj/monitors.dmi'
icon_state = "fire_bitem"
flags = CONDUCT
/obj/item/firealarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
del(src)
return
..()
/obj/item/firealarm_frame/proc/try_build(turf/on_wall)
if (get_dist(on_wall,usr)>1)
return
var/ndir = get_dir(on_wall,usr)
if (!(ndir in cardinal))
return
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red Fire Alarm cannot be placed on this spot."
return
if (A.requires_power == 0 || A.name == "Space")
usr << "\red Fire Alarm cannot be placed in this area."
return
if(gotwallitem(loc, ndir))
usr << "\red There's already an item on this wall!"
return
new /obj/machinery/firealarm(loc, ndir, 1)
del(src)
/obj/machinery/partyalarm
name = "\improper PARTY BUTTON"
desc = "Cuban Pete is in the house!"

View File

@@ -287,7 +287,7 @@
/obj/machinery/autolathe/dismantle()
for(var/mat in stored_material)
var/material/M = name_to_mineral[mat]
var/material/M = name_to_material[mat]
if(!istype(M))
continue
var/obj/item/stack/sheet/S = new M.stack_type(get_turf(src))

View File

@@ -261,11 +261,7 @@
for(var/turf/simulated/floor/target_tile in range(2,loc))
target_tile.assume_gas("phoron", 35, 400+T0C)
spawn (0) target_tile.hotspot_expose(temperature, 400)
for(var/obj/structure/falsewall/phoron/F in range(3,src))//Hackish as fuck, but until temperature_expose works, there is nothing I can do -Sieve
var/turf/T = get_turf(F)
T.ChangeTurf(/turf/simulated/wall/mineral/phoron/)
del (F)
for(var/turf/simulated/wall/mineral/phoron/W in range(3,src))
for(var/turf/simulated/wall/W in range(3,src))
W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame
for(var/obj/machinery/door/airlock/phoron/D in range(3,src))
D.ignite(temperature/4)

View File

@@ -0,0 +1,83 @@
/obj/item/frame
name = "frame"
desc = "Used for building machines."
icon = 'icons/obj/monitors.dmi'
icon_state = "fire_bitem"
flags = CONDUCT
var/build_machine_type
var/refund_amt = 2
var/refund_type = /obj/item/stack/sheet/metal
/obj/item/frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new refund_type( get_turf(src.loc), refund_amt)
del(src)
return
..()
/obj/item/frame/proc/try_build(turf/on_wall)
if(!build_machine_type)
return
if (get_dist(on_wall,usr)>1)
return
var/ndir = get_dir(on_wall,usr)
if (!(ndir in cardinal))
return
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "<span class='danger>\The [src] Alarm cannot be placed on this spot.</span>"
return
if (A.requires_power == 0 || A.name == "Space")
usr << "<span class='danger>\The [src] Alarm cannot be placed in this area.</span>"
return
if(gotwallitem(loc, ndir))
usr << "<span class='danger>There's already an item on this wall!</span>"
return
var/obj/machinery/M = new build_machine_type(loc, ndir, 1)
M.fingerprints = src.fingerprints
M.fingerprintshidden = src.fingerprintshidden
M.fingerprintslast = src.fingerprintslast
del(src)
/obj/item/frame/fire_alarm
name = "fire alarm frame"
desc = "Used for building fire alarms."
build_machine_type = /obj/machinery/firealarm
/obj/item/frame/air_alarm
name = "air alarm frame"
desc = "Used for building air alarms."
build_machine_type = /obj/machinery/alarm
/obj/item/frame/light
name = "light fixture frame"
desc = "Used for building lights."
icon = 'icons/obj/lighting.dmi'
icon_state = "tube-construct-item"
build_machine_type = /obj/machinery/light_construct
/obj/item/frame/light/small
name = "small light fixture frame"
icon_state = "bulb-construct-item"
refund_amt = 1
build_machine_type = /obj/machinery/light_construct/small
/obj/item/frame/rust
name = "Fuel Compressor frame"
icon = 'icons/rust.dmi'
icon_state = "fuel_compressor0"
w_class = 4
refund_type = /obj/item/stack/sheet/plasteel
refund_amt = 12
build_machine_type = /obj/machinery/rust_fuel_compressor
/obj/item/frame/rust/assembly
name = "Fuel Assembly Port frame"
icon_state = "port2"
build_machine_type = /obj/machinery/rust_fuel_assembly_port

View File

@@ -89,8 +89,13 @@
var/C = target.loc //why are these backwards? we may never know -Pete
if(do_after_cooldown(target))
if(T == chassis.loc && src == chassis.selected)
if(istype(target, /turf/simulated/wall/r_wall))
occupant_message("<span class='warning'>[target] is too durable to drill through.</span>")
if(istype(target, /turf/simulated/wall))
var/turf/simulated/wall/W = target
if(W.reinf_material)
occupant_message("<span class='warning'>[target] is too durable to drill through.</span>")
else
log_message("Drilled through [target]")
target.ex_act(2)
else if(istype(target, /turf/simulated/mineral))
for(var/turf/simulated/mineral/M in range(chassis,1))
if(get_dir(chassis,M)&chassis.dir)
@@ -140,8 +145,9 @@
var/C = target.loc //why are these backwards? we may never know -Pete
if(do_after_cooldown(target))
if(T == chassis.loc && src == chassis.selected)
if(istype(target, /turf/simulated/wall/r_wall))
if(do_after_cooldown(target))//To slow down how fast mechs can drill through the station
if(istype(target, /turf/simulated/wall))
var/turf/simulated/wall/W = target
if(!W.reinf_material || do_after_cooldown(target))//To slow down how fast mechs can drill through the station
log_message("Drilled through [target]")
target.ex_act(3)
else if(istype(target, /turf/simulated/mineral))

View File

@@ -42,3 +42,17 @@
icon = 'icons/turf/space.dmi'
icon_state = "bluespacify"
layer = LIGHTING_LAYER
/obj/effect/overlay/wallrot
name = "wallrot"
desc = "Ick..."
icon = 'icons/effects/wallrot.dmi'
anchored = 1
density = 1
layer = 5
mouse_opacity = 0
/obj/effect/overlay/wallrot/New()
..()
pixel_x += rand(-10, 10)
pixel_y += rand(-10, 10)

View File

@@ -88,9 +88,6 @@ proc/explosion_rec(turf/epicenter, power)
/turf/simulated/wall
explosion_resistance = 5
/turf/simulated/wall/r_wall
explosion_resistance = 25
//Code-wise, a safe value for power is something up to ~25 or ~30.. This does quite a bit of damage to the station.
//direction is the direction that the spread took to come to this tile. So it is pointing in the main blast direction - meaning where this tile should spread most of it's force.
/turf/proc/explosion_spread(power, direction)

View File

@@ -207,10 +207,6 @@ move an amendment</a> to the drawing.</p>
return BORDER_BETWEEN
if (locate(/obj/machinery/door) in T2)
return BORDER_2NDTILE
if (locate(/obj/structure/falsewall) in T2)
return BORDER_2NDTILE
if (locate(/obj/structure/falserwall) in T2)
return BORDER_2NDTILE
return BORDER_NONE

View File

@@ -63,10 +63,6 @@ var/global/list/datum/stack_recipe/iron_recipes = list ( \
w_class = 3.0
throw_speed = 3
throw_range = 3
var/walltype_solid
var/walltype_false
var/doortype_solid
var/doortype_machine
/obj/item/stack/sheet/mineral/New()
..()

View File

@@ -69,12 +69,12 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
), 4), \
null, \
new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \
new/datum/stack_recipe("light fixture frame", /obj/item/light_fixture_frame, 2), \
new/datum/stack_recipe("small light fixture frame", /obj/item/light_fixture_frame/small, 1), \
new/datum/stack_recipe("light fixture frame", /obj/item/frame/light, 2), \
new/datum/stack_recipe("small light fixture frame", /obj/item/frame/light/small, 1), \
null, \
new/datum/stack_recipe("apc frame", /obj/item/apc_frame, 2), \
new/datum/stack_recipe("air alarm frame", /obj/item/alarm_frame, 2), \
new/datum/stack_recipe("fire alarm frame", /obj/item/firealarm_frame, 2), \
new/datum/stack_recipe("air alarm frame", /obj/item/frame/air_alarm, 2), \
new/datum/stack_recipe("fire alarm frame", /obj/item/frame/fire_alarm, 2), \
null, \
new/datum/stack_recipe("knife blade", /obj/item/butterflyblade, 6, time = 20, one_per_turf = 0, on_floor = 1) \
)
@@ -88,6 +88,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
throwforce = 14.0
flags = CONDUCT
origin_tech = "materials=1"
sheettype = "steel"
/obj/item/stack/sheet/metal/cyborg
name = "steel synthesizer"
@@ -109,21 +110,22 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("RUST fuel assembly port frame", /obj/item/rust_fuel_assembly_port_frame, 12, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("RUST fuel compressor frame", /obj/item/rust_fuel_compressor_frame, 12, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("RUST fuel assembly port frame", /obj/item/frame/rust/assembly, 12, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("RUST fuel compressor frame", /obj/item/frame/rust, 12, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("knife grip", /obj/item/butterflyhandle, 4, time = 20, one_per_turf = 0, on_floor = 1),
)
/obj/item/stack/sheet/plasteel
name = "plasteel"
singular_name = "plasteel sheet"
desc = "This sheet is an alloy of iron and phoron."
desc = "This sheet is an alloy of iron and platinum."
icon_state = "sheet-plasteel"
item_state = "sheet-metal"
matter = list("steel" = 7500)
throwforce = 15.0
flags = CONDUCT
origin_tech = "materials=2"
sheettype = "plasteel"
/obj/item/stack/sheet/plasteel/cyborg
name = "plasteel synthesizer"

View File

@@ -100,9 +100,10 @@
build_type = "floor"
build_turf = /turf/simulated/floor/plating/airless
else if(deconstruct && istype(T,/turf/simulated/wall))
var/turf/simulated/wall/W = T
build_delay = deconstruct ? 50 : 40
build_cost = 5
build_type = (!canRwall && istype(T,/turf/simulated/wall/r_wall)) ? null : "wall"
build_type = (!canRwall && W.reinf_material) ? null : "wall"
build_turf = /turf/simulated/floor
else if(istype(T,/turf/simulated/floor))
build_delay = deconstruct ? 50 : 20

View File

@@ -106,7 +106,6 @@ var/list/tape_roll_applications = list()
var/obj/item/tape/P = new tape_type(cur)
P.icon_state = "[P.icon_base]_[dir]"
cur = get_step_towards(cur,end)
//is_blocked_turf(var/turf/T)
usr << "\blue You finish placing the [src]." //Git Test
/obj/item/taperoll/afterattack(var/atom/A, mob/user as mob, proximity)

View File

@@ -1,313 +0,0 @@
/*
* False Walls
*/
/obj/structure/falsewall
name = "wall"
desc = "A huge chunk of metal used to seperate rooms."
anchored = 1
icon = 'icons/turf/walls.dmi'
var/mineral = "steel"
var/opening = 0
/obj/structure/falsewall/New()
relativewall_neighbours()
..()
/obj/structure/falsewall/Del()
var/temploc = src.loc
spawn(10)
for(var/turf/simulated/wall/W in range(temploc,1))
W.relativewall()
for(var/obj/structure/falsewall/W in range(temploc,1))
W.relativewall()
for(var/obj/structure/falserwall/W in range(temploc,1))
W.relativewall()
..()
/obj/structure/falsewall/relativewall()
if(!density)
icon_state = "[mineral]fwall_open"
return
var/junction = 0 //will be used to determine from which side the wall is connected to other walls
for(var/turf/simulated/wall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.mineral == W.mineral)//Only 'like' walls connect -Sieve
junction |= get_dir(src,W)
for(var/obj/structure/falsewall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.mineral == W.mineral)
junction |= get_dir(src,W)
for(var/obj/structure/falserwall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.mineral == W.mineral)
junction |= get_dir(src,W)
icon_state = "[mineral][junction]"
return
/obj/structure/falsewall/attack_hand(mob/user as mob)
if(opening)
return
if(density)
opening = 1
icon_state = "[mineral]fwall_open"
flick("[mineral]fwall_opening", src)
sleep(15)
src.density = 0
SetOpacity(0)
opening = 0
else
opening = 1
flick("[mineral]fwall_closing", src)
icon_state = "[mineral]0"
density = 1
sleep(15)
SetOpacity(1)
src.relativewall()
opening = 0
/obj/structure/falsewall/update_icon()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
..()
if(density)
icon_state = "[mineral]0"
src.relativewall()
else
icon_state = "[mineral]fwall_open"
/obj/structure/falsewall/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(opening)
user << "\red You must wait until the door has stopped moving."
return
var/material/M = name_to_mineral[mineral]
if(istype(W, /obj/item/weapon/screwdriver))
if(!istype(M) || !M.walltype_solid)
user << "You cannot find any bolts on the wall."
return
user.visible_message("[user] tightens some bolts on the wall.", "You tighten the bolts on the wall.")
var/turf/T = get_turf(src)
if(T)
T.ChangeTurf(M.walltype_solid)
del(src)
return
var/cutting
if(istype(W, /obj/item/weapon/melee/energy/blade) || istype(W, /obj/item/weapon/pickaxe))
cutting = 1
else if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.welding)
cutting = 1
if(cutting)
if(density)
var/turf/T = get_turf(src)
if(T.density)
user << "\red The wall is blocked!"
return
if(!istype(M) || !M.walltype_solid)
user << "You cannot weld this wall."
return
T.ChangeTurf(M.walltype_solid)
if(mineral != "phoron")//Stupid shit keeps me from pushing the attackby() to phoron walls -Sieve
T = get_turf(src) // Still not sure what the above is for, leaving it for now. ~Z
T.attackby(W,user)
del(src)
else
user << "\blue You can't reach, close it first!"
/obj/structure/falsewall/update_icon()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
..()
if(density)
icon_state = "[mineral]0"
src.relativewall()
else
icon_state = "[mineral]fwall_open"
/*
* False R-Walls
*/
/obj/structure/falserwall
name = "reinforced wall"
desc = "A huge chunk of reinforced metal used to seperate rooms."
icon = 'icons/turf/walls.dmi'
icon_state = "r_wall"
density = 1
opacity = 1
anchored = 1
var/mineral = "steel"
var/opening = 0
/obj/structure/falserwall/New()
relativewall_neighbours()
..()
/obj/structure/falserwall/attack_hand(mob/user as mob)
if(opening)
return
if(density)
opening = 1
// Open wall
icon_state = "frwall_open"
flick("frwall_opening", src)
sleep(15)
density = 0
SetOpacity(0)
opening = 0
else
opening = 1
icon_state = "r_wall"
flick("frwall_closing", src)
density = 1
sleep(15)
SetOpacity(1)
relativewall()
opening = 0
/obj/structure/falserwall/relativewall()
if(!density)
icon_state = "frwall_open"
return
var/junction = 0 //will be used to determine from which side the wall is connected to other walls
for(var/turf/simulated/wall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.mineral == W.mineral)//Only 'like' walls connect -Sieve
junction |= get_dir(src,W)
for(var/obj/structure/falsewall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.mineral == W.mineral)
junction |= get_dir(src,W)
for(var/obj/structure/falserwall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(src.mineral == W.mineral)
junction |= get_dir(src,W)
icon_state = "rwall[junction]"
return
/obj/structure/falserwall/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(opening)
user << "\red You must wait until the door has stopped moving."
return
if(istype(W, /obj/item/weapon/screwdriver))
var/turf/T = get_turf(src)
user.visible_message("[user] tightens some bolts on the r wall.", "You tighten the bolts on the wall.")
T.ChangeTurf(/turf/simulated/wall) //Intentionally makes a regular wall instead of an r-wall (no cheap r-walls for you).
del(src)
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/simulated/wall)
T = get_turf(src)
T.attackby(W,user)
del(src)
else if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/simulated/wall)
T = get_turf(src)
T.attackby(W,user)
del(src)
//DRILLING
else if (istype(W, /obj/item/weapon/pickaxe/diamonddrill))
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/simulated/wall)
T = get_turf(src)
T.attackby(W,user)
del(src)
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/simulated/wall)
T = get_turf(src)
T.attackby(W,user)
del(src)
/*
* Uranium Falsewalls
*/
/obj/structure/falsewall/uranium
name = "uranium wall"
desc = "A wall with uranium plating. This is probably a bad idea."
icon_state = ""
mineral = "uranium"
var/active = null
var/last_event = 0
/obj/structure/falsewall/uranium/attackby(obj/item/weapon/W as obj, mob/user as mob)
radiate()
..()
/obj/structure/falsewall/uranium/attack_hand(mob/user as mob)
radiate()
..()
/obj/structure/falsewall/uranium/proc/radiate()
if(!active)
if(world.time > last_event+15)
active = 1
for(var/mob/living/L in range(3,src))
L.apply_effect(12,IRRADIATE,0)
for(var/turf/simulated/wall/mineral/uranium/T in range(3,src))
T.radiate()
last_event = world.time
active = null
return
return
/*
* Other misc falsewall types
*/
/obj/structure/falsewall/gold
name = "gold wall"
desc = "A wall with gold plating. Swag!"
icon_state = ""
mineral = "gold"
/obj/structure/falsewall/silver
name = "silver wall"
desc = "A wall with silver plating. Shiny."
icon_state = ""
mineral = "silver"
/obj/structure/falsewall/diamond
name = "diamond wall"
desc = "A wall with diamond plating. You monster."
icon_state = ""
mineral = "diamond"
/obj/structure/falsewall/phoron
name = "phoron wall"
desc = "A wall with phoron plating. This is definately a bad idea."
icon_state = ""
mineral = "phoron"
/obj/structure/falsewall/sandstone
name = "sandstone wall"
desc = "A wall with sandstone plating."
icon_state = ""
mineral = "sandstone"

View File

@@ -2,10 +2,18 @@
icon_state = "girder"
anchored = 1
density = 1
layer = 2
layer = 4
var/state = 0
var/health = 200
var/cover = 50 //how much cover the girder provides against projectiles.
var/material/reinf_material
/obj/structure/girder/displaced
icon_state = "displaced"
anchored = 0
health = 50
cover = 25
/obj/structure/girder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker)
if(!damage || !wallbreaker)
@@ -30,136 +38,165 @@
health -= damage
..()
if(health <= 0)
new /obj/item/stack/sheet/metal(get_turf(src))
del(src)
dismantle()
return
/obj/structure/girder/proc/reset_girder()
cover = initial(cover)
health = min(health,initial(health))
state = 0
icon_state = initial(icon_state)
if(reinf_material)
reinforce_girder()
/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench) && state == 0)
if(anchored && !istype(src,/obj/structure/girder/displaced))
if(anchored && !reinf_material)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user << "\blue Now disassembling the girder"
user << "<span class='notice'>Now disassembling the girder...</span>"
if(do_after(user,40))
if(!src) return
user << "\blue You dissasembled the girder!"
user << "<span class='notice'>You dissasembled the girder!</span>"
dismantle()
else if(!anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user << "\blue Now securing the girder"
user << "<span class='notice'>Now securing the girder...</span>"
if(get_turf(user, 40))
user << "\blue You secured the girder!"
new/obj/structure/girder( src.loc )
del(src)
user << "<span class='notice'>You secured the girder!</span>"
reset_girder()
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
user << "\blue Now slicing apart the girder"
user << "<span class='notice'>Now slicing apart the girder...</span>"
if(do_after(user,30))
if(!src) return
user << "\blue You slice apart the girder!"
user << "<span class='notice'>You slice apart the girder!</span>"
dismantle()
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
user << "\blue You drill through the girder!"
user << "<span class='notice'>You drill through the girder!</span>"
dismantle()
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 && istype(src,/obj/structure/girder/reinforced))
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user << "\blue Now unsecuring support struts"
user << "<span class='notice'>Now unsecuring support struts...</span>"
if(do_after(user,40))
if(!src) return
user << "\blue You unsecured the support struts!"
user << "<span class='notice'>You unsecured the support struts!</span>"
state = 1
else if(istype(W, /obj/item/weapon/wirecutters) && istype(src,/obj/structure/girder/reinforced) && state == 1)
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
user << "\blue Now removing support struts"
user << "<span class='notice'>Now removing support struts...</span>"
if(do_after(user,40))
if(!src) return
user << "\blue You removed the support struts!"
new/obj/structure/girder( src.loc )
del(src)
user << "<span class='notice'>You removed the support struts!</span>"
reinf_material.place_dismantled_product(get_turf(src))
reinf_material = null
reset_girder()
else if(istype(W, /obj/item/weapon/crowbar) && state == 0 && anchored )
else if(istype(W, /obj/item/weapon/crowbar) && state == 0 && anchored)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user << "\blue Now dislodging the girder"
user << "<span class='notice'>Now dislodging the girder...</span>"
if(do_after(user, 40))
if(!src) return
user << "\blue You dislodged the girder!"
new/obj/structure/girder/displaced( src.loc )
del(src)
else if(istype(W, /obj/item/stack/sheet/plasteel))
var/obj/item/stack/sheet/S = W
if(!anchored)
if(S.use(2))
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falserwall (src.loc)
del(src)
else
if (src.icon_state == "reinforced") //I cant believe someone would actually write this line of code...
if(S.get_amount() < 1) return ..()
user << "<span class='notice'>Now finalising reinforced wall.</span>"
if(do_after(user, 50))
if (S.use(1))
user << "<span class='notice'>Wall fully reinforced!</span>"
var/turf/Tsrc = get_turf(src)
Tsrc.ChangeTurf(/turf/simulated/wall/r_wall)
for(var/turf/simulated/wall/r_wall/X in Tsrc.loc)
if(X) X.add_hiddenprint(usr)
del(src)
return
else
if(S.get_amount() < 1) return ..()
user << "<span class='notice'>Now reinforcing girders...</span>"
if (do_after(user,60))
if(S.use(1))
user << "<span class='notice'>Girders reinforced!</span>"
new/obj/structure/girder/reinforced( src.loc )
del(src)
return
user << "<span class='notice'>You dislodged the girder!</span>"
icon_state = "displaced"
anchored = 0
health = 50
cover = 25
else if(istype(W, /obj/item/stack/sheet))
var/obj/item/stack/sheet/S = W
var/material/M = name_to_mineral[S.sheettype]
if(S.get_amount() < 2)
return ..()
var/material/M = name_to_material[S.sheettype]
if(!istype(M))
return ..()
var/wall_fake
add_hiddenprint(usr)
if(!anchored)
if(!istype(M) || !M.walltype_false)
user << "<span class='notice'>You cannot make a false wall using this material.</span>"
return
if(S.use(2))
user << "<span class='notice'>You create a false wall! Push on it to open or close the passage.</span>"
new M.walltype_false (src.loc)
del(src)
else
if(!istype(M) || !M.walltype_solid)
user << "<span class='notice'>You cannot plate a wall in this material.</span>"
return
if(S.get_amount() < 2)
return ..()
user << "<span class='notice'>Now adding plating...</span>"
if (do_after(user,40))
if (S.use(2))
user << "<span class='notice'>You added the plating!</span>"
var/turf/Tsrc = get_turf(src)
Tsrc.ChangeTurf(M.walltype_solid)
for(var/turf/simulated/wall/X in Tsrc.loc)
if(X)
X.add_hiddenprint(usr)
del(src)
if(M.integrity < 50)
user << "<span class='notice'>This material is too soft for use in wall construction.</span>"
return
user << "<span class='notice'>You begin adding the plating...</span>"
if(!do_after(user,40) || !S.use(2))
return
if(anchored)
user << "<span class='notice'>You added the plating!</span>"
else
user << "<span class='notice'>You create a false wall! Push on it to open or close the passage.</span>"
wall_fake = 1
var/turf/Tsrc = get_turf(src)
Tsrc.ChangeTurf(/turf/simulated/wall)
var/turf/simulated/wall/T = get_turf(src)
T.set_material(M, reinf_material)
if(wall_fake)
T.can_open = 1
T.add_hiddenprint(usr)
del(src)
return
else if(istype(W, /obj/item/pipe))
var/obj/item/pipe/P = W
if (P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds.
user.drop_item()
P.loc = src.loc
user << "\blue You fit the pipe into the [src]!"
user << "<span class='notice'>You fit the pipe into the [src]!"
else
..()
/obj/structure/girder/proc/reinforce_girder()
cover = reinf_material.hardness
health = 500
state = 2
icon_state = "reinforced"
/obj/structure/girder/verb/reinforce_with_material()
set name = "Reinforce girder"
set desc = "Reinforce a girder with metal."
set src in view(1)
var/mob/living/user = usr
if(!istype(user) || !(user.l_hand || user.r_hand))
return
if(reinf_material)
user << "\The [src] is already reinforced."
return
var/obj/item/stack/sheet/S = user.l_hand
if(!istype(S))
S = user.r_hand
if(!istype(S))
user << "You cannot plate \the [src] with that."
return
if(S.get_amount() < 2)
user << "There is not enough material here to reinforce the girder."
return
var/material/M = name_to_material[S.sheettype]
if(!istype(M) || M.integrity < 50)
user << "You cannot reinforce \the [src] with that; it is too soft."
return
user << "<span class='notice'>Now reinforcing...</span>"
if (!do_after(user,40) || !S.use(2))
return
user << "<span class='notice'>You added reinforcement!</span>"
reinf_material = M
reinforce_girder()
/obj/structure/girder/proc/dismantle()
new /obj/item/stack/sheet/metal(get_turf(src))
del(src)
@@ -175,7 +212,6 @@
if(prob(40))
del(src)
/obj/structure/girder/ex_act(severity)
switch(severity)
if(1.0)
@@ -183,101 +219,38 @@
return
if(2.0)
if (prob(30))
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
new remains(loc)
del(src)
dismantle()
return
if(3.0)
if (prob(5))
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
new remains(loc)
del(src)
dismantle()
return
else
return
/obj/structure/girder/displaced
icon_state = "displaced"
anchored = 0
health = 50
cover = 25
/obj/structure/girder/reinforced
icon_state = "reinforced"
state = 2
health = 500
cover = 80
/obj/structure/cultgirder
/obj/structure/girder/cult
icon= 'icons/obj/cult.dmi'
icon_state= "cultgirder"
anchored = 1
density = 1
layer = 2
var/health = 250
var/cover = 70
health = 250
cover = 70
/obj/structure/cultgirder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker)
if(!damage || !wallbreaker)
return 0
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
dismantle()
return 1
/obj/structure/cultgirder/proc/dismantle()
/obj/structure/girder/cult/dismantle()
new /obj/effect/decal/remains/human(get_turf(src))
del(src)
/obj/structure/cultgirder/attackby(obj/item/W as obj, mob/user as mob)
/obj/structure/girder/cult/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user << "\blue Now disassembling the girder"
user << "<span class='notice'>Now disassembling the girder...</span>"
if(do_after(user,40))
user << "\blue You dissasembled the girder!"
user << "<span class='notice'>You dissasembled the girder!</span>"
dismantle()
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
user << "\blue Now slicing apart the girder"
user << "<span class='notice'>Now slicing apart the girder..."
if(do_after(user,30))
user << "\blue You slice apart the girder!"
user << "<span class='notice'>You slice apart the girder!</span>"
dismantle()
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
user << "\blue You drill through the girder!"
user << "<span class='notice'>You drill through the girder!</span>"
new /obj/effect/decal/remains/human(get_turf(src))
dismantle()
/obj/structure/cultgirder/blob_act()
if(prob(40))
dismantle()
/obj/structure/cultgirder/bullet_act(var/obj/item/projectile/Proj) //No beam check- How else will you destroy the cult girder with silver bullets?????
//Girders only provide partial cover. There's a chance that the projectiles will just pass through. (unless you are trying to shoot the girder)
if(Proj.original != src && !prob(cover))
return -1 //pass through
//Tasers and the like should not damage cultgirders.
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
return
health -= Proj.damage
..()
if(health <= 0)
dismantle()
return
/obj/structure/cultgirder/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(30))
dismantle()
return
if(3.0)
if (prob(5))
dismantle()
return
else
return

View File

@@ -119,7 +119,7 @@
Dismantle(1)
proc/Dismantle(devastated = 0)
var/material/M = name_to_mineral[mineralType]
var/material/M = name_to_material[mineralType]
if(istype(M))
for(var/i = (devastated? 1 : 3), i <= oreAmount, i++)
new M.stack_type(get_turf(src))

View File

@@ -1,141 +0,0 @@
//Separate dm because it relates to two types of atoms + ease of removal in case it's needed.
//Also assemblies.dm for falsewall checking for this when used.
//I should really make the shuttle wall check run every time it's moved, but centcom uses unsimulated floors so !effort
/atom/proc/relativewall() //atom because it should be useable both for walls and false walls
if(istype(src,/turf/simulated/floor/vault)||istype(src,/turf/simulated/wall/vault)) //HACK!!!
return
var/junction = 0 //will be used to determine from which side the wall is connected to other walls
if(!istype(src,/turf/simulated/shuttle/wall)) //or else we'd have wacky shuttle merging with walls action
for(var/turf/simulated/wall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
junction |= get_dir(src,W)
for(var/obj/structure/falsewall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
junction |= get_dir(src,W)
for(var/obj/structure/falserwall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
junction |= get_dir(src,W)
/* Commenting this out for now until we figure out what to do with shuttle smooth walls, if anything.
As they are now, they sort of work screwy and may need further coding. Or just be scrapped.*/
/*else
for(var/turf/simulated/shuttle/wall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
junction |= get_dir(src,W)
for(var/obj/machinery/shuttle/W in orange(src,1)) //stuff like engine and propulsion should merge with walls
if(abs(src.x-W.x)-abs(src.y-W.y))
junction |= get_dir(src,W)
for(var/obj/machinery/door/W in orange(src,1)) //doors should not result in diagonal walls, it just looks ugly. checking if area is shuttle so it won't merge with the station
if((abs(src.x-W.x)-abs(src.y-W.y)) && (istype(W.loc.loc,/area/shuttle) || istype(W.loc.loc,/area/supply)))
junction |= get_dir(src,W)
for(var/obj/structure/grille/W in orange(src,1)) //same for grilles. checking if area is shuttle so it won't merge with the station
if((abs(src.x-W.x)-abs(src.y-W.y)) && (istype(W.loc.loc,/area/shuttle) || istype(W.loc.loc,/area/supply)))
junction |= get_dir(src,W)*/
if(istype(src,/turf/simulated/wall))
var/turf/simulated/wall/wall = src
wall.icon_state = "[wall.walltype][junction]"
else if (istype(src,/obj/structure/falserwall))
src.icon_state = "rwall[junction]"
else if (istype(src,/obj/structure/falsewall))
var/obj/structure/falsewall/fwall = src
fwall.icon_state = "[fwall.mineral][junction]"
/* else if(istype(src,/turf/simulated/shuttle/wall))
var/newicon = icon;
var/newiconstate = icon_state;
if(junction!=5 && junction!=6 && junction!=9 && junction!=10) //if it's not diagonal, all is well, no additional calculations needed
src.icon_state = "swall[junction]"
else //if it's diagonal, we need to figure out if we're using the floor diagonal or the space diagonal sprite
var/is_floor = 0
for(var/turf/unsimulated/floor/F in orange(src,1))
if(abs(src.x-F.x)-abs(src.y-F.y))
if((15-junction) & get_dir(src,F)) //if there's a floor in at least one of the empty space directions, return 1
is_floor = 1
newicon = F.icon
newiconstate = F.icon_state //we'll save these for later
for(var/turf/simulated/floor/F in orange(src,1))
if(abs(src.x-F.x)-abs(src.y-F.y))
if((15-junction) & get_dir(src,F)) //if there's a floor in at least one of the empty space directions, return 1
is_floor = 1
newicon = F.icon
newiconstate = F.icon_state //we'll save these for later
for(var/turf/simulated/shuttle/floor/F in orange(src,1))
if(abs(src.x-F.x)-abs(src.y-F.y))
if((15-junction) & get_dir(src,F)) //if there's a floor in at least one of the empty space directions, return 1
is_floor = 1
newicon = F.icon
newiconstate = F.icon_state //we'll save these for later
if(is_floor) //if is_floor = 1, we use the floor diagonal sprite
src.icon = newicon; //we'll set the floor's icon to the floor next to it and overlay the wall segment. shuttle floor sprites have priority
src.icon_state = newiconstate; //
src.overlays += icon('icons/turf/shuttle.dmi',"swall_f[junction]")
else //otherwise, the space one
src.icon_state = "swall_s[junction]"*/
return
/atom/proc/relativewall_neighbours()
for(var/turf/simulated/wall/W in range(src,1))
W.relativewall()
for(var/obj/structure/falsewall/W in range(src,1))
W.relativewall()
W.update_icon()//Refreshes the wall to make sure the icons don't desync
for(var/obj/structure/falserwall/W in range(src,1))
W.relativewall()
return
/turf/simulated/wall/New()
relativewall_neighbours()
..()
/*/turf/simulated/shuttle/wall/New()
spawn(20) //testing if this will make /obj/machinery/shuttle and /door count - It does, it stays.
if(src.icon_state in list("wall1", "wall", "diagonalWall", "wall_floor", "wall_space")) //so wizard den, syndie shuttle etc will remain black
for(var/turf/simulated/shuttle/wall/W in range(src,1))
W.relativewall()
..()*/
/turf/simulated/wall/Del()
spawn(10)
for(var/turf/simulated/wall/W in range(src,1))
W.relativewall()
for(var/obj/structure/falsewall/W in range(src,1))
W.relativewall()
for(var/direction in cardinal)
for(var/obj/effect/plant/shroom in get_step(src,direction))
if(!shroom.floor) //shrooms drop to the floor
shroom.floor = 1
shroom.update_icon()
shroom.pixel_x = 0
shroom.pixel_y = 0
..()
/turf/simulated/wall/relativewall()
if(istype(src,/turf/simulated/wall/vault)) //HACK!!!
return
var/junction = 0 //will be used to determine from which side the wall is connected to other walls
for(var/turf/simulated/wall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(mineral == W.mineral)//Only 'like' walls connect -Sieve
junction |= get_dir(src,W)
for(var/obj/structure/falsewall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(mineral == W.mineral)
junction |= get_dir(src,W)
for(var/obj/structure/falserwall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
if(mineral == W.mineral)
junction |= get_dir(src,W)
var/turf/simulated/wall/wall = src
wall.icon_state = "[wall.walltype][junction]"
return

View File

@@ -0,0 +1,315 @@
//Interactions
/turf/simulated/wall/proc/toggle_open(var/mob/user)
if(can_open == WALL_OPENING)
return
if(density)
can_open = WALL_OPENING
set_wall_state("[material.icon_base]fwall_open")
//flick("[material.icon_base]fwall_opening", src)
sleep(15)
density = 0
SetOpacity(0)
else
can_open = WALL_OPENING
//flick("[material.icon_base]fwall_closing", src)
set_wall_state("[material.icon_base]0")
density = 1
sleep(15)
SetOpacity(1)
can_open = WALL_CAN_OPEN
update_icon()
/turf/simulated/wall/proc/fail_smash(var/mob/user)
user << "<span class='danger'>You smash against the wall!</span>"
take_damage(rand(25,75))
/turf/simulated/wall/proc/success_smash(var/mob/user)
user << "<span class='danger'>You smash through the wall!</span>"
spawn(1)
dismantle_wall(1)
/turf/simulated/wall/proc/try_touch(var/mob/user, var/rotting)
if(rotting)
if(reinf_material)
user << "<span class='danger'>\The [reinf_material.display_name] feels porous and crumbly.</span>"
else
user << "<span class='danger'>\The [material.display_name] crumbles under your touch!</span>"
dismantle_wall()
return 1
if(..()) return 1
if(!can_open)
user << "<span class='notice'>You push the wall, but nothing happens.</span>"
playsound(src, 'sound/weapons/Genhit.ogg', 25, 1)
else
toggle_open(user)
return 0
/turf/simulated/wall/attack_hand(var/mob/user)
radiate()
add_fingerprint(user)
var/rotting = (locate(/obj/effect/overlay/wallrot) in src)
if (HULK in user.mutations)
if (rotting || !prob(material.hardness))
success_smash(user)
else
fail_smash(user)
return 1
try_touch(user, rotting)
/turf/simulated/wall/attack_generic(var/mob/user, var/damage, var/attack_message, var/wallbreaker)
radiate()
var/rotting = (locate(/obj/effect/overlay/wallrot) in src)
if(!damage || !wallbreaker)
try_touch(user, rotting)
return
if(rotting || !prob(material.hardness))
success_smash(user)
else
fail_smash(user)
return 1
/turf/simulated/wall/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (!user.)
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
return
//get the user's location
if(!istype(user.loc, /turf)) return //can't do this stuff whilst inside objects and such
if(W)
radiate()
if(is_hot(W))
ignite(is_hot(W))
if(locate(/obj/effect/overlay/wallrot) in src)
if(istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
user << "<span class='notice'>You burn away the fungi with \the [WT].</span>"
playsound(src, 'sound/items/Welder.ogg', 10, 1)
for(var/obj/effect/overlay/wallrot/WR in src)
del(WR)
return
else if(!is_sharp(W) && W.force >= 10 || W.force >= 20)
user << "<span class='notice'>\The [src] crumbles away under the force of your [W.name].</span>"
src.dismantle_wall(1)
return
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
if(thermite)
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
thermitemelt(user)
return
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
thermitemelt(user)
return
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
var/obj/item/weapon/melee/energy/blade/EB = W
EB.spark_system.start()
user << "<span class='notice'>You slash \the [src] with \the [EB]; the thermite ignites!</span>"
playsound(src, "sparks", 50, 1)
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
thermitemelt(user)
return
var/turf/T = user.loc //get user's location for delay checks
if(damage && istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.isOn())
return
if(WT.remove_fuel(0,user))
user << "<span class='notice'>You start repairing the damage to [src].</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(do_after(user, max(5, damage / 5)) && WT && WT.isOn())
user << "<span class='notice'>You finish repairing the damage to [src].</span>"
take_damage(-damage)
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
return
// Basic dismantling.
if(isnull(construction_stage) || !reinf_material)
var/cut_delay = 60 - material.cut_delay
var/dismantle_verb
var/dismantle_sound
if(istype(W,/obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.isOn())
return
if(!WT.remove_fuel(0,user))
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
dismantle_verb = "cutting"
dismantle_sound = 'sound/items/Welder.ogg'
cut_delay *= 0.7
else if(istype(W,/obj/item/weapon/melee/energy/blade))
dismantle_sound = "sparks"
dismantle_verb = "slicing"
cut_delay *= 0.5
else if(istype(W,/obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/P = W
dismantle_verb = P.drill_verb
dismantle_sound = P.drill_sound
cut_delay -= P.digspeed
if(dismantle_verb)
user << "<span class='notice'>You begin [dismantle_verb] through the outer plating.</span>"
if(dismantle_sound)
playsound(src, dismantle_sound, 100, 1)
if(cut_delay<0)
cut_delay = 0
if(!do_after(user,cut_delay))
return
user << "<span class='notice'>You remove the outer plating.</span>"
dismantle_wall()
user.visible_message("<span class='warning'>The wall was torn open by [user]!</span>")
return
//Reinforced dismantling.
else
switch(construction_stage)
if(6)
if (istype(W, /obj/item/weapon/wirecutters))
playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
construction_stage = 5
//src.icon_state = "r_wall-1"
//new /obj/item/stack/rods( src )
user << "<span class='notice'>You cut the outer grille.</span>"
return
if(5)
if (istype(W, /obj/item/weapon/screwdriver))
user << "<span class='notice'>You begin removing the support lines.</span>"
playsound(src, 'sound/items/Screwdriver.ogg', 100, 1)
sleep(40)
if(!istype(src, /turf/simulated/wall) || !user || !W || !T )
return
if(construction_stage == 5 && user.loc == T && user.get_active_hand() == W )
construction_stage = 4
//src.icon_state = "r_wall-2"
user << "<span class='notice'>You remove the support lines.</span>"
return
else if( istype(W, /obj/item/stack/rods) )
var/obj/item/stack/O = W
if(O.get_amount()>0)
O.use(1)
construction_stage = 6
//src.icon_state = "r_wall"
user << "<span class='notice'>You replace the outer grille.</span>"
if(4)
var/cut_cover
if(istype(W,/obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.isOn())
return
if(WT.remove_fuel(0,user))
cut_cover=1
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
else if (istype(W, /obj/item/weapon/pickaxe/plasmacutter))
cut_cover = 1
if(cut_cover)
user << "<span class='notice'>You begin slicing through the metal cover.</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
sleep(60)
if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return
if(construction_stage == 2 && user.loc == T && user.get_active_hand() == W)
construction_stage = 3
//src.icon_state = "r_wall-3"
user << "<span class='notice'>You press firmly on the cover, dislodging it.</span>"
return
if(3)
if (istype(W, /obj/item/weapon/crowbar))
user << "<span class='notice'>You struggle to pry off the cover.</span>"
playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
sleep(100)
if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return
if( construction_stage == 3 && user.loc == T && user.get_active_hand() == W )
construction_stage = 2
//src.icon_state = "r_wall-4"
user << "<span class='notice'>You pry off the cover.</span>"
return
if(2)
if (istype(W, /obj/item/weapon/wrench))
user << "<span class='notice'>You start loosening the anchoring bolts which secure the support rods to their frame.</span>"
playsound(src, 'sound/items/Ratchet.ogg', 100, 1)
sleep(40)
if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return
if( construction_stage == 4 && user.loc == T && user.get_active_hand() == W )
construction_stage = 1
//src.icon_state = "r_wall-5"
user << "<span class='notice'>You remove the bolts anchoring the support rods.</span>"
return
if(1)
var/cut_cover
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
cut_cover=1
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
cut_cover = 1
if(cut_cover)
user << "<span class='notice'>You begin slicing through the support rods.</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
sleep(70)
if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return
if( construction_stage == 5 && user.loc == T && user.get_active_hand() == W )
construction_stage = 0
//src.icon_state = "r_wall-6"
//new /obj/item/stack/rods( src )
user << "<span class='notice'>The support rods drop out as you cut them loose from the frame.</span>"
return
if(0)
if( istype(W, /obj/item/weapon/crowbar) )
user << "<span class='notice'>You struggle to pry off the outer sheath.</span>"
playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
sleep(100)
if(!istype(src, /turf/simulated/wall) || !user || !W || !T ) return
if(user.loc == T && user.get_active_hand() == W )
user << "<span class='notice'>You pry off the outer sheath.</span>"
dismantle_wall()
return
if(istype(W,/obj/item/frame))
var/obj/item/frame/F = W
F.try_build(src)
return
else if(!istype(W,/obj/item/weapon/rcd) && !istype(W, /obj/item/weapon/reagent_containers))
return attack_hand(user)

View File

@@ -0,0 +1,121 @@
/turf/simulated/wall/proc/update_material()
if(!material)
return
if(reinf_material)
construction_stage = 6
else
construction_stage = null
if(!material)
material = name_to_material["steel"]
if(material)
explosion_resistance = material.explosion_resistance
if(reinf_material && reinf_material.explosion_resistance > explosion_resistance)
explosion_resistance = reinf_material.explosion_resistance
if(reinf_material)
name = "reinforced [material.display_name] wall"
desc = "It seems to be a section of hull reinforced with [reinf_material.display_name] and plated with [material.display_name]."
else
name = "[material.display_name] wall"
desc = "It seems to be a section of hull plated with [material.display_name]."
set_wall_state("[material.icon_base]0")
if(material.opacity > 0.5 && !opacity)
SetOpacity(1)
else if(material.opacity < 0.5 && opacity)
SetOpacity(0)
update_icon()
check_relatives()
/turf/simulated/wall/proc/set_wall_state(var/new_state)
if(!material)
return
if(new_state)
last_state = new_state
else if(last_state)
new_state = last_state
else
return
overlays.Cut()
if(!wall_cache["[new_state]-[material.icon_colour]"])
var/image/I = image(icon='icons/turf/wall_masks.dmi',icon_state="[new_state]")
I.color = material.icon_colour
wall_cache["[new_state]-[material.icon_colour]"] = I
overlays |= wall_cache["[new_state]-[material.icon_colour]"]
if(reinf_material)
if(!wall_cache["[material.icon_reinf]-[reinf_material.icon_colour]"])
var/image/I = image(icon='icons/turf/wall_masks.dmi',icon_state="[material.icon_reinf]")
I.color = reinf_material.icon_colour
wall_cache["[material.icon_reinf]-[reinf_material.icon_colour]"] = I
overlays |= wall_cache["[material.icon_reinf]-[reinf_material.icon_colour]"]
/turf/simulated/wall/proc/set_material(var/material/newmaterial, var/material/newrmaterial)
material = newmaterial
reinf_material = newrmaterial
check_relatives()
check_relatives(1)
/turf/simulated/wall/proc/update_icon()
if(!material)
return
if(!damage_overlays[1]) //list hasn't been populated
generate_overlays()
if(density)
check_relatives(1)
else
set_wall_state("[material.icon_base]fwall_open")
var/overlay = round(damage / material.integrity * damage_overlays.len) + 1
if(overlay > damage_overlays.len)
overlay = damage_overlays.len
if(density)
if(damage_overlay && overlay == damage_overlay) //No need to update.
return
overlays += damage_overlays[overlay]
damage_overlay = overlay
return
/turf/simulated/wall/proc/generate_overlays()
var/alpha_inc = 256 / damage_overlays.len
for(var/i = 1; i <= damage_overlays.len; i++)
var/image/img = image(icon = 'icons/turf/walls.dmi', icon_state = "overlay_damage")
img.blend_mode = BLEND_MULTIPLY
img.alpha = (i * alpha_inc) - 1
damage_overlays[i] = img
//Smoothwall code. update_self for relativewall(), not for relativewall_neighbors()
/turf/simulated/wall/proc/check_relatives(var/update_self)
if(!material)
return
var/junction
if(update_self)
junction = 0
for(var/checkdir in cardinal)
var/turf/simulated/wall/T = get_step(src, checkdir)
if(!istype(T) || !T.material)
continue
if(T.material && can_join_with(T))
if(update_self)
junction |= get_dir(src,T) //Not too sure why, but using checkdir just breaks walls.
else
T.check_relatives(1)
if(!isnull(junction))
set_wall_state("[material.icon_base][junction]")
return
/turf/simulated/wall/proc/can_join_with(var/turf/simulated/wall/W)
if(material && W.material && material.name == W.material.name)
return 1
return 0

View File

@@ -0,0 +1,43 @@
/turf/simulated/wall/r_wall
icon_state = "rgeneric"
/turf/simulated/wall/r_wall/New(var/newloc)
..(newloc, "steel","plasteel") //3strong
/turf/simulated/wall/cult
icon_state = "cult"
/turf/simulated/wall/cult/New(var/newloc)
..(newloc,"cult","cult2")
/turf/unsimulated/wall/cult
name = "cult wall"
desc = "Hideous images dance beneath the surface."
icon = 'icons/turf/wall_masks.dmi'
icon_state = "cult"
/turf/simulated/wall/iron/New(var/newloc)
..(newloc,"iron")
/turf/simulated/wall/uranium/New(var/newloc)
..(newloc,"uranium")
/turf/simulated/wall/diamond/New(var/newloc)
..(newloc,"diamond")
/turf/simulated/wall/gold/New(var/newloc)
..(newloc,"gold")
/turf/simulated/wall/silver/New(var/newloc)
..(newloc,"silver")
/turf/simulated/wall/phoron/New(var/newloc)
..(newloc,"phoron")
/turf/simulated/wall/sandstone/New(var/newloc)
..(newloc,"sandstone")
/turf/simulated/wall/ironphoron/New(var/newloc)
..(newloc,"iron","phoron")
/turf/simulated/wall/golddiamond/New(var/newloc)
..(newloc,"gold","diamond")
/turf/simulated/wall/silvergold/New(var/newloc)
..(newloc,"silver","gold")
/turf/simulated/wall/sandstonediamond/New(var/newloc)
..(newloc,"sandstone","diamond")
/turf/simulated/wall/cult/New(var/newloc)
..(newloc,"cult","cult2")

View File

@@ -1,29 +1,47 @@
var/list/global/wall_cache = list()
/turf/simulated/wall
name = "wall"
desc = "A huge chunk of metal used to seperate rooms."
icon = 'icons/turf/walls.dmi'
var/mineral = "steel"
var/rotting = 0
var/damage = 0
var/damage_cap = 150 //Wall will break down to girders if damage reaches this point
var/damage_overlay
var/global/damage_overlays[8]
var/max_temperature = 1800 //K, walls will take damage if they're next to a fire hotter than this
icon = 'icons/turf/wall_masks.dmi'
icon_state = "generic"
opacity = 1
density = 1
blocks_air = 1
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall
var/walltype = "steel"
var/damage = 0
var/damage_overlay
var/global/damage_overlays[8]
var/active
var/last_event
var/can_open = 0
var/material/material
var/material/reinf_material
var/last_state
var/construction_stage
/turf/simulated/wall/New(var/newloc, var/materialtype, var/rmaterialtype)
..(newloc)
icon_state = "blank"
if(!name_to_material)
populate_material_list()
if(!materialtype)
materialtype = "steel"
material = name_to_material[materialtype]
if(!isnull(rmaterialtype))
reinf_material = name_to_material[rmaterialtype]
update_material()
/turf/simulated/wall/bullet_act(var/obj/item/projectile/Proj)
radiate()
if(istype(Proj,/obj/item/projectile/beam))
ignite(2500)
else if(istype(Proj,/obj/item/projectile/ion))
ignite(500)
// Tasers and stuff? No thanks. Also no clone or tox damage crap.
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
return
@@ -45,25 +63,29 @@
take_damage(tforce)
/turf/simulated/wall/Del()
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
..()
/turf/simulated/wall/proc/clear_plants()
for(var/obj/effect/overlay/wallrot/WR in src)
del(WR)
for(var/obj/effect/plant/plant in range(src, 1))
if(!plant.floor) //shrooms drop to the floor
plant.floor = 1
plant.update_icon()
plant.pixel_x = 0
plant.pixel_y = 0
plant.update_neighbors()
/turf/simulated/wall/ChangeTurf(var/newtype)
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
for(var/obj/effect/plant/plant in range(1))
plant.update_neighbors()
clear_plants()
..(newtype)
//Appearance
/turf/simulated/wall/examine(mob/user)
. = ..(user)
if(!damage)
user << "<span class='notice'>It looks fully intact.</span>"
else
var/dam = damage / damage_cap
var/dam = damage / material.integrity
if(dam <= 0.3)
user << "<span class='warning'>It looks slightly damaged.</span>"
else if(dam <= 0.6)
@@ -71,39 +93,9 @@
else
user << "<span class='danger'>It looks heavily damaged.</span>"
if(rotting)
if(locate(/obj/effect/overlay/wallrot) in src)
user << "<span class='warning'>There is fungus growing on [src].</span>"
/turf/simulated/wall/proc/update_icon()
if(!damage_overlays[1]) //list hasn't been populated
generate_overlays()
if(!damage)
overlays.Cut()
return
var/overlay = round(damage / damage_cap * damage_overlays.len) + 1
if(overlay > damage_overlays.len)
overlay = damage_overlays.len
if(damage_overlay && overlay == damage_overlay) //No need to update.
return
overlays.Cut()
overlays += damage_overlays[overlay]
damage_overlay = overlay
return
/turf/simulated/wall/proc/generate_overlays()
var/alpha_inc = 256 / damage_overlays.len
for(var/i = 1; i <= damage_overlays.len; i++)
var/image/img = image(icon = 'icons/turf/walls.dmi', icon_state = "overlay_damage")
img.blend_mode = BLEND_MULTIPLY
img.alpha = (i * alpha_inc) - 1
damage_overlays[i] = img
//Damage
/turf/simulated/wall/melt()
@@ -128,8 +120,11 @@
return
/turf/simulated/wall/proc/update_damage()
var/cap = damage_cap
if(rotting)
var/cap = material.integrity
if(reinf_material)
cap += reinf_material.integrity
if(locate(/obj/effect/overlay/wallrot) in src)
cap = cap / 10
if(damage >= cap)
@@ -139,42 +134,25 @@
return
/turf/simulated/wall/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)//Doesn't fucking work because walls don't interact with air :(
ignite(exposed_temperature)
/turf/simulated/wall/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume)
if(adj_temp > max_temperature)
take_damage(log(RAND_F(0.9, 1.1) * (adj_temp - max_temperature)))
ignite(adj_temp)
if(adj_temp > material.melting_point)
take_damage(log(RAND_F(0.9, 1.1) * (adj_temp - material.melting_point)))
return ..()
/turf/simulated/wall/proc/dismantle_wall(devastated=0, explode=0)
if(istype(src,/turf/simulated/wall/r_wall))
if(!devastated)
playsound(src, 'sound/items/Welder.ogg', 100, 1)
new /obj/structure/girder/reinforced(src)
new /obj/item/stack/sheet/plasteel( src )
else
new /obj/item/stack/sheet/metal( src )
new /obj/item/stack/sheet/metal( src )
new /obj/item/stack/sheet/plasteel( src )
else if(istype(src,/turf/simulated/wall/cult))
if(!devastated)
playsound(src, 'sound/items/Welder.ogg', 100, 1)
new /obj/effect/decal/cleanable/blood(src)
new /obj/structure/cultgirder(src)
else
new /obj/effect/decal/cleanable/blood(src)
new /obj/effect/decal/remains/human(src)
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(reinf_material)
reinf_material.place_dismantled_girder(src, reinf_material)
reinf_material.place_dismantled_product(src,devastated)
else
if(!devastated)
playsound(src, 'sound/items/Welder.ogg', 100, 1)
new /obj/structure/girder(src)
var/material/M = name_to_mineral[mineral]
if(istype(M) && M.stack_type)
for(var/x=1;x<(devastated?2:3);x++)
new M.stack_type(src)
else
for(var/x=1;x<(devastated?2:3);x++)
new /obj/item/stack/sheet/metal(src)
material.place_dismantled_girder(src)
material.place_dismantled_product(src,devastated)
for(var/obj/O in src.contents) //Eject contents!
if(istype(O,/obj/structure/sign/poster))
@@ -206,26 +184,14 @@
// Wall-rot effect, a nasty fungus that destroys walls.
/turf/simulated/wall/proc/rot()
if(!rotting)
rotting = 1
var/number_rots = rand(2,3)
for(var/i=0, i<number_rots, i++)
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
O.name = "Wallrot"
O.desc = "Ick..."
O.icon = 'icons/effects/wallrot.dmi'
O.pixel_x += rand(-10, 10)
O.pixel_y += rand(-10, 10)
O.anchored = 1
O.density = 1
O.layer = 5
O.mouse_opacity = 0
if(locate(/obj/effect/overlay/wallrot) in src)
return
var/number_rots = rand(2,3)
for(var/i=0, i<number_rots, i++)
new/obj/effect/overlay/wallrot(src)
/turf/simulated/wall/proc/can_melt()
var/material/M = name_to_mineral[mineral]
if(istype(M) && M.unmeltable)
if(material.unmeltable)
return 0
return 1
@@ -254,6 +220,7 @@
return
/turf/simulated/wall/meteorhit(obj/M as obj)
var/rotting = (locate(/obj/effect/overlay/wallrot) in src)
if (prob(15) && !rotting)
dismantle_wall()
else if(prob(70) && !rotting)
@@ -262,221 +229,51 @@
ReplaceWithLattice()
return 0
/turf/simulated/wall
var/hulk_destroy_prob = 40
var/hulk_take_damage = 1
var/rotting_destroy_touch = 1
var/rotting_touch_message = "\blue The wall crumbles under your touch."
//Interactions
/turf/simulated/wall/attack_hand(mob/user as mob)
if (HULK in user.mutations)
if (prob(hulk_destroy_prob) || rotting)
usr << text("\blue You smash through the wall.")
usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
dismantle_wall(1)
return 1
else
usr << text("\blue You punch the wall.")
if(hulk_take_damage)
take_damage(rand(25, 75))
return 1
if(rotting)
user << rotting_touch_message
if(rotting_destroy_touch)
dismantle_wall()
return 1
if(..()) return 1
user << "\blue You push the wall but nothing happens!"
playsound(src, 'sound/weapons/Genhit.ogg', 25, 1)
src.add_fingerprint(user)
return 0
/turf/simulated/wall/attack_generic(var/mob/user, var/damage, var/attack_message, var/wallbreaker)
if(!damage || !wallbreaker)
user << "You push the wall but nothing happens."
/turf/simulated/wall/proc/radiate()
var/material/M = name_to_material[material]
if(!istype(M) || !M.radioactivity)
return
if(rotting || prob(40))
user << "You smash through the wall!"
spawn(1) dismantle_wall(1)
else
user << "You smash against the wall."
take_damage(rand(25,75))
return 1
/turf/simulated/wall/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
return
//get the user's location
if( !istype(user.loc, /turf) ) return //can't do this stuff whilst inside objects and such
if(rotting)
if(istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
user << "<span class='notice'>You burn away the fungi with \the [WT].</span>"
playsound(src, 'sound/items/Welder.ogg', 10, 1)
for(var/obj/effect/E in src) if(E.name == "Wallrot")
del E
rotting = 0
return
else if(!is_sharp(W) && W.force >= 10 || W.force >= 20)
user << "<span class='notice'>\The [src] crumbles away under the force of your [W.name].</span>"
src.dismantle_wall(1)
if(!active)
if(world.time > last_event+15)
active = 1
for(var/mob/living/L in range(3,src))
L.apply_effect(M.radioactivity,IRRADIATE,0)
for(var/turf/simulated/wall/T in range(3,src))
T.radiate()
last_event = world.time
active = null
return
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
if( thermite )
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
thermitemelt(user)
return
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
thermitemelt(user)
return
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
var/obj/item/weapon/melee/energy/blade/EB = W
EB.spark_system.start()
user << "<span class='notice'>You slash \the [src] with \the [EB]; the thermite ignites!</span>"
playsound(src, "sparks", 50, 1)
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
thermitemelt(user)
return
var/turf/T = user.loc //get user's location for delay checks
var/cut_delay = 60
var/material/M = name_to_mineral[mineral]
if(istype(M))
cut_delay -= M.cut_delay
//DECONSTRUCTION
if( istype(W, /obj/item/weapon/weldingtool) )
var/response = "Dismantle"
if(damage)
response = alert(user, "Would you like to repair or dismantle [src]?", "[src]", "Repair", "Dismantle")
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0,user))
if(response == "Repair")
user << "<span class='notice'>You start repairing the damage to [src].</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(do_after(user, max(5, damage / 5)) && WT && WT.isOn())
user << "<span class='notice'>You finish repairing the damage to [src].</span>"
take_damage(-damage)
else if(response == "Dismantle")
user << "<span class='notice'>You begin slicing through the outer plating.</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(!do_after(user,100))
return
if(WT.isOn())
user << "<span class='notice'>You remove the outer plating.</span>"
dismantle_wall()
for(var/mob/O in viewers(user, 5))
O.show_message("<span class='warning'>The wall was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear metal being sliced apart.</span>", 2)
return
return
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
else if( istype(W, /obj/item/weapon/pickaxe) )
var/obj/item/weapon/pickaxe/P = W
user << "<span class='notice'>You begin [P.drill_verb] through the outer plating.</span>"
if(P.drill_sound)
playsound(src, P.drill_sound, 100, 1)
cut_delay -= P.digspeed
if(cut_delay<0)
cut_delay = 0
if(!do_after(user,cut_delay))
return
user << "<span class='notice'>You remove the outer plating.</span>"
dismantle_wall()
for(var/mob/O in viewers(user, 5))
O.show_message("<span class='warning'>The wall was torn open by [user]!</span>", 1, "<span class='warning'>You hear metal being sliced apart.</span>", 2)
return
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
var/obj/item/weapon/melee/energy/blade/EB = W
EB.spark_system.start()
user << "<span class='notice'>You stab \the [EB] into the wall and begin to slice it apart.</span>"
playsound(src, "sparks", 50, 1)
if(!do_after(user,cut_delay))
return
if( !istype(src, /turf/simulated/wall) || !user || !EB || !T ) return
if( user.loc == T && user.get_active_hand() == W )
EB.spark_system.start()
playsound(src, "sparks", 50, 1)
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
dismantle_wall(1)
for(var/mob/O in viewers(user, 5))
O.show_message("<span class='warning'>The wall was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear metal being sliced apart and sparks flying.</span>", 2)
return
else if(istype(W,/obj/item/apc_frame))
var/obj/item/apc_frame/AH = W
AH.try_build(src)
return
else if(istype(W,/obj/item/alarm_frame))
var/obj/item/alarm_frame/AH = W
AH.try_build(src)
return
else if(istype(W,/obj/item/firealarm_frame))
var/obj/item/firealarm_frame/AH = W
AH.try_build(src)
return
else if(istype(W,/obj/item/light_fixture_frame))
var/obj/item/light_fixture_frame/AH = W
AH.try_build(src)
return
else if(istype(W,/obj/item/light_fixture_frame/small))
var/obj/item/light_fixture_frame/small/AH = W
AH.try_build(src)
return
else if(istype(W,/obj/item/rust_fuel_compressor_frame))
var/obj/item/rust_fuel_compressor_frame/AH = W
AH.try_build(src)
return
else if(istype(W,/obj/item/rust_fuel_assembly_port_frame))
var/obj/item/rust_fuel_assembly_port_frame/AH = W
AH.try_build(src)
return
else if(istype(W,/obj/item/weapon/rcd)) //I bitterly resent having to write this. ~Z
return
else if(istype(W, /obj/item/weapon/reagent_containers))
return // They tend to have meaningful afterattack - let them apply it without destroying a rotting wall
else
return attack_hand(user)
return
/turf/simulated/wall/proc/burn(temperature)
spawn(2)
new /obj/structure/girder(src)
src.ChangeTurf(/turf/simulated/floor)
for(var/turf/simulated/floor/target_tile in range(0,src))
if(material == "phoron") //ergh
target_tile.assume_gas("phoron", 20, 400+T0C)
spawn (0) target_tile.hotspot_expose(temperature, 400)
for(var/turf/simulated/wall/W in range(3,src))
W.ignite((temperature/4))
for(var/obj/machinery/door/airlock/phoron/D in range(3,src))
D.ignite(temperature/4)
/turf/simulated/wall/proc/ignite(var/exposed_temperature)
var/material/M = name_to_material[material]
if(!istype(M) || !isnull(M.ignition_point))
return
if(exposed_temperature > M.ignition_point)//If the temperature of the object is over 300, then ignite
burn(exposed_temperature)
return
..()
/turf/simulated/wall/Bumped(AM as mob|obj)
radiate()
..()
/turf/simulated/wall/Del()
clear_plants()
check_relatives()
..()

View File

@@ -1,121 +0,0 @@
/turf/simulated/wall/mineral
name = "mineral wall"
desc = "This shouldn't exist"
icon_state = ""
var/last_event = 0
var/active = null
/turf/simulated/wall/mineral/gold
name = "gold wall"
desc = "A wall with gold plating. Swag!"
icon_state = "gold0"
walltype = "gold"
/turf/simulated/wall/mineral/silver
name = "silver wall"
desc = "A wall with silver plating. Shiny!"
icon_state = "silver0"
walltype = "silver"
/turf/simulated/wall/mineral/diamond
name = "diamond wall"
desc = "A wall with diamond plating. You monster."
icon_state = "diamond0"
walltype = "diamond"
/turf/simulated/wall/mineral/sandstone
name = "sandstone wall"
desc = "A wall with sandstone plating."
icon_state = "sandstone0"
walltype = "sandstone"
/turf/simulated/wall/mineral/uranium
name = "uranium wall"
desc = "A wall with uranium plating. This is probably a bad idea."
icon_state = "uranium0"
walltype = "uranium"
/turf/simulated/wall/mineral/uranium/proc/radiate()
if(!active)
if(world.time > last_event+15)
active = 1
for(var/mob/living/L in range(3,src))
L.apply_effect(12,IRRADIATE,0)
for(var/turf/simulated/wall/mineral/uranium/T in range(3,src))
T.radiate()
last_event = world.time
active = null
return
return
/turf/simulated/wall/mineral/uranium/attack_hand(mob/user as mob)
radiate()
..()
/turf/simulated/wall/mineral/uranium/attackby(obj/item/weapon/W as obj, mob/user as mob)
radiate()
..()
/turf/simulated/wall/mineral/uranium/Bumped(AM as mob|obj)
radiate()
..()
/turf/simulated/wall/mineral/phoron
name = "phoron wall"
desc = "A wall with phoron plating. This is definately a bad idea."
icon_state = "phoron0"
walltype = "phoron"
mineral = "phoron"
/turf/simulated/wall/mineral/phoron/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite
ignite(is_hot(W))
return
..()
/turf/simulated/wall/mineral/phoron/proc/PhoronBurn(temperature)
spawn(2)
new /obj/structure/girder(src)
src.ChangeTurf(/turf/simulated/floor)
for(var/turf/simulated/floor/target_tile in range(0,src))
target_tile.assume_gas("phoron", 20, 400+T0C)
spawn (0) target_tile.hotspot_expose(temperature, 400)
for(var/obj/structure/falsewall/phoron/F in range(3,src))//Hackish as fuck, but until temperature_expose works, there is nothing I can do -Sieve
var/turf/T = get_turf(F)
T.ChangeTurf(/turf/simulated/wall/mineral/phoron/)
del (F)
for(var/turf/simulated/wall/mineral/phoron/W in range(3,src))
W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame
for(var/obj/machinery/door/airlock/phoron/D in range(3,src))
D.ignite(temperature/4)
/turf/simulated/wall/mineral/phoron/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)//Doesn't fucking work because walls don't interact with air :(
if(exposed_temperature > 300)
PhoronBurn(exposed_temperature)
/turf/simulated/wall/mineral/phoron/proc/ignite(exposed_temperature)
if(exposed_temperature > 300)
PhoronBurn(exposed_temperature)
/turf/simulated/wall/mineral/phoron/bullet_act(var/obj/item/projectile/Proj)
if(istype(Proj,/obj/item/projectile/beam))
PhoronBurn(2500)
else if(istype(Proj,/obj/item/projectile/ion))
PhoronBurn(500)
..()
/*
/turf/simulated/wall/mineral/proc/shock()
if (electrocute_mob(user, C, src))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
return 1
else
return 0
/turf/simulated/wall/mineral/proc/attackby(obj/item/weapon/W as obj, mob/user as mob)
if((mineral == "gold") || (mineral == "silver"))
if(shocked)
shock()
*/

View File

@@ -1,8 +0,0 @@
/turf/simulated/wall/cult
name = "wall"
desc = "The patterns engraved on the wall seem to shift as you try to focus on them. You feel sick"
icon_state = "cult"
walltype = "cult"
/turf/unsimulated/wall/cult/cultify()
return

View File

@@ -1,307 +0,0 @@
/turf/simulated/wall/r_wall
name = "reinforced wall"
desc = "A huge chunk of reinforced metal used to seperate rooms."
icon_state = "r_wall"
opacity = 1
density = 1
damage_cap = 800
max_temperature = 6000
walltype = "rwall"
var/d_state = 0
/turf/simulated/wall/r_wall
hulk_destroy_prob = 10
hulk_take_damage = 0
rotting_destroy_touch = 0
rotting_touch_message = "\blue This wall feels rather unstable."
/turf/simulated/wall/r_wall/attack_generic(var/mob/user, var/damage, var/attack_message, var/wallbreaker)
if(!rotting && wallbreaker < 2)
user << "You push the wall but nothing happens."
return
return ..()
/turf/simulated/wall/r_wall/attackby(obj/item/W as obj, mob/user as mob)
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
return
//get the user's location
if( !istype(user.loc, /turf) ) return //can't do this stuff whilst inside objects and such
if(rotting)
if(istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
user << "<span class='notice'>You burn away the fungi with \the [WT].</span>"
playsound(src, 'sound/items/Welder.ogg', 10, 1)
for(var/obj/effect/E in src) if(E.name == "Wallrot")
del E
rotting = 0
return
else if(!is_sharp(W) && W.force >= 10 || W.force >= 20)
user << "<span class='notice'>\The [src] crumbles away under the force of your [W.name].</span>"
src.dismantle_wall()
return
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
if( thermite )
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
thermitemelt(user)
return
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
thermitemelt(user)
return
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
var/obj/item/weapon/melee/energy/blade/EB = W
EB.spark_system.start()
user << "<span class='notice'>You slash \the [src] with \the [EB]; the thermite ignites!</span>"
playsound(src, "sparks", 50, 1)
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
thermitemelt(user)
return
else if(istype(W, /obj/item/weapon/melee/energy/blade))
user << "<span class='notice'>This wall is too thick to slice through. You will need to find a different path.</span>"
return
if(damage && istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0,user))
user << "<span class='notice'>You start repairing the damage to [src].</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(do_after(user, max(5, damage / 5)) && WT && WT.isOn())
user << "<span class='notice'>You finish repairing the damage to [src].</span>"
take_damage(-damage)
return
else
user << "<span class='warning'>You need more welding fuel to complete this task.</span>"
return
var/turf/T = user.loc //get user's location for delay checks
//DECONSTRUCTION
switch(d_state)
if(0)
if (istype(W, /obj/item/weapon/wirecutters))
playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
src.d_state = 1
src.icon_state = "r_wall-1"
new /obj/item/stack/rods( src )
user << "<span class='notice'>You cut the outer grille.</span>"
return
if(1)
if (istype(W, /obj/item/weapon/screwdriver))
user << "<span class='notice'>You begin removing the support lines.</span>"
playsound(src, 'sound/items/Screwdriver.ogg', 100, 1)
sleep(40)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
if( d_state == 1 && user.loc == T && user.get_active_hand() == W )
src.d_state = 2
src.icon_state = "r_wall-2"
user << "<span class='notice'>You remove the support lines.</span>"
return
//REPAIRING (replacing the outer grille for cosmetic damage)
else if( istype(W, /obj/item/stack/rods) )
var/obj/item/stack/O = W
src.d_state = 0
src.icon_state = "r_wall"
relativewall_neighbours() //call smoothwall stuff
user << "<span class='notice'>You replace the outer grille.</span>"
if (O.amount > 1)
O.amount--
else
del(O)
return
if(2)
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
user << "<span class='notice'>You begin slicing through the metal cover.</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
sleep(60)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !WT.isOn() || !T ) return
if( d_state == 2 && user.loc == T && user.get_active_hand() == WT )
src.d_state = 3
src.icon_state = "r_wall-3"
user << "<span class='notice'>You press firmly on the cover, dislodging it.</span>"
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
user << "<span class='notice'>You begin slicing through the metal cover.</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
sleep(40)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
if( d_state == 2 && user.loc == T && user.get_active_hand() == W )
src.d_state = 3
src.icon_state = "r_wall-3"
user << "<span class='notice'>You press firmly on the cover, dislodging it.</span>"
return
if(3)
if (istype(W, /obj/item/weapon/crowbar))
user << "<span class='notice'>You struggle to pry off the cover.</span>"
playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
sleep(100)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
if( d_state == 3 && user.loc == T && user.get_active_hand() == W )
src.d_state = 4
src.icon_state = "r_wall-4"
user << "<span class='notice'>You pry off the cover.</span>"
return
if(4)
if (istype(W, /obj/item/weapon/wrench))
user << "<span class='notice'>You start loosening the anchoring bolts which secure the support rods to their frame.</span>"
playsound(src, 'sound/items/Ratchet.ogg', 100, 1)
sleep(40)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
if( d_state == 4 && user.loc == T && user.get_active_hand() == W )
src.d_state = 5
src.icon_state = "r_wall-5"
user << "<span class='notice'>You remove the bolts anchoring the support rods.</span>"
return
if(5)
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
user << "<span class='notice'>You begin slicing through the support rods.</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
sleep(100)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !WT.isOn() || !T ) return
if( d_state == 5 && user.loc == T && user.get_active_hand() == WT )
src.d_state = 6
src.icon_state = "r_wall-6"
new /obj/item/stack/rods( src )
user << "<span class='notice'>The support rods drop out as you cut them loose from the frame.</span>"
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
user << "<span class='notice'>You begin slicing through the support rods.</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
sleep(70)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
if( d_state == 5 && user.loc == T && user.get_active_hand() == W )
src.d_state = 6
src.icon_state = "r_wall-6"
new /obj/item/stack/rods( src )
user << "<span class='notice'>The support rods drop out as you cut them loose from the frame.</span>"
return
if(6)
if( istype(W, /obj/item/weapon/crowbar) )
user << "<span class='notice'>You struggle to pry off the outer sheath.</span>"
playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
sleep(100)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
if( user.loc == T && user.get_active_hand() == W )
user << "<span class='notice'>You pry off the outer sheath.</span>"
dismantle_wall()
return
//vv OK, we weren't performing a valid deconstruction step or igniting thermite,let's check the other possibilities vv
//DRILLING
if (istype(W, /obj/item/weapon/pickaxe/diamonddrill))
user << "<span class='notice'>You begin to drill though the wall.</span>"
sleep(200)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
if( user.loc == T && user.get_active_hand() == W )
user << "<span class='notice'>Your drill tears though the last of the reinforced plating.</span>"
dismantle_wall()
//REPAIRING
else if( istype(W, /obj/item/stack/sheet/metal) && d_state )
var/obj/item/stack/sheet/metal/MS = W
user << "<span class='notice'>You begin patching-up the wall with \a [MS].</span>"
sleep( max(20*d_state,100) ) //time taken to repair is proportional to the damage! (max 10 seconds)
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !MS || !T ) return
if( user.loc == T && user.get_active_hand() == MS && d_state )
src.d_state = 0
src.icon_state = "r_wall"
relativewall_neighbours() //call smoothwall stuff
user << "<span class='notice'>You repair the last of the damage.</span>"
if (MS.amount > 1)
MS.amount--
else
del(MS)
//APC
else if( istype(W,/obj/item/apc_frame) )
var/obj/item/apc_frame/AH = W
AH.try_build(src)
else if( istype(W,/obj/item/alarm_frame) )
var/obj/item/alarm_frame/AH = W
AH.try_build(src)
else if(istype(W,/obj/item/firealarm_frame))
var/obj/item/firealarm_frame/AH = W
AH.try_build(src)
return
else if(istype(W,/obj/item/light_fixture_frame))
var/obj/item/light_fixture_frame/AH = W
AH.try_build(src)
return
else if(istype(W,/obj/item/light_fixture_frame/small))
var/obj/item/light_fixture_frame/small/AH = W
AH.try_build(src)
return
else if(istype(W, /obj/item/weapon/reagent_containers))
return // They tend to have meaningful afterattack - let them apply it without destroying a rotting wall
//Finally, CHECKING FOR FALSE WALLS if it isn't damaged
else if(!d_state)
return attack_hand(user)
return

View File

@@ -271,6 +271,7 @@
icon_state = "thermalimplants"
item_state = "syringe_kit"
/* These do not currently work, commenting out pending fixes.
/obj/item/clothing/glasses/minerals
name = "resonance scanners"
desc = "A set of goggles geared towards detecting different concentrations of minerals."
@@ -312,8 +313,8 @@
return
for(var/obj/effect/mineral/M in range(wearer,6))
// Maybe make a cache for this so multiple miners aren't spawning copies.
ore_nodes += M.scanner_image
if(ore_nodes.len && wearer.client)
ore_nodes |= M.get_scan_overlay()
if(wearer.client)
wearer.client.images |= ore_nodes
/obj/item/clothing/glasses/minerals/proc/remove_ore_images()
@@ -325,7 +326,4 @@
wearer.client.images -= I
del(I)
ore_nodes.Cut()
/obj/item/clothing/glasses/minerals/dropped()
remove_ore_images()
wearer = null
*/

View File

@@ -0,0 +1,170 @@
var/list/name_to_material
/proc/populate_material_list()
name_to_material = list()
for(var/type in typesof(/material) - /material)
var/material/new_mineral = new type
if(!new_mineral.name)
continue
name_to_material[lowertext(new_mineral.name)] = new_mineral
return 1
/*
Valid sprite masks:
stone
metal
solid
cult
*/
/material
var/name // Tag for use in overlay generation/list population .
var/display_name
var/icon_base = "metal"
var/icon_colour
var/icon_reinf = "reinf_metal"
var/stack_type
var/unmeltable
var/cut_delay = 0
var/radioactivity
var/ignition_point
var/melting_point = 1800 // K, walls will take damage if they're next to a fire hotter than this
var/integrity = 150 // Damage before wall falls apart, essentially.
var/hardness = 60 // Used to determine if a hulk can punch through this wall.
var/rotting_touch_message = "crumbles under your touch"
var/opacity = 1
var/explosion_resistance = 5
/material/New()
..()
if(!display_name)
display_name = name
/material/proc/place_dismantled_girder(var/turf/target, var/material/reinf_material)
var/obj/structure/girder/G = new(target)
if(reinf_material)
G.reinf_material = reinf_material
G.reinforce_girder()
/material/proc/place_dismantled_product(var/turf/target,var/is_devastated)
for(var/x=1;x<(is_devastated?2:3);x++)
place_sheet(target)
/material/proc/place_sheet(var/turf/target)
if(stack_type)
new stack_type(target)
/material/uranium
name = "uranium"
stack_type = /obj/item/stack/sheet/mineral/uranium
radioactivity = 12
icon_base = "stone"
icon_reinf = "reinf_stone"
icon_colour = "#007A00"
/material/diamond
name = "diamond"
stack_type = /obj/item/stack/sheet/mineral/diamond
unmeltable = 1
cut_delay = 60
icon_colour = "#00FFE1"
opacity = 0.4
/material/gold
name = "gold"
stack_type = /obj/item/stack/sheet/mineral/gold
icon_colour = "#EDD12F"
/material/silver
name = "silver"
stack_type = /obj/item/stack/sheet/mineral/silver
icon_colour = "#D1E6E3"
/material/phoron
name = "phoron"
stack_type = /obj/item/stack/sheet/mineral/phoron
ignition_point = 300
icon_base = "stone"
icon_colour = "#FC2BC5"
/material/sandstone
name = "sandstone"
stack_type = /obj/item/stack/sheet/mineral/sandstone
icon_base = "stone"
icon_reinf = "reinf_stone"
icon_colour = "#D9C179"
/material/steel
name = "steel"
stack_type = /obj/item/stack/sheet/metal
icon_base = "solid"
icon_reinf = "reinf_over"
icon_colour = "#666666"
/material/plasteel
name = "plasteel"
stack_type = /obj/item/stack/sheet/plasteel
integrity = 800
melting_point = 6000
icon_base = "solid"
icon_reinf = "reinf_over"
icon_colour = "#777777"
explosion_resistance = 25
/material/glass
name = "glass"
stack_type = /obj/item/stack/sheet/glass
icon_colour = "#00E1FF"
opacity = 0.3
/material/plastic
name = "plastic"
stack_type = /obj/item/stack/sheet/mineral/plastic
icon_base = "solid"
icon_reinf = "reinf_over"
icon_colour = "#CCCCCC"
/material/osmium
name = "osmium"
stack_type = /obj/item/stack/sheet/mineral/osmium
icon_colour = "#9999FF"
/material/tritium
name = "tritium"
stack_type = /obj/item/stack/sheet/mineral/tritium
icon_colour = "#777777"
/material/mhydrogen
name = "mhydrogen"
stack_type = /obj/item/stack/sheet/mineral/mhydrogen
icon_colour = "#E6C5DE"
/material/platinum
name = "platinum"
stack_type = /obj/item/stack/sheet/mineral/platinum
icon_colour = "#9999FF"
/material/iron
name = "iron"
stack_type = /obj/item/stack/sheet/mineral/iron
icon_colour = "#5C5454"
/material/cult
name = "cult"
display_name = "disturbing stone"
icon_base = "cult"
icon_colour = "#402821"
icon_reinf = "reinf_cult"
/material/cult/place_dismantled_girder(var/turf/target)
new /obj/structure/girder/cult(target)
/material/cult/place_dismantled_product(var/turf/target)
new /obj/effect/decal/cleanable/blood(target)
/material/cult/reinf
name = "cult2"
display_name = "human remains"
/material/cult/reinf/place_dismantled_product(var/turf/target)
new /obj/effect/decal/remains/human(target)

View File

@@ -42,8 +42,9 @@
for(var/ore in machine.ores_processing)
if(!machine.ores_stored[ore] && !show_all_ores) continue
dat += "<tr><td width = 40><b>[capitalize(ore)]</b></td><td width = 30>[machine.ores_stored[ore]]</td><td width = 100><font color='"
var/ore/O = ore_data[ore]
if(!O) continue
dat += "<tr><td width = 40><b>[capitalize(O.display_name)]</b></td><td width = 30>[machine.ores_stored[ore]]</td><td width = 100><font color='"
if(machine.ores_processing[ore])
switch(machine.ores_processing[ore])
if(0)
@@ -150,8 +151,10 @@
for(var/i = 0,i<sheets_per_tick,i++)
var/obj/item/weapon/ore/O = locate() in input.loc
if(!O) break
if(!isnull(ores_stored[O.name])) ores_stored[O.name]++
O.loc = null
if(!isnull(ores_stored[O.material]))
ores_stored[O.material]++
del(O)
if(!active)
return
@@ -206,7 +209,7 @@
var/can_make = Clamp(ores_stored[metal],0,sheets_per_tick-sheets)
if(can_make%2>0) can_make--
var/material/M = name_to_mineral[O.compresses_to]
var/material/M = name_to_material[O.compresses_to]
if(!istype(M) || !can_make || ores_stored[metal] < 1)
continue
@@ -220,7 +223,7 @@
var/can_make = Clamp(ores_stored[metal],0,sheets_per_tick-sheets)
var/material/M = name_to_mineral[O.smelts_to]
var/material/M = name_to_material[O.smelts_to]
if(!istype(M) || !can_make || ores_stored[metal] < 1)
continue

View File

@@ -26,7 +26,7 @@
new /obj/item/device/flashlight/lantern(src)
new /obj/item/weapon/shovel(src)
new /obj/item/weapon/pickaxe(src)
new /obj/item/clothing/glasses/minerals(src)
new /obj/item/clothing/glasses/material(src)
/******************************Lantern*******************************/

View File

@@ -5,15 +5,22 @@
mouse_opacity = 0
density = 0
anchored = 1
var/ore_key
var/image/scanner_image
/obj/effect/mineral/New(var/newloc, var/ore/M)
..(newloc)
name = "[M.display_name] deposit"
icon_state = "rock_[M.name]"
ore_key = M.name
icon_state = "rock_[ore_key]"
var/turf/T = get_turf(src)
layer = T.layer+0.1
var/ore/O = ore_data[M.name]
if(O)
scanner_image = image(icon, loc = get_turf(src), icon_state = (O.scan_icon ? O.scan_icon : icon_state))
/obj/effect/mineral/proc/get_scan_overlay()
if(!scanner_image)
var/ore/O = ore_data[ore_key]
if(O)
scanner_image = image(icon, loc = get_turf(src), icon_state = (O.scan_icon ? O.scan_icon : icon_state))
else
world << "No ore data for [src]!"
return scanner_image

View File

@@ -1,96 +0,0 @@
var/list/name_to_mineral
/proc/SetupMinerals()
name_to_mineral = list()
for(var/type in typesof(/material) - /material)
var/material/new_mineral = new type
if(!new_mineral.name)
continue
name_to_mineral[lowertext(new_mineral.name)] = new_mineral
return 1
/material
var/name // Tag for use in overlay generation/list population .
var/walltype_solid
var/walltype_false
var/doortype
var/stack_type
var/unmeltable
var/cut_delay
/material/uranium
name = "uranium"
walltype_solid = /turf/simulated/wall/mineral/uranium
walltype_false = /obj/structure/falsewall/uranium
doortype = /obj/machinery/door/airlock/uranium
stack_type = /obj/item/stack/sheet/mineral/uranium
/material/diamond
name = "diamond"
walltype_solid = /turf/simulated/wall/mineral/diamond
walltype_false = /obj/structure/falsewall/diamond
doortype = /obj/machinery/door/airlock/diamond
stack_type = /obj/item/stack/sheet/mineral/diamond
unmeltable = 1
cut_delay = 60
/material/gold
name = "gold"
walltype_solid = /turf/simulated/wall/mineral/gold
walltype_false = /obj/structure/falsewall/gold
doortype = /obj/machinery/door/airlock/gold
stack_type = /obj/item/stack/sheet/mineral/gold
/material/silver
name = "silver"
walltype_solid = /turf/simulated/wall/mineral/silver
walltype_false = /obj/structure/falsewall/silver
doortype = /obj/machinery/door/airlock/silver
stack_type = /obj/item/stack/sheet/mineral/silver
/material/phoron
name = "phoron"
walltype_solid = /turf/simulated/wall/mineral/phoron
walltype_false = /obj/structure/falsewall/phoron
doortype = /obj/machinery/door/airlock/phoron
stack_type = /obj/item/stack/sheet/mineral/phoron
/material/sandstone
name = "sandstone"
walltype_solid = /turf/simulated/wall/mineral/sandstone
walltype_false = /obj/structure/falsewall/sandstone
stack_type = /obj/item/stack/sheet/mineral/sandstone
/material/steel
name = "steel"
stack_type = /obj/item/stack/sheet/metal
walltype_solid = /turf/simulated/wall
walltype_false = /obj/structure/falsewall
/material/glass
name = "glass"
stack_type = /obj/item/stack/sheet/glass
/material/plastic
name = "plastic"
stack_type = /obj/item/stack/sheet/mineral/plastic
/material/osmium
name = "osmium"
stack_type = /obj/item/stack/sheet/mineral/osmium
/material/tritium
name = "tritium"
stack_type = /obj/item/stack/sheet/mineral/tritium
/material/mhydrogen
name = "mhydrogen"
stack_type = /obj/item/stack/sheet/mineral/mhydrogen
/material/platinum
name = "platinum"
stack_type = /obj/item/stack/sheet/mineral/platinum
/material/iron
name = "iron"
stack_type = /obj/item/stack/sheet/mineral/iron

View File

@@ -4,71 +4,71 @@
icon_state = "ore2"
w_class = 2
var/datum/geosample/geologic_data
var/mineral
var/material
/obj/item/weapon/ore/uranium
name = "pitchblende"
icon_state = "ore_uranium"
origin_tech = "materials=5"
mineral = "uranium"
material = "uranium"
/obj/item/weapon/ore/iron
name = "hematite"
icon_state = "ore_iron"
origin_tech = "materials=1"
mineral = "hematite"
material = "hematite"
/obj/item/weapon/ore/coal
name = "carbonaceous rock"
name = "raw carbon"
icon_state = "ore_coal"
origin_tech = "materials=1"
mineral = "coal"
material = "carbon"
/obj/item/weapon/ore/glass
name = "impure silicates"
icon_state = "ore_glass"
origin_tech = "materials=1"
mineral = "sand"
material = "sand"
/obj/item/weapon/ore/phoron
name = "phoron crystals"
icon_state = "ore_phoron"
origin_tech = "materials=2"
mineral = "phoron"
material = "phoron"
/obj/item/weapon/ore/silver
name = "native silver ore"
icon_state = "ore_silver"
origin_tech = "materials=3"
mineral = "silver"
material = "silver"
/obj/item/weapon/ore/gold
name = "native gold ore"
icon_state = "ore_gold"
origin_tech = "materials=4"
mineral = "gold"
material = "gold"
/obj/item/weapon/ore/diamond
name = "diamonds"
icon_state = "ore_diamond"
origin_tech = "materials=6"
mineral = "diamond"
material = "diamond"
/obj/item/weapon/ore/osmium
name = "raw platinum"
icon_state = "ore_platinum"
mineral = "platinum"
material = "platinum"
/obj/item/weapon/ore/hydrogen
name = "raw hydrogen"
icon_state = "ore_hydrogen"
mineral = "mhydrogen"
material = "mhydrogen"
/obj/item/weapon/ore/slag
name = "Slag"
desc = "Someone screwed up..."
icon_state = "slag"
mineral = "slag"
material = null
/obj/item/weapon/ore/New()
pixel_x = rand(0,16)-8

View File

@@ -38,7 +38,7 @@ var/global/list/ore_data = list()
xarch_source_mineral = "potassium"
/ore/hematite
name = "iron"
name = "hematite"
display_name = "hematite"
smelts_to = "iron"
alloy = 1
@@ -48,8 +48,8 @@ var/global/list/ore_data = list()
scan_icon = "mineral_common"
/ore/coal
name = "coal"
display_name = "carbonaceous rock"
name = "carbon"
display_name = "raw carbon"
smelts_to = "plastic"
alloy = 1
result_amount = 5
@@ -105,7 +105,7 @@ var/global/list/ore_data = list()
)
/ore/diamond
name = "diamonds"
name = "diamond"
display_name = "diamond"
compresses_to = "diamond"
result_amount = 5

View File

@@ -134,13 +134,20 @@
return
// OBJ CHECK
var/cannot_melt
if(isobj(O))
var/obj/I = O
if(I.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
src << "<span class='alium'>You cannot dissolve this object.</span>"
return
// TURF CHECK
else if(istype(O, /turf/simulated/wall/r_wall) || istype(O, /turf/simulated/floor/engine))
if(I.unacidable)
cannot_melt = 1
else
if(istype(O, /turf/simulated/wall))
var/turf/simulated/wall/W = O
if(W.material.unmeltable)
cannot_melt = 1
else if(istype(O, /turf/simulated/floor/engine))
cannot_melt = 1
if(cannot_melt)
src << "<span class='alium'>You cannot dissolve this object.</span>"
return

View File

@@ -16,10 +16,7 @@
/obj/item/weapon/airlock_electronics,
/obj/item/weapon/module/power_control,
/obj/item/weapon/stock_parts,
/obj/item/light_fixture_frame,
/obj/item/apc_frame,
/obj/item/alarm_frame,
/obj/item/firealarm_frame,
/obj/item/frame,
/obj/item/weapon/table_parts,
/obj/item/weapon/table_parts/rack,
/obj/item/weapon/camera_assembly,

View File

@@ -137,10 +137,9 @@
proc/AttemptToEat(var/atom/target)
if(istype(target,/turf/simulated/wall))
if((!istype(target,/turf/simulated/wall/r_wall) && eatingDuration >= 100) || eatingDuration >= 200) //need 20 ticks to eat an rwall, 10 for a regular one
var/turf/simulated/wall/wall = target
wall.ChangeTurf(/turf/simulated/floor)
new /obj/item/stack/sheet/metal(src, flatPlasmaValue)
var/turf/simulated/wall/W = target
if((!W.reinf_material && eatingDuration >= 100) || eatingDuration >= 200) //need 20 ticks to eat an rwall, 10 for a regular one
W.dismantle_wall()
return 1
else if(istype(target,/atom/movable))
if(istype(target,/mob) || eatingDuration >= 50) //5 ticks to eat stuff like airlocks

View File

@@ -9,64 +9,6 @@
#define LIGHT_BROKEN 2
#define LIGHT_BURNED 3
/obj/item/light_fixture_frame
name = "light fixture frame"
desc = "Used for building lights."
icon = 'icons/obj/lighting.dmi'
icon_state = "tube-construct-item"
flags = CONDUCT
var/fixture_type = "tube"
var/obj/machinery/light/newlight = null
var/sheets_refunded = 2
/obj/item/light_fixture_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded )
del(src)
return
..()
/obj/item/light_fixture_frame/proc/try_build(turf/on_wall)
if (get_dist(on_wall,usr)>1)
return
var/ndir = get_dir(usr,on_wall)
if (!(ndir in cardinal))
return
var/turf/loc = get_turf(usr)
if (!istype(loc, /turf/simulated/floor))
usr << "\red [src.name] cannot be placed on this spot."
return
usr << "Attaching [src] to the wall."
playsound(src.loc, 'sound/machines/click.ogg', 75, 1)
var/constrdir = usr.dir
var/constrloc = usr.loc
if (!do_after(usr, 30))
return
switch(fixture_type)
if("bulb")
newlight = new /obj/machinery/light_construct/small(constrloc)
if("tube")
newlight = new /obj/machinery/light_construct(constrloc)
newlight.dir = constrdir
newlight.fingerprints = src.fingerprints
newlight.fingerprintshidden = src.fingerprintshidden
newlight.fingerprintslast = src.fingerprintslast
usr.visible_message("[usr.name] attaches [src] to the wall.", \
"You attach [src] to the wall.")
del(src)
/obj/item/light_fixture_frame/small
name = "small light fixture frame"
desc = "Used for building small lights."
icon = 'icons/obj/lighting.dmi'
icon_state = "bulb-construct-item"
flags = CONDUCT
fixture_type = "bulb"
sheets_refunded = 1
/obj/machinery/light_construct
name = "light fixture frame"
desc = "A light fixture under construction."

View File

@@ -1,37 +1,3 @@
//frame assembly
/obj/item/rust_fuel_assembly_port_frame
name = "Fuel Assembly Port frame"
icon = 'icons/rust.dmi'
icon_state = "port2"
w_class = 4
flags = CONDUCT
/obj/item/rust_fuel_assembly_port_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/plasteel( get_turf(src.loc), 12 )
del(src)
return
..()
/obj/item/rust_fuel_assembly_port_frame/proc/try_build(turf/on_wall)
if (get_dist(on_wall,usr)>1)
return
var/ndir = get_dir(usr,on_wall)
if (!(ndir in cardinal))
return
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red Port cannot be placed on this spot."
return
if (A.requires_power == 0 || A.name == "Space")
usr << "\red Port cannot be placed in this area."
return
new /obj/machinery/rust_fuel_assembly_port(loc, ndir, 1)
del(src)
//construction steps
/obj/machinery/rust_fuel_assembly_port/New(turf/loc, var/ndir, var/building=0)
..()
@@ -122,7 +88,7 @@
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
if(do_after(user, 50))
if(!src || !WT.remove_fuel(3, user)) return
new /obj/item/rust_fuel_assembly_port_frame(loc)
new /obj/item/frame/rust/assembly(loc)
user.visible_message(\
"\red [src] has been cut away from the wall by [user.name].",\
"You detached the port frame.",\

View File

@@ -1,38 +1,3 @@
//frame assembly
/obj/item/rust_fuel_compressor_frame
name = "Fuel Compressor frame"
icon = 'icons/rust.dmi'
icon_state = "fuel_compressor0"
w_class = 4
flags = CONDUCT
/obj/item/rust_fuel_compressor_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/plasteel( get_turf(src.loc), 12 )
del(src)
return
..()
/obj/item/rust_fuel_compressor_frame/proc/try_build(turf/on_wall)
if (get_dist(on_wall,usr)>1)
return
var/ndir = get_dir(usr,on_wall)
if (!(ndir in cardinal))
return
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red Compressor cannot be placed on this spot."
return
if (A.requires_power == 0 || A.name == "Space")
usr << "\red Compressor cannot be placed in this area."
return
new /obj/machinery/rust_fuel_assembly_port(loc, ndir, 1)
del(src)
//construction steps
/obj/machinery/rust_fuel_compressor/New(turf/loc, var/ndir, var/building=0)
..()
@@ -149,7 +114,7 @@
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
if(do_after(user, 50))
if(!src || !WT.remove_fuel(3, user)) return
new /obj/item/rust_fuel_assembly_port_frame(loc)
new /obj/item/frame/rust(loc)
user.visible_message(\
"\red [src] has been cut away from the wall by [user.name].",\
"You detached the compressor frame.",\

View File

@@ -106,18 +106,19 @@
return 2
/turf/simulated/wall/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)
if(prob(75))
dismantle_wall()
return
if(current_size == STAGE_FOUR)
if(prob(30))
dismantle_wall()
/turf/simulated/wall/r_wall/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)
if(prob(30))
dismantle_wall()
if(!reinf_material)
if(current_size >= STAGE_FIVE)
if(prob(75))
dismantle_wall()
return
if(current_size == STAGE_FOUR)
if(prob(30))
dismantle_wall()
else
if(current_size >= STAGE_FIVE)
if(prob(30))
dismantle_wall()
/turf/space/singularity_act()
return

View File

@@ -45,12 +45,12 @@
var/chance = 0
if(istype(A, /turf/simulated/wall))
var/turf/simulated/wall/W = A
chance = round(damage/W.damage_cap*180)
chance = round(damage/W.material.integrity*180)
else if(istype(A, /obj/machinery/door))
var/obj/machinery/door/D = A
chance = round(damage/D.maxhealth*180)
if(D.glass) chance *= 2
else if(istype(A, /obj/structure/girder) || istype(A, /obj/structure/cultgirder))
else if(istype(A, /obj/structure/girder))
chance = 100
else if(istype(A, /obj/machinery) || istype(A, /obj/structure))
chance = 25

View File

@@ -1845,12 +1845,10 @@ datum
reaction_turf(var/turf/T, var/volume)
if(istype(T, /turf/simulated/wall))
var/turf/simulated/wall/W = T
if(W.rotting)
W.rotting = 0
for(var/obj/effect/E in W) if(E.name == "Wallrot") del E
for(var/mob/O in viewers(W, null))
O.show_message(text("\blue The fungi are completely dissolved by the solution!"), 1)
if(locate(/obj/effect/overlay/wallrot) in W)
for(var/obj/effect/overlay/wallrot/E in W)
del(E)
W.visible_message("<span class='notice'>The fungi are completely dissolved by the solution!</span>")
reaction_obj(var/obj/O, var/volume)
if(istype(O,/obj/effect/alien/weeds/))

View File

@@ -438,11 +438,11 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else if(href_list["lathe_ejectsheet"] && linked_lathe) //Causes the protolathe to eject a sheet of material
var/desired_num_sheets = text2num(href_list["amount"])
var/res_amount, type
var/material/M = name_to_mineral[href_list["lathe_ejectsheet"]]
var/material/M = name_to_material[href_list["lathe_ejectsheet"]]
if(istype(M))
type = M.stack_type
switch(name_to_mineral[href_list["lathe_ejectsheet"]])
switch(name_to_material[href_list["lathe_ejectsheet"]])
if("steel")
res_amount = "m_amount"
if("glass")

View File

@@ -917,3 +917,6 @@ var/list/be_special_flags = list(
#define STAGE_FOUR 7
#define STAGE_FIVE 9
#define STAGE_SUPER 11
#define WALL_CAN_OPEN 1
#define WALL_OPENING 2

View File

@@ -55,6 +55,9 @@ var/global/datum/global_init/init = new ()
// Set up roundstart seed list.
plant_controller = new()
// This is kinda important. Set up details of what the hell things are made of.
populate_material_list()
//Create the asteroid Z-level.
if(config.generate_asteroid)
new /datum/random_map(null,13,32,5,217,223)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

BIN
icons/turf/wall_masks.dmi Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 25 KiB

File diff suppressed because it is too large Load Diff