mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
- Fixes Issue 910
- Changed mineral walls, they have their own type by mineral instead of a variable - Now you can spawn the different mineral walls with the game panel - Fixed the examining in walls, they will now show the text on the 'desc' var There are still some stuff out there with mineral walls, ugly chunks of code that does the same thing, two vars that have the same value and stuff like that. All of that will be purged, but, as always, to be continued~ git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5061 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -296,10 +296,9 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
|
||||
spawn (0) target_tile.hotspot_expose(temperature, 400)
|
||||
for(var/obj/structure/falsewall/plasma/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.ReplaceWithMineralWall("plasma")
|
||||
T.ChangeTurf(/turf/simulated/wall/mineral/plasma/)
|
||||
del (F)
|
||||
for(var/turf/simulated/wall/mineral/W in range(3,src))
|
||||
if(mineral == "plasma")
|
||||
for(var/turf/simulated/wall/mineral/plasma/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/plasma/D in range(3,src))
|
||||
D.ignite(temperature/4)
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
if(!mineral || mineral == "metal")
|
||||
T.ChangeTurf(/turf/simulated/wall)
|
||||
else
|
||||
T.ReplaceWithMineralWall(mineral)
|
||||
T.ChangeTurf(text2path("/turf/simulated/wall/mineral/[mineral]"))
|
||||
del(src)
|
||||
|
||||
if( istype(W, /obj/item/weapon/weldingtool) )
|
||||
@@ -156,7 +156,7 @@
|
||||
if(!mineral)
|
||||
T.ChangeTurf(/turf/simulated/wall)
|
||||
else
|
||||
T.ReplaceWithMineralWall(mineral)
|
||||
T.ChangeTurf(text2path("/turf/simulated/wall/mineral/[mineral]"))
|
||||
if(mineral != "plasma")//Stupid shit keeps me from pushing the attackby() to plasma walls -Sieve
|
||||
T = get_turf(src)
|
||||
T.attackby(W,user)
|
||||
@@ -169,7 +169,7 @@
|
||||
if(!mineral)
|
||||
T.ChangeTurf(/turf/simulated/wall)
|
||||
else
|
||||
T.ReplaceWithMineralWall(mineral)
|
||||
T.ChangeTurf(text2path("/turf/simulated/wall/mineral/[mineral]"))
|
||||
if(mineral != "plasma")
|
||||
T = get_turf(src)
|
||||
T.attackby(W,user)
|
||||
@@ -181,7 +181,7 @@
|
||||
if(!mineral)
|
||||
T.ChangeTurf(/turf/simulated/wall)
|
||||
else
|
||||
T.ReplaceWithMineralWall(mineral)
|
||||
T.ChangeTurf(text2path("/turf/simulated/wall/mineral/[mineral]"))
|
||||
T = get_turf(src)
|
||||
T.attackby(W,user)
|
||||
del(src)
|
||||
@@ -191,7 +191,7 @@
|
||||
if(!mineral)
|
||||
T.ChangeTurf(/turf/simulated/wall)
|
||||
else
|
||||
T.ReplaceWithMineralWall(mineral)
|
||||
T.ChangeTurf(text2path("/turf/simulated/wall/mineral/[mineral]"))
|
||||
if(mineral != "plasma")
|
||||
T = get_turf(src)
|
||||
T.attackby(W,user)
|
||||
@@ -308,8 +308,7 @@
|
||||
active = 1
|
||||
for(var/mob/living/L in range(3,src))
|
||||
L.apply_effect(12,IRRADIATE,0)
|
||||
for(var/turf/simulated/wall/mineral/T in range(3,src))
|
||||
if(T.mineral == "uranium")
|
||||
for(var/turf/simulated/wall/mineral/uranium/T in range(3,src))
|
||||
T.radiate()
|
||||
last_event = world.time
|
||||
active = null
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
S.use(2)
|
||||
user << "\blue You added the plating!"
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ReplaceWithMineralWall("gold")
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall/mineral/gold)
|
||||
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
|
||||
P.layer = 1
|
||||
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
|
||||
@@ -162,7 +162,7 @@
|
||||
S.use(2)
|
||||
user << "\blue You added the plating!"
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ReplaceWithMineralWall("silver")
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall/mineral/silver)
|
||||
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
|
||||
P.layer = 1
|
||||
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
|
||||
@@ -185,7 +185,7 @@
|
||||
S.use(2)
|
||||
user << "\blue You added the plating!"
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ReplaceWithMineralWall("diamond")
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall/mineral/diamond)
|
||||
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
|
||||
P.layer = 1
|
||||
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
|
||||
@@ -208,7 +208,7 @@
|
||||
S.use(2)
|
||||
user << "\blue You added the plating!"
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ReplaceWithMineralWall("uranium")
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall/mineral/uranium)
|
||||
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
|
||||
P.layer = 1
|
||||
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
|
||||
@@ -231,7 +231,7 @@
|
||||
S.use(2)
|
||||
user << "\blue You added the plating!"
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ReplaceWithMineralWall("plasma")
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall/mineral/plasma)
|
||||
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
|
||||
P.layer = 1
|
||||
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
|
||||
@@ -254,7 +254,7 @@
|
||||
S.use(2)
|
||||
user << "\blue You added the plating!"
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ReplaceWithMineralWall("clown")
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall/mineral/clown)
|
||||
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
|
||||
P.layer = 1
|
||||
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
|
||||
@@ -277,7 +277,7 @@
|
||||
S.use(2)
|
||||
user << "\blue You added the plating!"
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ReplaceWithMineralWall("sandstone")
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall/mineral/sandstone)
|
||||
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
|
||||
P.layer = 1
|
||||
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
/turf/simulated/wall/examine()
|
||||
set src in oview(1)
|
||||
|
||||
usr << "It looks like a regular wall."
|
||||
usr << "[desc]."
|
||||
return
|
||||
|
||||
/turf/simulated/wall/ex_act(severity)
|
||||
|
||||
@@ -5,91 +5,93 @@
|
||||
var/last_event = 0
|
||||
var/active = null
|
||||
|
||||
/turf/simulated/wall/mineral/New()
|
||||
switch(mineral)
|
||||
if("gold")
|
||||
/turf/simulated/wall/mineral/gold
|
||||
name = "gold wall"
|
||||
desc = "A wall with gold plating. Swag!"
|
||||
icon_state = "gold0"
|
||||
walltype = "gold"
|
||||
mineral = "gold"
|
||||
//var/electro = 1
|
||||
//var/shocked = null
|
||||
if("silver")
|
||||
|
||||
/turf/simulated/wall/mineral/silver
|
||||
name = "silver wall"
|
||||
desc = "A wall with silver plating. Shiny!"
|
||||
icon_state = "silver0"
|
||||
walltype = "silver"
|
||||
//var/electro = 0.75
|
||||
//var/shocked = null
|
||||
if("diamond")
|
||||
|
||||
/turf/simulated/wall/mineral/diamond
|
||||
name = "diamond wall"
|
||||
desc = "A wall with diamond plating. You monster."
|
||||
icon_state = "diamond0"
|
||||
walltype = "diamond"
|
||||
if("uranium")
|
||||
name = "uranium wall"
|
||||
desc = "A wall with uranium plating. This is probably a bad idea."
|
||||
icon_state = "uranium0"
|
||||
walltype = "uranium"
|
||||
if("plasma")
|
||||
name = "plasma wall"
|
||||
desc = "A wall with plasma plating. This is definately a bad idea."
|
||||
icon_state = "plasma0"
|
||||
walltype = "plasma"
|
||||
if("clown")
|
||||
mineral = "diamond"
|
||||
|
||||
/turf/simulated/wall/mineral/clown
|
||||
name = "bananium wall"
|
||||
desc = "A wall with bananium plating. Honk!"
|
||||
icon_state = "clown0"
|
||||
walltype = "clown"
|
||||
if("sandstone")
|
||||
mineral = "clown"
|
||||
|
||||
/turf/simulated/wall/mineral/sandstone
|
||||
name = "sandstone wall"
|
||||
desc = "A wall with sandstone plating."
|
||||
icon_state = "sandstone0"
|
||||
walltype = "sandstone"
|
||||
..()
|
||||
mineral = "sandstone"
|
||||
|
||||
/turf/simulated/wall/mineral/proc/radiate()
|
||||
/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"
|
||||
mineral = "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/T in range(3,src))
|
||||
if(T.mineral == "uranium")
|
||||
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/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/attack_hand(mob/user as mob)
|
||||
if(mineral == "uranium")
|
||||
/turf/simulated/wall/mineral/uranium/attack_hand(mob/user as mob)
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/turf/simulated/wall/mineral/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if((mineral == "plasma") && W)
|
||||
/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/plasma
|
||||
name = "plasma wall"
|
||||
desc = "A wall with plasma plating. This is definately a bad idea."
|
||||
icon_state = "plasma0"
|
||||
walltype = "plasma"
|
||||
mineral = "plasma"
|
||||
|
||||
/turf/simulated/wall/mineral/plasma/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
|
||||
if(mineral == "uranium")
|
||||
radiate()
|
||||
|
||||
// if((mineral == "gold") || (mineral == "silver"))
|
||||
// if(shocked)
|
||||
// shock()
|
||||
..()
|
||||
|
||||
/turf/simulated/wall/mineral/proc/PlasmaBurn(temperature)
|
||||
/turf/simulated/wall/mineral/plasma/proc/PlasmaBurn(temperature)
|
||||
spawn(2)
|
||||
new /obj/structure/girder(src)
|
||||
src.ChangeTurf(/turf/simulated/floor)
|
||||
@@ -104,33 +106,34 @@
|
||||
spawn (0) target_tile.hotspot_expose(temperature, 400)
|
||||
for(var/obj/structure/falsewall/plasma/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.ReplaceWithMineralWall("plasma")
|
||||
T.ChangeTurf(/turf/simulated/wall/mineral/plasma/)
|
||||
del (F)
|
||||
for(var/turf/simulated/wall/mineral/W in range(3,src))
|
||||
if(mineral == "plasma")
|
||||
for(var/turf/simulated/wall/mineral/plasma/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/plasma/D in range(3,src))
|
||||
D.ignite(temperature/4)
|
||||
|
||||
/turf/simulated/wall/mineral/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)//Doesn't fucking work because walls don't interact with air :(
|
||||
if(mineral == "plasma")
|
||||
/turf/simulated/wall/mineral/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)//Doesn't fucking work because walls don't interact with air :(
|
||||
if(exposed_temperature > 300)
|
||||
PlasmaBurn(exposed_temperature)
|
||||
|
||||
/turf/simulated/wall/mineral/proc/ignite(exposed_temperature)
|
||||
if(mineral == "plasma")
|
||||
/turf/simulated/wall/mineral/plasma/proc/ignite(exposed_temperature)
|
||||
if(exposed_temperature > 300)
|
||||
PlasmaBurn(exposed_temperature)
|
||||
|
||||
/turf/simulated/wall/mineral/Bumped(AM as mob|obj)
|
||||
if(mineral == "uranium")
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/turf/simulated/wall/mineral/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(mineral == "plasma")
|
||||
/turf/simulated/wall/mineral/plasma/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(istype(Proj,/obj/item/projectile/beam))
|
||||
PlasmaBurn(2500)
|
||||
else if(istype(Proj,/obj/item/projectile/ion))
|
||||
PlasmaBurn(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
|
||||
*/
|
||||
@@ -217,9 +217,8 @@
|
||||
|
||||
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
|
||||
|
||||
if(N in typesof(/turf/simulated))
|
||||
if(N in typesof(/turf/simulated/floor))
|
||||
var/turf/simulated/W = new N( locate(src.x, src.y, src.z) )
|
||||
|
||||
W.Assimilate_Air()
|
||||
|
||||
W.lighting_lumcount += old_lumcount
|
||||
@@ -234,7 +233,6 @@
|
||||
return W
|
||||
else
|
||||
var/turf/W = new N( locate(src.x, src.y, src.z) )
|
||||
|
||||
W.lighting_lumcount += old_lumcount
|
||||
if(old_lumcount != W.lighting_lumcount)
|
||||
W.lighting_changed = 1
|
||||
@@ -272,31 +270,10 @@
|
||||
air.toxins = (atox/max(turf_count,1))
|
||||
air.temperature = (atemp/max(turf_count,1))//Trace gases can get bant
|
||||
|
||||
/turf/proc/ReplaceWithFloor()
|
||||
return
|
||||
|
||||
/turf/proc/ReplaceWithLattice()
|
||||
src.ChangeTurf(/turf/space)
|
||||
new /obj/structure/lattice( locate(src.x, src.y, src.z) )
|
||||
|
||||
/turf/proc/ReplaceWithMineralWall(var/ore)
|
||||
var/old_icon = icon_state
|
||||
|
||||
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
|
||||
var/turf/simulated/wall/mineral/S = new /turf/simulated/wall/mineral( locate(src.x, src.y, src.z) )
|
||||
S.lighting_lumcount += old_lumcount
|
||||
if(old_lumcount != S.lighting_lumcount)
|
||||
S.lighting_changed = 1
|
||||
lighting_controller.changed_turfs += S
|
||||
|
||||
S.icon_old = old_icon
|
||||
S.mineral = ore
|
||||
S.New()//Hackish as fuck, but what can you do? -Sieve //build it into the goddamn new() call up there ^ ~Carn
|
||||
//e.g. new(turf/loc, mineral)
|
||||
S.levelupdate()
|
||||
return S
|
||||
|
||||
|
||||
/turf/proc/kill_creatures(mob/U = null)//Will kill people/creatures and damage mechs./N
|
||||
//Useful to batch-add creatures to the list.
|
||||
for(var/mob/living/M in src)
|
||||
|
||||
@@ -1524,6 +1524,13 @@
|
||||
if(target)
|
||||
for (var/path in paths)
|
||||
for (var/i = 0; i < number; i++)
|
||||
if(path in typesof(/turf))
|
||||
var/turf/O = target
|
||||
var/turf/N = O.ChangeTurf(path)
|
||||
if(N)
|
||||
if(obj_name)
|
||||
N.name = obj_name
|
||||
else
|
||||
var/atom/O = new path(target)
|
||||
if(O)
|
||||
O.dir = obj_dir
|
||||
@@ -1533,8 +1540,6 @@
|
||||
var/mob/M = O
|
||||
M.real_name = obj_name
|
||||
|
||||
|
||||
|
||||
if (number == 1)
|
||||
log_admin("[key_name(usr)] created a [english_list(paths)]")
|
||||
for(var/path in paths)
|
||||
|
||||
@@ -171,6 +171,8 @@
|
||||
spreadChance = 0
|
||||
spread = 0
|
||||
|
||||
/*
|
||||
commented out in r5061, I left it because of the shroom thingies
|
||||
|
||||
/turf/simulated/mineral/ReplaceWithFloor()
|
||||
if(!icon_old) icon_old = icon_state
|
||||
@@ -197,7 +199,7 @@
|
||||
W.fullUpdateMineralOverlays()
|
||||
W.levelupdate()
|
||||
return W
|
||||
|
||||
*/
|
||||
|
||||
/turf/simulated/mineral/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
@@ -248,7 +250,8 @@
|
||||
new /obj/item/weapon/ore/diamond(src)
|
||||
if (src.mineralName == "Clown")
|
||||
new /obj/item/weapon/ore/clown(src)
|
||||
ReplaceWithFloor()
|
||||
var/turf/simulated/floor/plating/airless/asteroid/N = ChangeTurf(/turf/simulated/floor/plating/airless/asteroid)
|
||||
N.fullUpdateMineralOverlays()
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user