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
+1 -1
View File
@@ -120,7 +120,7 @@
if(istype(T))
var/datum/gas_mixture/payload = new
payload.toxins = 60
T.zone.air.merge(payload)
T.air.merge(payload)
T.hotspot_expose(1000, CELL_VOLUME)
/////////////////////
+10 -5
View File
@@ -171,7 +171,6 @@ steam.start() -- spawns the effect
..()
playsound(src.loc, "sparks", 100, 1)
var/turf/T = loc
if (istype(T, /turf))
T.hotspot_expose(1000, 100)
spawn (100)
@@ -1040,16 +1039,19 @@ steam.start() -- spawns the effect
New()
..()
update_nearby_tiles(1)
air_update_turf(1)
Destroy()
density = 0
update_nearby_tiles(1)
air_update_turf(1)
..()
Move()
air_update_turf(1)
..()
air_update_turf(1)
proc/updateicon()
if(metal == 1)
icon_state = "metalfoam"
@@ -1109,6 +1111,9 @@ steam.start() -- spawns the effect
if(air_group) return 0
return !density
CanAtmosPass()
return !density
/datum/effect/effect/system/reagents_explosion
var/amount // TNT equivalent
var/flashing = 0 // does explosion creates flash effect?
+2 -25
View File
@@ -46,35 +46,12 @@
del(src)
/obj/effect/mine/proc/triggern2o(obj)
//example: n2o triggerproc
//note: im lazy
for (var/turf/simulated/floor/target in range(1,src))
if(!target.blocks_air)
var/datum/gas_mixture/payload = new
var/datum/gas/sleeping_agent/trace_gas = new
trace_gas.moles = 30
payload += trace_gas
target.zone.air.merge(payload)
atmos_spawn_air("n2o", 360)
spawn(0)
del(src)
/obj/effect/mine/proc/triggerplasma(obj)
for (var/turf/simulated/floor/target in range(1,src))
if(!target.blocks_air)
var/datum/gas_mixture/payload = new
payload.toxins = 30
target.zone.air.merge(payload)
target.hotspot_expose(1000, CELL_VOLUME)
atmos_spawn_air("fire", 360)
spawn(0)
del(src)
@@ -110,11 +110,15 @@
icon = 'icons/mob/screen1.dmi'
icon_state = "x"
var/btype = 0 // 0=radio, 1=prox, 2=time
var/btemp1 = 1500
var/btemp2 = 1000 // tank temperatures
timer
btype = 2
syndicate
btemp1 = 150
btemp2 = 20
proximity
btype = 1
@@ -136,14 +140,8 @@
PT.master = V
OT.master = V
PT.air_contents.temperature = PLASMA_FLASHPOINT
PT.air_contents.toxins = 12
PT.air_contents.carbon_dioxide = 8
PT.air_contents.update_values()
OT.air_contents.temperature = PLASMA_FLASHPOINT
OT.air_contents.oxygen = 20
OT.air_contents.update_values()
PT.air_contents.temperature = btemp1 + T0C
OT.air_contents.temperature = btemp2 + T0C
var/obj/item/device/assembly/S
+4 -4
View File
@@ -1223,10 +1223,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (istype(A, /obj/machinery/atmospherics/pipe/tank))
var/obj/icon = A
for (var/mob/O in viewers(user, null))
O << "\red [user] has used [src] on \icon[icon] [A]"
var/obj/machinery/atmospherics/pipe/tank/T = A
for (var/mob/O in viewers(user, null))
O << "\red [user] has used [src] on \icon[icon] [T]"
var/pressure = T.parent.air.return_pressure()
var/total_moles = T.parent.air.total_moles()
@@ -1424,4 +1424,4 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/proc/JFLOG(message as text)
if (config)
log_pda("[JFLOG_DescribeSelf()] >>> [message]")
log_pda("[JFLOG_DescribeSelf()] >>> [message]")
-4
View File
@@ -96,10 +96,6 @@
if(iscarbon(M))
flash_carbon(M, user, 5, 1)
if(overcharged)
M.adjust_fire_stacks(6)
M.IgniteMob()
burn_out()
return 1
else if(issilicon(M))
@@ -30,7 +30,7 @@
icon_state = "sheet-glass"
g_amt = 0
created_window = /obj/structure/window/basic
/obj/item/stack/sheet/glass/full/New()
..()
amount = 50
@@ -106,6 +106,7 @@
W.ini_dir = W.dir
W.state = 0
W.anchored = 0
W.air_update_turf(1)
src.use(1)
if("Full Window")
if(!src) return 1
@@ -119,6 +120,7 @@
var/obj/structure/window/W = new full_window( user.loc, 0 )
W.state = 0
W.anchored = 0
W.air_update_turf(1)
src.use(2)
return 0
+1 -1
View File
@@ -6,7 +6,7 @@
icon = 'icons/obj/trash.dmi'
w_class = 1.0
desc = "This is rubbish."
autoignition_temperature = AUTOIGNITION_PAPER
raisins
name = "4no raisins"
icon_state= "4no_raisins"
@@ -163,9 +163,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/cigarette/process()
var/turf/location = get_turf(src)
var/mob/living/M = loc
if(isliving(loc))
M.IgniteMob()
smoketime--
if(smoketime < 1)
die()
@@ -452,7 +449,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/weapon/lighter/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!isliving(M))
return
M.IgniteMob()
// M.IgniteMob() //linda shit do later
if(!istype(M, /mob))
return
@@ -34,7 +34,7 @@
m_amt = 0
max_water = 30
sprite_name = "miniFE"
/obj/item/weapon/extinguisher/examine()
set src in usr
@@ -157,9 +157,7 @@
for(var/atom/atm in get_turf(W))
if(!W) return
W.reagents.reaction(atm)
if(isliving(atm)) //For extinguishing mobs on fire
var/mob/living/M = atm
M.ExtinguishMob()
if(W.loc == my_target) break
sleep(2)
@@ -168,4 +166,3 @@
step(user, user.inertia_dir)
else
return ..()
@@ -189,8 +189,8 @@
/obj/item/weapon/flamethrower/proc/flame_turf(turflist)
if(!lit || operating) return
operating = 1
for(var/turf/T in turflist)
if(T.density || istype(T, /turf/space))
for(var/turf/simulated/T in turflist)
if(!T.air)
break
if(!previousturf && length(turflist)>1)
previousturf = get_turf(src)
@@ -210,17 +210,16 @@
/obj/item/weapon/flamethrower/proc/ignite_turf(turf/target)
//TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this...
//Transfer 5% of current tank air contents to turf
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(0.02*(throw_amount/100))
//air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE
new/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel(target,air_transfer.toxins,get_dir(loc,target))
air_transfer.toxins = 0
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(0.05)
air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE
target.assume_air(air_transfer)
//Burn it based on transfered gas
//target.hotspot_expose(part4.air_contents.temperature*2,300)
target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500) // -- More of my "how do I shot fire?" dickery. -- TLE
//location.hotspot_expose(1000,500,1)
air_master.add_to_active(target, 0)
return
/obj/item/weapon/flamethrower/full/New(var/loc)
..()
weldtool = new /obj/item/weapon/weldingtool(src)
@@ -8,8 +8,6 @@
var/mob/affecting = null
var/deity_name = "Christ"
autoignition_temperature = 522 // Kelvin
suicide_act(mob/user)
viewers(user) << "<span class='warning'><b>[user] stares into [src.name] and attempts to trascend understanding of the universe!</b></span>"
return (user.dust())
@@ -20,8 +18,6 @@
desc = "To be applied to the head repeatedly."
icon_state ="bible"
autoignition_temperature = 0 // Not actually paper
/obj/item/weapon/storage/bible/booze/New()
..()
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer(src)
@@ -26,9 +26,6 @@
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
autoignition_temperature = 522 // Kelvin
/obj/item/weapon/storage/box/large
name = "large box"
desc = "You could build a fort with this."
@@ -39,8 +36,6 @@
storage_slots = 21
max_combined_w_class = 42 // 21*2
autoignition_temperature = 530 // Kelvin
/obj/item/weapon/storage/box/survival
New()
..()
@@ -80,9 +80,8 @@
New()
..()
//src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.adjust((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/weapon/tank/jetpack/oxygen
name = "Jetpack (Oxygen)"
@@ -92,9 +91,7 @@
New()
..()
//src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.adjust((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/weapon/tank/jetpack/oxygen/harness
name = "jet harness (oxygen)"
@@ -113,9 +110,7 @@
New()
..()
//src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.adjust((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/weapon/tank/jetpack/carbondioxide
name = "Jetpack (Carbon Dioxide)"
@@ -128,9 +123,7 @@
..()
src.ion_trail = new /datum/effect/effect/system/ion_trail_follow()
src.ion_trail.set_up(src)
//src.air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.adjust(0,(6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
examine()
set src in usr
@@ -19,8 +19,7 @@
New()
..()
//src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.adjust((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -59,9 +58,6 @@
trace_gas.moles = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
src.air_contents.trace_gases += trace_gas
//
air_contents.update_values()
return
/*
@@ -85,12 +81,8 @@
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
src.air_contents.nitrogen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
//
src.air_contents.update_values()
return
/*
* Plasma
*/
@@ -101,15 +93,13 @@
flags = CONDUCT
slot_flags = null //they have no straps!
/obj/item/weapon/tank/plasma/New()
..()
src.air_contents.toxins = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
//
src.air_contents.update_values()
return
/obj/item/weapon/tank/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
@@ -152,9 +142,6 @@
New()
..()
src.air_contents.oxygen = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
//
src.air_contents.update_values()
return
@@ -182,7 +169,6 @@
New()
..()
src.air_contents.oxygen = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
src.air_contents.update_values()
return
/*
@@ -199,8 +185,6 @@
..()
src.air_contents.nitrogen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
//
src.air_contents.update_values()
return
/obj/item/weapon/tank/nitrogen/examine()
@@ -224,7 +208,4 @@
..()
src.air_contents.oxygen -= (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
src.air_contents.nitrogen = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
//
src.air_contents.update_values()
return
@@ -357,8 +357,8 @@
var/datum/gas_mixture/G = T.air
if(get_dist(T, src) < 2) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air
G.temperature = 2
update_nearby_tiles()
var/hotspot = (locate(/obj/fire) in T)
air_update_turf()
var/hotspot = (locate(/obj/effect/hotspot) in T)
if(hotspot && !istype(T, /turf/space))
var/CT = 10
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
@@ -373,8 +373,6 @@
V.welded = 1
V.update_icon()
V.visible_message("<span class='danger'>[V] was frozen shut!</span>")
for(var/mob/living/L in T)
L.ExtinguishMob()
return
/datum/effect/effect/system/freezing_smoke_spread
-3
View File
@@ -268,9 +268,6 @@
if (istype(location, /turf))
location.hotspot_expose(700, 50, 1)
if(isliving(O))
var/mob/living/L = O
L.IgniteMob()
return
+3 -3
View File
@@ -178,14 +178,14 @@ obj/item/weapon/twohanded/
if(A && wielded && (istype(A,/obj/structure/window) || istype(A,/obj/structure/grille))) //destroys windows and grilles in one hit
if(istype(A,/obj/structure/window))
var/pdiff=performWallPressureCheck(A.loc)
/* var/pdiff=performWallPressureCheck(A.loc)
if(pdiff>0)
message_admins("[A] with pdiff [pdiff] fire-axed by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(A.loc)]!")
log_admin("[A] with pdiff [pdiff] fire-axed by [user.real_name] ([user.ckey]) at [A.loc]!")
log_admin("[A] with pdiff [pdiff] fire-axed by [user.real_name] ([user.ckey]) at [A.loc]!")*///TODO: Figure out how the hell to remake this proc
var/obj/structure/window/W = A
W.destroy()
else
del(A)
qdel(A)
/*
+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