LINDA, Stage 1

This commit ports the base system of LINDA from TG. This version of linda
is the original version, with none of -tg-'s fixes, rewrites, or other
such improvements attached.

The mob ignite system has been 100% removed, as LINDA does not support
this normally. It may be added back in when the improvements and refactors
to LINDA have been ported.
This commit is contained in:
Tigercat2000
2015-04-28 08:43:42 -07:00
parent 141577f3e9
commit 4f1053f5b7
121 changed files with 15821 additions and 15986 deletions
+5 -67
View File
@@ -6,68 +6,6 @@
// Also affects admin alerts.
#define FALSEDOOR_MAX_PRESSURE_DIFF 25.0
/**
* Gets the highest and lowest pressures from the tiles in cardinal directions
* around us, then checks the difference.
*/
/proc/getOPressureDifferential(var/turf/loc)
var/minp=16777216;
var/maxp=0;
for(var/dir in cardinal)
var/turf/simulated/T=get_turf(get_step(loc,dir))
var/cp=0
if(T && istype(T) && T.zone)
var/datum/gas_mixture/environment = T.return_air()
cp = environment.return_pressure()
else
if(istype(T,/turf/simulated))
continue
if(cp<minp)minp=cp
if(cp>maxp)maxp=cp
return abs(minp-maxp)
// Checks pressure here vs. around us.
/proc/performFalseWallPressureCheck(var/turf/loc)
var/turf/simulated/lT=loc
if(!istype(lT) || !lT.zone)
return 0
var/datum/gas_mixture/myenv=lT.return_air()
var/pressure=myenv.return_pressure()
for(var/dir in cardinal)
var/turf/simulated/T=get_turf(get_step(loc,dir))
if(T && istype(T) && T.zone)
var/datum/gas_mixture/environment = T.return_air()
var/pdiff = abs(pressure - environment.return_pressure())
if(pdiff > FALSEDOOR_MAX_PRESSURE_DIFF)
return pdiff
return 0
/proc/performWallPressureCheck(var/turf/loc)
var/pdiff = getOPressureDifferential(loc)
if(pdiff > FALSEDOOR_MAX_PRESSURE_DIFF)
return pdiff
return 0
/client/proc/pdiff()
set name = "Get PDiff"
set category = "Debug"
if(!mob || !holder)
return
var/turf/T = mob.loc
if (!( istype(T, /turf) ))
return
var/pdiff = getOPressureDifferential(T)
var/fwpcheck=performFalseWallPressureCheck(T)
var/wpcheck=performWallPressureCheck(T)
src << "Pressure Differential (cardinals): [pdiff]"
src << "FWPCheck: [fwpcheck]"
src << "WPCheck: [wpcheck]"
/obj/structure/falsewall
name = "wall"
desc = "A huge chunk of metal used to seperate rooms."
@@ -97,7 +35,7 @@
for(var/obj/structure/falsewall/W in range(temploc,1))
W.relativewall()
..()
/obj/structure/falsewall/relativewall()
if(!density)
@@ -140,7 +78,7 @@
SetOpacity(1)
update_icon()
opening = 0
/obj/structure/falsewall/proc/do_the_flick()
if(density)
flick("[walltype]fwall_opening", src)
@@ -154,7 +92,7 @@
relativewall()
else
icon_state = "[walltype]fwall_open"
/obj/structure/falsewall/proc/ChangeToWall(delete = 1)
var/turf/T = get_turf(src)
if(!walltype || walltype == "metal")
@@ -257,7 +195,7 @@
junction |= get_dir(src,W)
icon_state = "rwall[junction]"
return
/*
* Uranium Falsewalls
*/
@@ -321,7 +259,7 @@
desc = "A wall with plasma plating. This is definately a bad idea."
icon_state = ""
mineral = "plasma"
walltype = "plasma"
walltype = "plasma"
//-----------wtf?-----------start
/obj/structure/falsewall/clown
@@ -10,18 +10,6 @@
return 1
return 0
/obj/structure/window/full/update_nearby_tiles(need_rebuild)
if(!air_master) return 0
if(!loc) return 0
var/turf/simulated/source = get_turf(src)
if(istype(source))
air_master.tiles_to_update |= source
for(var/dir in cardinal)
var/turf/simulated/target = get_step(source,dir)
if(istype(target)) air_master.tiles_to_update |= target
return 1
/obj/structure/window/full/is_fulltile()
return 1
+16 -37
View File
@@ -71,17 +71,10 @@
if(/obj/item/stack/sheet/metal, /obj/item/stack/sheet/metal/cyborg)
if(!anchored)
if(S.amount < 2) return
var/pdiff=performWallPressureCheck(src.loc)
if(!pdiff)
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falsewall (src.loc)
del(src)
else
user << "\red There is too much air moving through the gap! The door wouldn't stay closed if you built it."
message_admins("Attempted false wall made by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)] had a pressure difference of [pdiff]!")
log_admin("Attempted false wall made by [user.real_name] (user.ckey) at [loc] had a pressure difference of [pdiff]!")
return
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falsewall (src.loc)
del(src)
else
if(S.amount < 2) return ..()
user << "\blue Now adding plating..."
@@ -99,17 +92,10 @@
if(/obj/item/stack/sheet/plasteel)
if(!anchored)
if(S.amount < 2) return
var/pdiff=performWallPressureCheck(src.loc)
if(!pdiff)
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falsewall/reinforced (src.loc)
del(src)
else
user << "\red There is too much air moving through the gap! The door wouldn't stay closed if you built it."
message_admins("Attempted false rwall made by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)] had a pressure difference of [pdiff]!")
log_admin("Attempted false rwall made by [user.real_name] ([user.ckey]) at [loc] had a pressure difference of [pdiff]!")
return
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falsewall/reinforced (src.loc)
del(src)
else
if (src.icon_state == "reinforced") //I cant believe someone would actually write this line of code...
if(S.amount < 1) return ..()
@@ -139,18 +125,11 @@
var/M = S.sheettype
if(!anchored)
if(S.amount < 2) return
var/pdiff=performWallPressureCheck(src.loc)
if(!pdiff)
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
var/F = text2path("/obj/structure/falsewall/[M]")
new F (src.loc)
del(src)
else
user << "\red There is too much air moving through the gap! The door wouldn't stay closed if you built it."
message_admins("Attempted false [M] wall made by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)] had a pressure difference of [pdiff]!")
log_admin("Attempted false [M] wall made by [user.real_name] ([user.ckey]) at [loc] had a pressure difference of [pdiff]!")
return
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
var/F = text2path("/obj/structure/falsewall/[M]")
new F (src.loc)
del(src)
else
if(S.amount < 2) return ..()
user << "\blue Now adding plating..."
@@ -187,7 +166,7 @@
if(health <= 0)
new /obj/item/stack/sheet/metal(get_turf(src))
del(src)
if(istype(Proj ,/obj/item/projectile/beam/pulse))
src.ex_act(2)
..()
@@ -248,7 +227,7 @@
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
user << "\blue You drill through the girder!"
dismantle()
/obj/structure/cultgirder/proc/dismantle()
new /obj/effect/decal/remains/human(get_turf(src))
qdel(src)
@@ -256,7 +235,7 @@
/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?????
health -= Proj.damage
..()
+3 -3
View File
@@ -28,10 +28,10 @@
New(location)
..()
update_nearby_tiles(need_rebuild=1)
air_update_turf()
Del()
update_nearby_tiles()
air_update_turf()
..()
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
@@ -217,7 +217,7 @@
Close()
else
Open()
update_nearby_tiles()
air_update_turf()
proc/Open()
isSwitchingStates = 1
+17 -22
View File
@@ -20,12 +20,17 @@
..()
icon_state = mineralType
name = "[mineralType] door"
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
Destroy()
update_nearby_tiles()
air_update_turf(1)
..()
Move()
air_update_turf(1)
..()
air_update_turf(1)
Bumped(atom/user)
..()
if(!state)
@@ -51,6 +56,9 @@
return !opacity
return !density
CanAtmosPass()
return !density
proc/TryToSwitchState(atom/user)
if(isSwitchingStates) return
if(ismob(user))
@@ -82,7 +90,7 @@
state = 1
update_icon()
isSwitchingStates = 0
update_nearby_tiles()
air_update_turf()
proc/Close()
isSwitchingStates = 1
@@ -94,7 +102,7 @@
state = 0
update_icon()
isSwitchingStates = 0
update_nearby_tiles()
air_update_turf()
update_icon()
if(state)
@@ -187,34 +195,21 @@
/obj/structure/mineral_door/transparent/plasma
mineralType = "plasma"
/*
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
TemperatureAct(100)
..()
fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
TemperatureAct(exposed_temperature)
proc/TemperatureAct(temperature)
for(var/turf/simulated/floor/target_tile in range(2,loc))
var/datum/gas_mixture/napalm = new
var/toxinsToDeduce = temperature/10
napalm.toxins = toxinsToDeduce
napalm.temperature = 200+T0C
target_tile.assume_air(napalm)
spawn (0) target_tile.hotspot_expose(temperature, 400)
hardness -= toxinsToDeduce/100
CheckHardness()
*/
atmos_spawn_air("fire", 500)
hardness = 0
CheckHardness()
/obj/structure/mineral_door/transparent/diamond
mineralType = "diamond"
@@ -73,7 +73,6 @@
// Chair types
/obj/structure/stool/bed/chair/wood
autoignition_temperature = AUTOIGNITION_WOOD
// TODO: Special ash subtype that looks like charred chair legs
/obj/structure/stool/bed/chair/wood/normal
@@ -561,7 +561,6 @@
icon_state = "wood_table"
parts = /obj/item/weapon/table_parts/wood
health = 50
autoignition_temperature = AUTOIGNITION_WOOD // TODO: Special ash subtype that looks like charred table legs.
/obj/structure/table/woodentable/attackby(obj/item/I as obj, mob/user as mob, params)
+65 -69
View File
@@ -205,80 +205,76 @@
/obj/machinery/shower/proc/wash(atom/movable/O as obj|mob)
if(!on) return
if(isliving(O))
var/mob/living/L = O
L.ExtinguishMob()
L.fire_stacks = -20 //Douse ourselves with water to avoid fire more easily
L << "<span class='warning'>You've been drenched in water!</span>"
if(iscarbon(O))
var/mob/living/carbon/M = O
if(M.r_hand)
M.r_hand.clean_blood()
if(M.l_hand)
M.l_hand.clean_blood()
if(M.back)
if(M.back.clean_blood())
M.update_inv_back(0)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/washgloves = 1
var/washshoes = 1
var/washmask = 1
var/washears = 1
var/washglasses = 1
if(iscarbon(O))
var/mob/living/carbon/M = O
M << "<span class='warning'>You've been drenched in water!</span>"
if(M.r_hand)
M.r_hand.clean_blood()
if(M.l_hand)
M.l_hand.clean_blood()
if(M.back)
if(M.back.clean_blood())
M.update_inv_back(0)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/washgloves = 1
var/washshoes = 1
var/washmask = 1
var/washears = 1
var/washglasses = 1
if(H.wear_suit)
washgloves = !(H.wear_suit.flags_inv & HIDEGLOVES)
washshoes = !(H.wear_suit.flags_inv & HIDESHOES)
if(H.wear_suit)
washgloves = !(H.wear_suit.flags_inv & HIDEGLOVES)
washshoes = !(H.wear_suit.flags_inv & HIDESHOES)
if(H.head)
washmask = !(H.head.flags_inv & HIDEMASK)
washglasses = !(H.head.flags_inv & HIDEEYES)
washears = !(H.head.flags_inv & HIDEEARS)
if(H.head)
washmask = !(H.head.flags_inv & HIDEMASK)
washglasses = !(H.head.flags_inv & HIDEEYES)
washears = !(H.head.flags_inv & HIDEEARS)
if(H.wear_mask)
if (washears)
washears = !(H.wear_mask.flags_inv & HIDEEARS)
if (washglasses)
washglasses = !(H.wear_mask.flags_inv & HIDEEYES)
if(H.head)
if(H.head.clean_blood())
H.update_inv_head(0,0)
if(H.wear_suit)
if(H.wear_suit.clean_blood())
H.update_inv_wear_suit(0,0)
else if(H.w_uniform)
if(H.w_uniform.clean_blood())
H.update_inv_w_uniform(0,0)
if(H.gloves && washgloves)
if(H.gloves.clean_blood())
H.update_inv_gloves(0,0)
if(H.shoes && washshoes)
if(H.shoes.clean_blood())
H.update_inv_shoes(0,0)
if(H.wear_mask && washmask)
if(H.wear_mask.clean_blood())
H.update_inv_wear_mask(0)
if(H.glasses && washglasses)
if(H.glasses.clean_blood())
H.update_inv_glasses(0)
if(H.l_ear && washears)
if(H.l_ear.clean_blood())
H.update_inv_ears(0)
if(H.r_ear && washears)
if(H.r_ear.clean_blood())
H.update_inv_ears(0)
if(H.belt)
if(H.belt.clean_blood())
H.update_inv_belt(0)
else
if(M.wear_mask) //if the mob is not human, it cleans the mask without asking for bitflags
if(M.wear_mask.clean_blood())
M.update_inv_wear_mask(0)
if(H.wear_mask)
if (washears)
washears = !(H.wear_mask.flags_inv & HIDEEARS)
if (washglasses)
washglasses = !(H.wear_mask.flags_inv & HIDEEYES)
if(H.head)
if(H.head.clean_blood())
H.update_inv_head(0,0)
if(H.wear_suit)
if(H.wear_suit.clean_blood())
H.update_inv_wear_suit(0,0)
else if(H.w_uniform)
if(H.w_uniform.clean_blood())
H.update_inv_w_uniform(0,0)
if(H.gloves && washgloves)
if(H.gloves.clean_blood())
H.update_inv_gloves(0,0)
if(H.shoes && washshoes)
if(H.shoes.clean_blood())
H.update_inv_shoes(0,0)
if(H.wear_mask && washmask)
if(H.wear_mask.clean_blood())
H.update_inv_wear_mask(0)
if(H.glasses && washglasses)
if(H.glasses.clean_blood())
H.update_inv_glasses(0)
if(H.l_ear && washears)
if(H.l_ear.clean_blood())
H.update_inv_ears(0)
if(H.r_ear && washears)
if(H.r_ear.clean_blood())
H.update_inv_ears(0)
if(H.belt)
if(H.belt.clean_blood())
H.update_inv_belt(0)
else
O.clean_blood()
if(M.wear_mask) //if the mob is not human, it cleans the mask without asking for bitflags
if(M.wear_mask.clean_blood())
M.update_inv_wear_mask(0)
else
O.clean_blood()
if(isturf(loc))
var/turf/tile = loc
@@ -30,20 +30,32 @@ obj/structure/windoor_assembly
obj/structure/windoor_assembly/New(dir=NORTH)
..()
src.ini_dir = src.dir
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
obj/structure/windoor_assembly/Destroy()
density = 0
update_nearby_tiles()
air_update_turf(1)
..()
/obj/structure/windoor_assembly/Move()
air_update_turf(1)
..()
air_update_turf(1)
/obj/structure/windoor_assembly/update_icon()
icon_state = "[facing]_[secure ? "secure_" : ""]windoor_assembly[state]"
/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target, height=0)
/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
if(air_group) return 0
return !density
else
return 1
/obj/structure/windoor_assembly/CanAtmosPass(var/turf/T)
if(get_dir(loc, T) == dir)
return !density
else
return 1
+19 -63
View File
@@ -60,13 +60,9 @@ var/global/wcColored
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
health -= Proj.damage
update_nearby_icons()
air_update_turf(1)
..()
if(health <= 0)
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window destroyed by [Proj.firer.name] ([formatPlayerPanel(Proj.firer,Proj.firer.ckey)]) via \an [Proj]! pdiff = [pdiff] at [formatJumpTo(loc)]!")
log_admin("Window destroyed by ([Proj.firer.ckey]) via \an [Proj]! pdiff = [pdiff] at [loc]!")
destroy()
return
@@ -118,11 +114,7 @@ var/global/wcColored
..()
visible_message("<span class='danger'>[src] was hit by [AM].</span>")
var/tforce = 0
var/mob/M=null
if(ismob(AM))
tforce = 40
M=AM
else if(isobj(AM))
if(isobj(AM))
var/obj/item/I = AM
tforce = I.throwforce
if(reinf) tforce *= 0.25
@@ -132,23 +124,7 @@ var/global/wcColored
anchored = 0
update_nearby_icons()
step(src, get_dir(AM, src))
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
if(M)
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] deanchored by [M.real_name][isAntag(M) ? "(ANTAG)" : ""] ([formatPlayerPanel(M,M.ckey)])!")
log_admin("Window with pdiff [pdiff] at [loc] deanchored by [M.real_name] ([M.ckey])!")
else
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] deanchored by [AM]!")
log_admin("Window with pdiff [pdiff] at [loc] deanchored by [AM]!")
if(health <= 0)
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
if(M)
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] destroyed by [M.real_name][isAntag(M) ? "(ANTAG)" : ""] ([formatPlayerPanel(M,M.ckey)])!")
log_admin("Window with pdiff [pdiff] at [loc] destroyed by [M.real_name] ([M.ckey])!")
else
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] destroyed by [AM]!")
log_admin("Window with pdiff [pdiff] at [loc] destroyed by [AM]!")
destroy()
@@ -156,10 +132,6 @@ var/global/wcColored
if(HULK in user.mutations)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window destroyed by hulk [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) with pdiff [pdiff] at [formatJumpTo(loc)]!")
log_admin("Window destroyed by hulk [user.real_name] ([user.ckey]) with pdiff [pdiff] at [loc]!")
destroy()
else if (usr.a_intent == "harm")
user.changeNext_move(CLICK_CD_MELEE)
@@ -185,9 +157,6 @@ var/global/wcColored
health -= damage
if(health <= 0)
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window destroyed by [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) with pdiff [pdiff] at [formatJumpTo(loc)]!")
destroy()
else //for nicer text~
user.visible_message("<span class='danger'>[user] smashes into [src]!</span>")
@@ -255,21 +224,11 @@ var/global/wcColored
update_nearby_icons()
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
user << (anchored ? "<span class='notice'>You have fastened the frame to the floor.</span>" : "<span class='notice'>You have unfastened the frame from the floor.</span>")
if(!anchored)
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
log_admin("Window with pdiff [pdiff] deanchored by [user.real_name] ([user.ckey]) at [loc]!")
else if(!reinf)
anchored = !anchored
update_nearby_icons()
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
user << (anchored ? "<span class='notice'>You have fastened the window to the floor.</span>" : "<span class='notice'>You have unfastened the window.</span>")
if(!anchored)
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
log_admin("Window with pdiff [pdiff] deanchored by [user.real_name] ([user.ckey]) at [loc]!")
else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <= 1)
state = 1 - state
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
@@ -297,7 +256,7 @@ var/global/wcColored
user << "<span class='notice'>You have disassembled the window.</span>"
disassembled = 1
density = 0
update_nearby_tiles()
air_update_turf(1)
update_nearby_icons()
del(src)
else
@@ -308,10 +267,6 @@ var/global/wcColored
anchored = 0
update_nearby_icons()
step(src, get_dir(user, src))
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
log_admin("Window with pdiff [pdiff] deanchored by [user.real_name] ([user.ckey]) at [loc]!")
else
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
..()
@@ -328,9 +283,6 @@ var/global/wcColored
if(sound_effect)
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
if(health <= 0)
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window with pdiff [pdiff] broken at [formatJumpTo(loc)]!")
destroy()
return
@@ -344,10 +296,9 @@ var/global/wcColored
usr << "It is fastened to the floor therefore you can't rotate it!"
return 0
update_nearby_tiles(need_rebuild=1) //Compel updates before
dir = turn(dir, 90)
// updateSilicate()
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
ini_dir = dir
return
@@ -361,10 +312,9 @@ var/global/wcColored
usr << "It is fastened to the floor therefore you can't rotate it!"
return 0
update_nearby_tiles(need_rebuild=1) //Compel updates before
dir = turn(dir, 270)
// updateSilicate()
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
ini_dir = dir
return
@@ -389,24 +339,23 @@ var/global/wcColored
ini_dir = dir
if(!color && !istype(src,/obj/structure/window/plasmabasic) && !istype(src,/obj/structure/window/plasmareinforced))
color = color_windows(src)
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
update_nearby_icons()
return
/obj/structure/window/Destroy()
density = 0
update_nearby_tiles()
air_update_turf(1)
if(loc && !disassembled)
playsound(get_turf(src), "shatter", 70, 1)
update_nearby_icons()
..()
/obj/structure/window/Move()
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
..()
dir = ini_dir
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
//checks if this window is full-tile one
/obj/structure/window/proc/is_fulltile()
@@ -414,7 +363,14 @@ var/global/wcColored
return 1
return 0
//This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc!
/obj/structure/window/CanAtmosPass(turf/T)
if(get_dir(loc, T) == dir)
return !density
if(dir == SOUTHWEST || dir == SOUTHEAST || dir == NORTHWEST || dir == NORTHEAST)
return !density
return 1
//This proc is used to update the icons of nearby windows.
/obj/structure/window/proc/update_nearby_icons()
if(!loc) return 0
update_icon()
@@ -447,7 +403,7 @@ var/global/wcColored
/obj/structure/window/plasmabasic/New(Loc,re=0)
..()
ini_dir = dir
update_nearby_tiles(need_rebuild=1)
air_update_turf()
update_nearby_icons()
return
@@ -470,7 +426,7 @@ var/global/wcColored
/obj/structure/window/plasmareinforced/New(Loc,re=0)
..()
ini_dir = dir
update_nearby_tiles(need_rebuild=1)
air_update_turf()
update_nearby_icons()
return