mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 11:36:24 +01:00
Adding Linda.
This commit is contained in:
@@ -20,12 +20,17 @@
|
||||
..()
|
||||
icon_state = mineralType
|
||||
name = "[mineralType] door"
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
air_update_turf(1)
|
||||
|
||||
Del()
|
||||
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))
|
||||
@@ -163,49 +171,7 @@
|
||||
CheckHardness()
|
||||
return
|
||||
|
||||
proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code
|
||||
if(!air_master) return 0
|
||||
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/north = get_step(source,NORTH)
|
||||
var/turf/simulated/south = get_step(source,SOUTH)
|
||||
var/turf/simulated/east = get_step(source,EAST)
|
||||
var/turf/simulated/west = get_step(source,WEST)
|
||||
|
||||
if(need_rebuild)
|
||||
if(istype(source)) //Rebuild/update nearby group geometry
|
||||
if(source.parent)
|
||||
air_master.groups_to_rebuild += source.parent
|
||||
else
|
||||
air_master.tiles_to_update += source
|
||||
if(istype(north))
|
||||
if(north.parent)
|
||||
air_master.groups_to_rebuild += north.parent
|
||||
else
|
||||
air_master.tiles_to_update += north
|
||||
if(istype(south))
|
||||
if(south.parent)
|
||||
air_master.groups_to_rebuild += south.parent
|
||||
else
|
||||
air_master.tiles_to_update += south
|
||||
if(istype(east))
|
||||
if(east.parent)
|
||||
air_master.groups_to_rebuild += east.parent
|
||||
else
|
||||
air_master.tiles_to_update += east
|
||||
if(istype(west))
|
||||
if(west.parent)
|
||||
air_master.groups_to_rebuild += west.parent
|
||||
else
|
||||
air_master.tiles_to_update += west
|
||||
else
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(north)) air_master.tiles_to_update += north
|
||||
if(istype(south)) air_master.tiles_to_update += south
|
||||
if(istype(east)) air_master.tiles_to_update += east
|
||||
if(istype(west)) air_master.tiles_to_update += west
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/mineral_door/iron
|
||||
mineralType = "metal"
|
||||
@@ -249,22 +215,9 @@
|
||||
TemperatureAct(exposed_temperature)
|
||||
|
||||
proc/TemperatureAct(temperature)
|
||||
for(var/turf/simulated/floor/target_tile in range(2,loc))
|
||||
if(target_tile.parent && target_tile.parent.group_processing)
|
||||
target_tile.parent.suspend_group_processing()
|
||||
|
||||
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"
|
||||
|
||||
@@ -29,13 +29,18 @@ 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/Del()
|
||||
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]windoor_assembly[state]"
|
||||
|
||||
@@ -48,6 +53,12 @@ obj/structure/windoor_assembly/Del()
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/structure/windoor_assembly/CanAtmosPass(var/turf/T)
|
||||
if(get_dir(loc, T) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/structure/windoor_assembly/CheckExit(atom/movable/mover as mob|obj, turf/target as turf)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return 1
|
||||
@@ -263,13 +274,13 @@ obj/structure/windoor_assembly/Del()
|
||||
if (src.anchored)
|
||||
usr << "It is fastened to the floor; therefore, you can't rotate it!"
|
||||
return 0
|
||||
if(src.state != "01")
|
||||
update_nearby_tiles(need_rebuild=1) //Compel updates before
|
||||
//if(src.state != "01")
|
||||
//update_nearby_tiles(need_rebuild=1) //Compel updates before
|
||||
|
||||
src.dir = turn(src.dir, 270)
|
||||
|
||||
if(src.state != "01")
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
//if(src.state != "01")
|
||||
//update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
src.ini_dir = src.dir
|
||||
update_icon()
|
||||
@@ -290,26 +301,3 @@ obj/structure/windoor_assembly/Del()
|
||||
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/windoor_assembly/proc/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/target = get_step(source,dir)
|
||||
|
||||
if(need_rebuild)
|
||||
if(istype(source)) //Rebuild/update nearby group geometry
|
||||
if(source.parent)
|
||||
air_master.groups_to_rebuild += source.parent
|
||||
else
|
||||
air_master.tiles_to_update += source
|
||||
if(istype(target))
|
||||
if(target.parent)
|
||||
air_master.groups_to_rebuild += target.parent
|
||||
else
|
||||
air_master.tiles_to_update += target
|
||||
else
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(target)) air_master.tiles_to_update += target
|
||||
|
||||
return 1
|
||||
@@ -216,10 +216,9 @@
|
||||
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
|
||||
|
||||
@@ -233,10 +232,9 @@
|
||||
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
|
||||
|
||||
@@ -274,7 +272,7 @@
|
||||
else
|
||||
icon_state = "window"
|
||||
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
air_update_turf(1)
|
||||
update_nearby_icons()
|
||||
|
||||
return
|
||||
@@ -282,41 +280,23 @@
|
||||
|
||||
/obj/structure/window/Del()
|
||||
density = 0
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
playsound(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)
|
||||
|
||||
|
||||
//This proc has to do with airgroups and atmos, it has nothing to do with smoothwindows, that's update_nearby_tiles().
|
||||
/obj/structure/window/proc/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/target = get_step(source,dir)
|
||||
|
||||
if(need_rebuild)
|
||||
if(istype(source)) //Rebuild/update nearby group geometry
|
||||
if(source.parent)
|
||||
air_master.groups_to_rebuild += source.parent
|
||||
else
|
||||
air_master.tiles_to_update += source
|
||||
if(istype(target))
|
||||
if(target.parent)
|
||||
air_master.groups_to_rebuild += target.parent
|
||||
else
|
||||
air_master.tiles_to_update += target
|
||||
else
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(target)) air_master.tiles_to_update += target
|
||||
air_update_turf(1)
|
||||
|
||||
/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
|
||||
|
||||
//checks if this window is full-tile one
|
||||
@@ -325,7 +305,7 @@
|
||||
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!
|
||||
//This proc is used to update the icons of nearby windows.
|
||||
/obj/structure/window/proc/update_nearby_icons()
|
||||
update_icon()
|
||||
for(var/direction in cardinal)
|
||||
|
||||
Reference in New Issue
Block a user