Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into outpost-power

This commit is contained in:
Atlantiscze
2015-02-24 13:09:05 +01:00
174 changed files with 5440 additions and 6450 deletions

View File

@@ -110,7 +110,13 @@ var/list/ghostteleportlocs = list()
power_environ = 0
ambience = list('sound/ambience/ambispace.ogg','sound/music/title2.ogg','sound/music/space.ogg','sound/music/main.ogg','sound/music/traitor.ogg')
/area/space/firealert()
area/space/atmosalert()
return
/area/space/fire_alert()
return
/area/space/fire_reset()
return
/area/space/readyalert()

View File

@@ -30,37 +30,14 @@
power_change() // all machines set to current power level, also updates lighting icon
InitializeLighting()
/area/proc/get_cameras()
var/list/cameras = list()
for (var/area/RA in related)
for (var/obj/machinery/camera/C in RA)
cameras += C
return cameras
/area/proc/poweralert(var/state, var/obj/source as obj)
if (state != poweralm)
poweralm = state
if(istype(source)) //Only report power alarms on the z-level where the source is located.
var/list/cameras = list()
for (var/area/RA in related)
for (var/obj/machinery/camera/C in RA)
cameras += C
if(state == 1)
C.network.Remove("Power Alarms")
else
C.network.Add("Power Alarms")
for (var/mob/living/silicon/aiPlayer in player_list)
if(aiPlayer.z == source.z)
if (state == 1)
aiPlayer.cancelAlarm("Power", src, source)
else
aiPlayer.triggerAlarm("Power", src, cameras, source)
for(var/obj/machinery/computer/station_alert/a in machines)
if(a.z == source.z)
if(state == 1)
a.cancelAlarm("Power", src, source)
else
a.triggerAlarm("Power", src, cameras, source)
return
/area/proc/atmosalert(danger_level, var/set_firelocks=1)
// if(type==/area) //No atmos alarms in space
// return 0 //redudant
/area/proc/atmosalert(danger_level, var/alarm_source)
//Check all the alarms before lowering atmosalm. Raising is perfectly fine.
for (var/area/RA in related)
for (var/obj/machinery/alarm/AA in RA)
@@ -68,32 +45,16 @@
danger_level = max(danger_level, AA.danger_level)
if(danger_level != atmosalm)
if (set_firelocks && danger_level < 1 && atmosalm >= 1)
if (danger_level < 1 && atmosalm >= 1)
//closing the doors on red and opening on green provides a bit of hysteresis that will hopefully prevent fire doors from opening and closing repeatedly due to noise
air_doors_open()
else if (danger_level >= 2 && atmosalm < 2)
air_doors_close()
if (danger_level < 2 && atmosalm >= 2)
for(var/area/RA in related)
for(var/obj/machinery/camera/C in RA)
C.network.Remove("Atmosphere Alarms")
for(var/mob/living/silicon/aiPlayer in player_list)
aiPlayer.cancelAlarm("Atmosphere", src, src)
for(var/obj/machinery/computer/station_alert/a in machines)
a.cancelAlarm("Atmosphere", src, src)
if (danger_level >= 2 && atmosalm < 2)
var/list/cameras = list()
for(var/area/RA in related)
//updateicon()
for(var/obj/machinery/camera/C in RA)
cameras += C
C.network.Add("Atmosphere Alarms")
for(var/mob/living/silicon/aiPlayer in player_list)
aiPlayer.triggerAlarm("Atmosphere", src, cameras, src)
for(var/obj/machinery/computer/station_alert/a in machines)
a.triggerAlarm("Atmosphere", src, cameras, src)
if (set_firelocks)
air_doors_close()
if (danger_level == 0)
atmosphere_alarm.clearAlarm(master, alarm_source)
else
atmosphere_alarm.triggerAlarm(master, alarm_source, severity = danger_level)
atmosalm = danger_level
for(var/area/RA in related)
@@ -107,9 +68,9 @@
if(!src.master.air_doors_activated)
src.master.air_doors_activated = 1
for(var/obj/machinery/door/firedoor/E in src.master.all_doors)
if(!E:blocked)
if(!E.blocked)
if(E.operating)
E:nextstate = CLOSED
E.nextstate = CLOSED
else if(!E.density)
spawn(0)
E.close()
@@ -118,21 +79,21 @@
if(src.master.air_doors_activated)
src.master.air_doors_activated = 0
for(var/obj/machinery/door/firedoor/E in src.master.all_doors)
if(!E:blocked)
if(!E.blocked)
if(E.operating)
E:nextstate = OPEN
E.nextstate = OPEN
else if(E.density)
spawn(0)
E.open()
/area/proc/firealert()
if(name == "Space") //no fire alarms in space
return
if( !fire )
fire = 1
master.fire = 1 //used for firedoor checks
updateicon()
/area/proc/fire_alert()
if(!fire)
master.fire = 1 //used for firedoor checks
master.updateicon()
for(var/area/A in related)
A.fire = 1
A.updateicon()
mouse_opacity = 0
for(var/obj/machinery/door/firedoor/D in all_doors)
if(!D.blocked)
@@ -141,22 +102,15 @@
else if(!D.density)
spawn()
D.close()
var/list/cameras = list()
for(var/area/RA in related)
for (var/obj/machinery/camera/C in RA)
cameras.Add(C)
C.network.Add("Fire Alarms")
for (var/mob/living/silicon/ai/aiPlayer in player_list)
aiPlayer.triggerAlarm("Fire", src, cameras, src)
for (var/obj/machinery/computer/station_alert/a in machines)
a.triggerAlarm("Fire", src, cameras, src)
/area/proc/firereset()
/area/proc/fire_reset()
if (fire)
fire = 0
master.fire = 0 //used for firedoor checks
master.fire = 0 //used for firedoor checks
master.updateicon()
for(var/area/A in related)
A.fire = 0
A.updateicon()
mouse_opacity = 0
updateicon()
for(var/obj/machinery/door/firedoor/D in all_doors)
if(!D.blocked)
if(D.operating)
@@ -164,13 +118,6 @@
else if(D.density)
spawn(0)
D.open()
for(var/area/RA in related)
for (var/obj/machinery/camera/C in RA)
C.network.Remove("Fire Alarms")
for (var/mob/living/silicon/ai/aiPlayer in player_list)
aiPlayer.cancelAlarm("Fire", src, src)
for (var/obj/machinery/computer/station_alert/a in machines)
a.cancelAlarm("Fire", src, src)
/area/proc/readyalert()
if(!eject)

View File

@@ -28,7 +28,6 @@
recommended_enemies = 4
uplink_welcome = "Nar-Sie Uplink Console:"
uplink_uses = 10
var/datum/mind/sacrifice_target = null
var/finished = 0

View File

@@ -1,176 +0,0 @@
// BIOMASS (Note that this code is very similar to Space Vine code)
/obj/effect/biomass
name = "biomass"
desc = "Space barf from another dimension. It just keeps spreading!"
icon = 'icons/obj/biomass.dmi'
icon_state = "stage1"
anchored = 1
density = 0
layer = 5
pass_flags = PASSTABLE | PASSGRILLE
var/energy = 0
var/obj/effect/biomass_controller/master = null
New()
return
Del()
if(master)
master.vines -= src
master.growth_queue -= src
..()
/obj/effect/biomass/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (!W || !user || !W.type) return
switch(W.type)
if(/obj/item/weapon/circular_saw) del src
if(/obj/item/weapon/kitchen/utensil/knife) del src
if(/obj/item/weapon/scalpel) del src
if(/obj/item/weapon/twohanded/fireaxe) del src
if(/obj/item/weapon/hatchet) del src
if(/obj/item/weapon/melee/energy) del src
if(/obj/item/weapon/pickaxe/plasmacutter) del src
//less effective weapons
if(/obj/item/weapon/wirecutters)
if(prob(25)) del src
if(/obj/item/weapon/shard)
if(prob(25)) del src
else //weapons with subtypes
if(istype(W, /obj/item/weapon/melee/energy/sword)) del src
else if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user)) del src
else
return
..()
/obj/effect/biomass_controller
var/list/obj/effect/biomass/vines = list()
var/list/growth_queue = list()
var/reached_collapse_size
var/reached_slowdown_size
//What this does is that instead of having the grow minimum of 1, required to start growing, the minimum will be 0,
//meaning if you get the biomasssss..s' size to something less than 20 plots, it won't grow anymore.
New()
if(!istype(src.loc,/turf/simulated/floor))
del(src)
spawn_biomass_piece(src.loc)
processing_objects.Add(src)
Del()
processing_objects.Remove(src)
..()
proc/spawn_biomass_piece(var/turf/location)
var/obj/effect/biomass/BM = new(location)
growth_queue += BM
vines += BM
BM.master = src
process()
if(!vines)
del(src) //space vines exterminated. Remove the controller
return
if(!growth_queue)
del(src) //Sanity check
return
if(vines.len >= 250 && !reached_collapse_size)
reached_collapse_size = 1
if(vines.len >= 30 && !reached_slowdown_size )
reached_slowdown_size = 1
var/maxgrowth = 0
if(reached_collapse_size)
maxgrowth = 0
else if(reached_slowdown_size)
if(prob(25))
maxgrowth = 1
else
maxgrowth = 0
else
maxgrowth = 4
var/length = min( 30 , vines.len / 5 )
var/i = 0
var/growth = 0
var/list/obj/effect/biomass/queue_end = list()
for( var/obj/effect/biomass/BM in growth_queue )
i++
queue_end += BM
growth_queue -= BM
if(BM.energy < 2) //If tile isn't fully grown
if(prob(20))
BM.grow()
if(BM.spread())
growth++
if(growth >= maxgrowth)
break
if(i >= length)
break
growth_queue = growth_queue + queue_end
/obj/effect/biomass/proc/grow()
if(!energy)
src.icon_state = "stage2"
energy = 1
src.opacity = 0
src.density = 0
layer = 5
else
src.icon_state = "stage3"
src.opacity = 0
src.density = 1
energy = 2
/obj/effect/biomass/proc/spread()
var/direction = pick(cardinal)
var/step = get_step(src,direction)
if(istype(step,/turf/simulated/floor))
var/turf/simulated/floor/F = step
if(!locate(/obj/effect/biomass,F))
if(F.Enter(src))
if(master)
master.spawn_biomass_piece( F )
return 1
return 0
/obj/effect/biomass/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(90))
del(src)
return
if(3.0)
if (prob(50))
del(src)
return
return
/obj/effect/biomass/fire_act(null, temp, volume) //hotspots kill biomass
del src
/proc/biomass_infestation()
spawn() //to stop the secrets panel hanging
var/list/turf/simulated/floor/turfs = list() //list of all the empty floor turfs in the hallway areas
for(var/areapath in typesof(/area/hallway))
var/area/A = locate(areapath)
for(var/area/B in A.related)
for(var/turf/simulated/floor/F in B.contents)
if(!F.contents.len)
turfs += F
if(turfs.len) //Pick a turf to spawn at if we can
var/turf/simulated/floor/T = pick(turfs)
new/obj/effect/biomass_controller(T) //spawn a controller at turf
message_admins("\blue Event: Biomass spawned at [T.loc.loc] ([T.x],[T.y],[T.z])")

View File

@@ -1,16 +0,0 @@
//Carn: Spacevines random event.
/proc/spacevine_infestation()
spawn() //to stop the secrets panel hanging
var/list/turf/simulated/floor/turfs = list() //list of all the empty floor turfs in the hallway areas
for(var/areapath in typesof(/area/hallway))
var/area/A = locate(areapath)
for(var/area/B in A.related)
for(var/turf/simulated/floor/F in B.contents)
if(!F.contents.len)
turfs += F
if(turfs.len) //Pick a turf to spawn at if we can
var/turf/simulated/floor/T = pick(turfs)
new/obj/effect/plant_controller(T) //spawn a controller at turf
message_admins("\blue Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])")

View File

@@ -30,30 +30,37 @@
var/newscaster_announcements = null
var/ert_disabled = 0
var/uplink_welcome = "Illegal Uplink Console:"
var/uplink_uses = 10
var/uplink_uses = 12
var/list/datum/uplink_item/uplink_items = list(
"Ammunition" = list(
new/datum/uplink_item(/obj/item/ammo_magazine/a357, 2, ".357", "RA"),
new/datum/uplink_item(/obj/item/ammo_magazine/mc9mm, 2, "9mm", "R9"),
new/datum/uplink_item(/obj/item/ammo_magazine/chemdart, 2, "Darts", "AD"),
new/datum/uplink_item(/obj/item/weapon/storage/box/sniperammo, 3, "14.5mm", "RA")
),
"Highly Visible and Dangerous Weapons" = list(
new/datum/uplink_item(/obj/item/ammo_magazine/mc9mm, 2, "Ammo-9mm", "R9"),
new/datum/uplink_item(/obj/item/ammo_magazine/a357, 2, "Ammo-357", "RA"),
new/datum/uplink_item(/obj/item/weapon/storage/box/emps, 3, "5 EMP Grenades", "EM"),
new/datum/uplink_item(/obj/item/weapon/melee/energy/sword, 4, "Energy Sword", "ES"),
new/datum/uplink_item(/obj/item/weapon/gun/projectile/dartgun, 5, "Dart Gun", "DG"),
new/datum/uplink_item(/obj/item/weapon/gun/energy/crossbow, 5, "Energy Crossbow", "XB"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/g9mm, 5, "Silenced 9mm", "S9"),
new/datum/uplink_item(/obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser, 6, "Exosuit Rigged Laser", "RL"),
new/datum/uplink_item(/obj/item/weapon/gun/projectile/revolver, 6, "Revolver", "RE"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndicate, 10, "Mercenary Bundle", "BU")
new/datum/uplink_item(/obj/item/weapon/storage/box/syndicate, 10, "Mercenary Bundle", "BU"),
new/datum/uplink_item(/obj/item/weapon/gun/projectile/heavysniper, 12, "PTRS Rifle", "BU")
),
"Stealthy and Inconspicuous Weapons" = list(
new/datum/uplink_item(/obj/item/weapon/soap/syndie, 1, "Subversive Soap", "SP"),
new/datum/uplink_item(/obj/item/weapon/cane/concealed, 2, "Concealed Cane Sword", "CC"),
new/datum/uplink_item(/obj/item/weapon/cartridge/syndicate, 3, "Detomatix PDA Cartridge", "DC"),
new/datum/uplink_item(/obj/item/weapon/pen/paralysis, 3, "Paralysis Pen", "PP"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/cigarette, 4, "Cigarette Kit", "BH")
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/cigarette, 4, "Cigarette Kit", "BH"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/toxin, 4, "Random Toxin - Beaker", "RT")
),
"Stealth and Camouflage Items" = list(
new/datum/uplink_item(/obj/item/weapon/card/id/syndicate, 2, "Agent ID card", "AC"),
new/datum/uplink_item(/obj/item/clothing/shoes/syndigaloshes, 2, "No-Slip Shoes", "SH"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/spy, 2, "Bug Kit", "SK"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/spy, 2, "Bug Kit", "BK"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/chameleon, 3, "Chameleon Kit", "CB"),
new/datum/uplink_item(/obj/item/device/chameleon, 4, "Chameleon-Projector", "CP"),
new/datum/uplink_item(/obj/item/clothing/mask/gas/voice, 4, "Voice Changer", "VC"),
@@ -62,11 +69,13 @@
"Devices and Tools" = list(
new/datum/uplink_item(/obj/item/weapon/storage/toolbox/syndicate, 1, "Fully Loaded Toolbox", "ST"),
new/datum/uplink_item(/obj/item/weapon/plastique, 2, "C-4 (Destroys walls)", "C4"),
new/datum/uplink_item(/obj/item/device/encryptionkey/syndicate, 2, "Encrypted Radio Channel Key", "ER"),
new/datum/uplink_item(/obj/item/device/encryptionkey/binary, 3, "Binary Translator Key", "BT"),
new/datum/uplink_item(/obj/item/weapon/card/emag, 3, "Cryptographic Sequencer", "EC"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/clerical, 3, "Morphic Clerical Kit", "CK"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/space, 3, "Space Suit", "SS"),
new/datum/uplink_item(/obj/item/clothing/glasses/thermal/syndi, 3, "Thermal Imaging Glasses", "TM"),
new/datum/uplink_item(/obj/item/clothing/suit/storage/vest/heavy/merc, 4, "Heavy Armor Vest", "HAV"),
new/datum/uplink_item(/obj/item/weapon/aiModule/syndicate, 7, "Hacked AI Upload Module", "AI"),
new/datum/uplink_item(/obj/item/device/powersink, 5, "Powersink (DANGER!)", "PS",),
new/datum/uplink_item(/obj/item/device/radio/beacon/syndicate, 7, "Singularity Beacon (DANGER!)", "SB"),
@@ -78,10 +87,20 @@
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_explosive, 6, "Explosive Implant (DANGER!)", "EI"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_uplink, 10, "Uplink Implant (Contains 5 Telecrystals)", "UI")
),
"Health Aids" = list(
new/datum/uplink_item(/obj/item/weapon/storage/box/donkpockets, 1, "Box of Donk-Pockets", "DP"),
"Medical" = list(
new/datum/uplink_item(/obj/item/weapon/storage/box/donkpockets, 1, "Box of Sin-Pockets", "DP"),
new/datum/uplink_item(/obj/item/weapon/storage/firstaid/surgery, 5, "Surgery kit", "SK"),
new/datum/uplink_item(/obj/item/weapon/storage/firstaid/combat, 5, "Combat medical kit", "CM")
),
"Hardsuit Modules" = list(
new/datum/uplink_item(/obj/item/rig_module/vision/thermal, 2, "Thermal Scanner", "RTS"),
new/datum/uplink_item(/obj/item/rig_module/fabricator/energy_net, 3, "Net Projector", "REN"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/ewar_voice, 4, "Electrowarfare Suite and Voice Synthesiser", "REV"),
new/datum/uplink_item(/obj/item/rig_module/maneuvering_jets, 4, "Maneuvering Jets", "RMJ"),
new/datum/uplink_item(/obj/item/rig_module/mounted/egun, 6, "Mounted Energy Gun", "REG"),
new/datum/uplink_item(/obj/item/rig_module/power_sink, 6, "Power Sink", "RPS"),
new/datum/uplink_item(/obj/item/rig_module/mounted, 8, "Mounted Laser Cannon", "RLC")
),
"(Pointless) Badassery" = list(
new/datum/uplink_item(/obj/item/toy/syndicateballoon, 10, "For showing that You Are The BOSS (Useless Balloon)", "BS"),
new/datum/uplink_item(/obj/item/toy/nanotrasenballoon, 10, "For showing that you love NT SOO much (Useless Balloon)", "NT")
@@ -251,16 +270,6 @@
special_role == "Head Revolutionary" && prob(30))
suspects += man
// If they're a traitor or likewise, give them extra TC in exchange.
var/obj/item/device/uplink/hidden/suplink = man.mind.find_syndicate_uplink()
if(suplink)
var/extra = 4
suplink.uses += extra
man << "\red We have received notice that enemy intelligence suspects you to be linked with us. We have thus invested significant resources to increase your uplink's capacity."
else
// Give them a warning!
man << "\red They are on to you!"
// Some poor people who were just in the wrong place at the wrong time..
else if(prob(10))
suspects += man

View File

@@ -10,7 +10,6 @@
recommended_enemies = 1
uplink_welcome = "Crazy AI Uplink Console:"
uplink_uses = 10
var/const/waittime_l = 600
var/const/waittime_h = 1800 // started at 1800

View File

@@ -9,7 +9,6 @@
votable = 0
uplink_welcome = "EVIL METEOR Uplink Console:"
uplink_uses = 10
/datum/game_mode/meteor/announce()

View File

@@ -9,7 +9,7 @@
recommended_enemies = 3
uplink_welcome = "AntagCorp Uplink Console:"
uplink_uses = 5
uplink_uses = 7
newscaster_announcements = /datum/news_announcement/revolution_inciting_event

View File

@@ -13,7 +13,6 @@
uplink_welcome = "AntagCorp Portable Teleportation Relay:"
uplink_uses = 10
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)

View File

@@ -15,7 +15,7 @@
/obj/effect/rend
name = "Tear in the fabric of reality"
desc = "You should run now"
icon = 'icons/obj/biomass.dmi'
icon = 'icons/obj/wizard.dmi'
icon_state = "rift"
density = 1
unacidable = 1

View File

@@ -42,13 +42,13 @@
flag = SCIENTIST
department_flag = MEDSCI
faction = "Station"
total_positions = 6
total_positions = 5
spawn_positions = 3
supervisors = "the research director"
selection_color = "#ffeeff"
access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_xenoarch)
minimal_access = list(access_tox, access_tox_storage, access_research, access_xenoarch)
alt_titles = list("Xenoarcheologist", "Anomalist", "Phoron Researcher", "Xenobotanist")
alt_titles = list("Xenoarcheologist", "Anomalist", "Phoron Researcher")
minimal_player_age = 14
@@ -74,12 +74,13 @@
flag = XENOBIOLOGIST
department_flag = MEDSCI
faction = "Station"
total_positions = 2
total_positions = 3
spawn_positions = 2
supervisors = "the research director"
selection_color = "#ffeeff"
access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology)
minimal_access = list(access_research, access_xenobiology)
alt_titles = list("Xenobotanist")
minimal_player_age = 14

View File

@@ -117,19 +117,6 @@
first_run()
/obj/machinery/alarm/Del()
//If there's an active alarm, clear it after minute so that alarms don't keep going forver
delayed_reset()
..()
//needed to cancel the alarm after it is deleted
/obj/machinery/alarm/proc/delayed_reset()
var/area/A = alarm_area
src = null
spawn(600)
//It makes sense not to touch firelocks here. The alarm itself is gone, we have no idea what the atmos is like.
A.atmosalert(0, set_firelocks=0)
/obj/machinery/alarm/proc/first_run()
alarm_area = get_area(src)
if (alarm_area.master)
@@ -441,7 +428,7 @@
send_signal(device_id, list("power"= 0) )
/obj/machinery/alarm/proc/apply_danger_level(var/new_danger_level)
if (report_danger_level && alarm_area.atmosalert(new_danger_level))
if (report_danger_level && alarm_area.atmosalert(new_danger_level, src))
post_alert(new_danger_level)
update_icon()
@@ -769,13 +756,13 @@
return 1
if(href_list["atmos_alarm"])
if (alarm_area.atmosalert(2))
if (alarm_area.atmosalert(2, src))
apply_danger_level(2)
update_icon()
return 1
if(href_list["atmos_reset"])
if (alarm_area.atmosalert(0))
if (alarm_area.atmosalert(0, src))
apply_danger_level(0)
update_icon()
return 1
@@ -947,7 +934,6 @@ FIRE ALARM
var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone
/obj/machinery/firealarm/update_icon()
if(wiresexposed)
switch(buildstage)
if(2)
@@ -981,7 +967,8 @@ FIRE ALARM
return src.alarm()
/obj/machinery/firealarm/emp_act(severity)
if(prob(50/severity)) alarm()
if(prob(50/severity))
alarm(rand(30/severity, 60/severity))
..()
/obj/machinery/firealarm/attackby(obj/item/W as obj, mob/user as mob)
@@ -1080,6 +1067,7 @@ FIRE ALARM
var/d2
if (istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon))
A = A.loc
A = A.master
if (A.fire)
d1 = text("<A href='?src=\ref[];reset=1'>Reset - Lockdown</A>", src)
@@ -1145,26 +1133,26 @@ FIRE ALARM
/obj/machinery/firealarm/proc/reset()
if (!( src.working ))
return
var/area/A = src.loc
A = A.loc
if (!( istype(A, /area) ))
return
A.firereset()
var/area/area = get_area(src)
for(var/area/A in area.related)
for(var/obj/machinery/firealarm/FA in A)
fire_alarm.clearAlarm(loc, FA)
update_icon()
return
/obj/machinery/firealarm/proc/alarm()
if (!( src.working ))
/obj/machinery/firealarm/proc/alarm(var/duration = 0)
if (!( src.working))
return
var/area/A = src.loc
A = A.loc
if (!( istype(A, /area) ))
return
A.firealert()
var/area/area = get_area(src)
for(var/area/A in area.related)
for(var/obj/machinery/firealarm/FA in A)
fire_alarm.triggerAlarm(loc, FA, duration)
update_icon()
//playsound(src.loc, 'sound/ambience/signal.ogg', 75, 0)
return
/obj/machinery/firealarm/New(loc, dir, building)
..()
@@ -1180,20 +1168,6 @@ FIRE ALARM
pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
/obj/machinery/firealarm/Del()
//so fire alarms don't keep going forever
delayed_reset()
..()
//needed to cancel the alarm after it is deleted
/obj/machinery/firealarm/proc/delayed_reset()
var/area/A = get_area(src)
if (!A) return
src = null
spawn(600)
A.firereset()
/obj/machinery/firealarm/initialize()
if(z in config.contact_levels)
if(security_level)

View File

@@ -1,242 +0,0 @@
//http://www.youtube.com/watch?v=-1GadTfGFvU
//i could have done these as just an ordinary plant, but fuck it - there would have been too much snowflake code
/obj/machinery/apiary
name = "apiary tray"
icon = 'icons/obj/hydroponics.dmi'
icon_state = "hydrotray3"
density = 1
anchored = 1
var/nutrilevel = 0
var/yieldmod = 1
var/mut = 1
var/toxic = 0
var/dead = 0
var/health = -1
var/maxhealth = 100
var/lastcycle = 0
var/cycledelay = 100
var/harvestable_honey = 0
var/beezeez = 0
var/swarming = 0
var/bees_in_hive = 0
var/list/owned_bee_swarms = list()
var/hydrotray_type = /obj/machinery/portable_atmospherics/hydroponics
//overwrite this after it's created if the apiary needs a custom machinery sprite
/obj/machinery/apiary/New()
..()
overlays += image('icons/obj/apiary_bees_etc.dmi', icon_state="apiary")
/obj/machinery/apiary/bullet_act(var/obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables.
if(istype(Proj ,/obj/item/projectile/energy/floramut))
mut++
else if(istype(Proj ,/obj/item/projectile/energy/florayield))
if(!yieldmod)
yieldmod += 1
//world << "Yield increased by 1, from 0, to a total of [myseed.yield]"
else if (prob(1/(yieldmod * yieldmod) *100))//This formula gives you diminishing returns based on yield. 100% with 1 yield, decreasing to 25%, 11%, 6, 4, 2...
yieldmod += 1
//world << "Yield increased by 1, to a total of [myseed.yield]"
else
..()
return
/obj/machinery/apiary/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/queen_bee))
if(health > 0)
user << "\red There is already a queen in there."
else
health = 10
nutrilevel += 10
user.drop_item()
del(O)
user << "\blue You carefully insert the queen into [src], she gets busy making a hive."
bees_in_hive = 0
else if(istype(O, /obj/item/beezeez))
beezeez += 100
nutrilevel += 10
user.drop_item()
if(health > 0)
user << "\blue You insert [O] into [src]. A relaxed humming appears to pick up."
else
user << "\blue You insert [O] into [src]. Now it just needs some bees."
del(O)
else if(istype(O, /obj/item/weapon/minihoe))
if(health > 0)
user << "\red <b>You begin to dislodge the apiary from the tray, the bees don't like that.</b>"
angry_swarm(user)
else
user << "\blue You begin to dislodge the dead apiary from the tray."
if(do_after(user, 50))
new hydrotray_type(src.loc)
new /obj/item/apiary(src.loc)
user << "\red You dislodge the apiary from the tray."
del(src)
else if(istype(O, /obj/item/weapon/bee_net))
var/obj/item/weapon/bee_net/N = O
if(N.caught_bees > 0)
user << "\blue You empty the bees into the apiary."
bees_in_hive += N.caught_bees
N.caught_bees = 0
else
user << "\blue There are no more bees in the net."
else if(istype(O, /obj/item/weapon/reagent_containers/glass))
var/obj/item/weapon/reagent_containers/glass/G = O
if(harvestable_honey > 0)
if(health > 0)
user << "\red You begin to harvest the honey. The bees don't seem to like it."
angry_swarm(user)
else
user << "\blue You begin to harvest the honey."
if(do_after(user,50))
G.reagents.add_reagent("honey",harvestable_honey)
harvestable_honey = 0
user << "\blue You successfully harvest the honey."
else
user << "\blue There is no honey left to harvest."
else
angry_swarm(user)
..()
/obj/machinery/apiary/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
else
return 0
/obj/machinery/apiary/process()
if(swarming > 0)
swarming -= 1
if(swarming <= 0)
for(var/mob/living/simple_animal/bee/B in src.loc)
bees_in_hive += B.strength
del(B)
else if(bees_in_hive < 10)
for(var/mob/living/simple_animal/bee/B in src.loc)
bees_in_hive += B.strength
del(B)
if(world.time > (lastcycle + cycledelay))
lastcycle = world.time
if(health < 0)
return
//magical bee formula
if(beezeez > 0)
beezeez -= 1
nutrilevel += 2
health += 1
toxic = max(0, toxic - 1)
//handle nutrients
nutrilevel -= bees_in_hive / 10 + owned_bee_swarms.len / 5
if(nutrilevel > 0)
bees_in_hive += 1 * yieldmod
if(health < maxhealth)
health++
else
//nutrilevel is less than 1, so we're effectively subtracting here
health += max(nutrilevel - 1, round(-health / 2))
bees_in_hive += max(nutrilevel - 1, round(-bees_in_hive / 2))
if(owned_bee_swarms.len)
var/mob/living/simple_animal/bee/B = pick(owned_bee_swarms)
B.target_turf = get_turf(src)
//clear out some toxins
if(toxic > 0)
toxic -= 1
health -= 1
if(health <= 0)
return
//make a bit of honey
if(harvestable_honey < 50)
harvestable_honey += 0.5
//make some new bees
if(bees_in_hive >= 10 && prob(bees_in_hive * 10))
var/mob/living/simple_animal/bee/B = new(get_turf(src), src)
owned_bee_swarms.Add(B)
B.mut = mut
B.toxic = toxic
bees_in_hive -= 1
//find some plants, harvest
for(var/obj/machinery/portable_atmospherics/hydroponics/H in view(7, src))
if(H.seed && !H.dead && prob(owned_bee_swarms.len * 10))
src.nutrilevel++
H.nutrilevel++
if(mut < H.mutation_mod - 1)
mut = H.mutation_mod - 1
else if(mut > H.mutation_mod - 1)
H.mutation_mod = mut
//flowers give us pollen (nutrients)
/* - All plants should be giving nutrients to the hive.
if(H.myseed.type == /obj/item/seeds/harebell || H.myseed.type == /obj/item/seeds/sunflowerseed)
src.nutrilevel++
H.nutrilevel++
*/
//have a few beneficial effects on nearby plants
if(prob(10))
H.lastcycle -= 5
if(prob(10))
H.seed.lifespan = max(initial(H.seed.lifespan) * 1.5, H.seed.lifespan + 1)
if(prob(10))
H.seed.endurance = max(initial(H.seed.endurance) * 1.5, H.seed.endurance + 1)
if(H.toxins && prob(10))
H.toxins = min(0, H.toxins - 1)
toxic++
/obj/machinery/apiary/proc/die()
if(owned_bee_swarms.len)
var/mob/living/simple_animal/bee/B = pick(owned_bee_swarms)
B.target_turf = get_turf(src)
B.strength -= 1
if(B.strength <= 0)
del(B)
else if(B.strength <= 5)
B.icon_state = "bees[B.strength]"
bees_in_hive = 0
health = 0
/obj/machinery/apiary/proc/angry_swarm(var/mob/M)
for(var/mob/living/simple_animal/bee/B in owned_bee_swarms)
B.feral = 25
B.target_mob = M
swarming = 25
while(bees_in_hive > 0)
var/spawn_strength = bees_in_hive
if(bees_in_hive >= 5)
spawn_strength = 6
var/mob/living/simple_animal/bee/B = new(get_turf(src), src)
B.target_mob = M
B.strength = spawn_strength
B.feral = 25
B.mut = mut
B.toxic = toxic
bees_in_hive -= spawn_strength
/obj/machinery/apiary/verb/harvest_honeycomb()
set src in oview(1)
set name = "Harvest honeycomb"
set category = "Object"
while(health > 15)
health -= 15
var/obj/item/weapon/reagent_containers/food/snacks/honeycomb/H = new(src.loc)
if(toxic > 0)
H.reagents.add_reagent("toxin", toxic)
usr << "\blue You harvest the honeycomb from the hive. There is a wild buzzing!"
angry_swarm(usr)

View File

@@ -0,0 +1,255 @@
/obj/machinery/biogenerator
name = "Biogenerator"
desc = ""
icon = 'icons/obj/biogenerator.dmi'
icon_state = "biogen-stand"
density = 1
anchored = 1
use_power = 1
idle_power_usage = 40
var/processing = 0
var/obj/item/weapon/reagent_containers/glass/beaker = null
var/points = 0
var/menustat = "menu"
var/build_eff = 1
var/eat_eff = 1
/obj/machinery/biogenerator/New()
..()
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
beaker = new /obj/item/weapon/reagent_containers/glass/bottle(src)
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/biogenerator(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
RefreshParts()
/obj/machinery/biogenerator/on_reagent_change() //When the reagents change, change the icon as well.
update_icon()
/obj/machinery/biogenerator/update_icon()
if(!beaker)
icon_state = "biogen-empty"
else if(!processing)
icon_state = "biogen-stand"
else
icon_state = "biogen-work"
return
/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(default_deconstruction_screwdriver(user, O))
return
if(default_deconstruction_crowbar(user, O))
return
if(default_part_replacement(user, O))
return
if(istype(O, /obj/item/weapon/reagent_containers/glass))
if(beaker)
user << "<span class='notice'>]The [src] is already loaded.</span>"
else
user.before_take_item(O)
O.loc = src
beaker = O
updateUsrDialog()
else if(processing)
user << "<span class='notice'>\The [src] is currently processing.</span>"
else if(istype(O, /obj/item/weapon/storage/bag/plants))
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
i++
if(i >= 10)
user << "<span class='notice'>\The [src] is already full! Activate it.</span>"
else
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
G.loc = src
i++
if(i >= 10)
user << "<span class='notice'>You fill \the [src] to its capacity.</span>"
break
if(i < 10)
user << "<span class='notice'>You empty \the [O] into \the [src].</span>"
else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown))
user << "<span class='notice'>You cannot put this in \the [src].</span>"
else
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
i++
if(i >= 10)
user << "<span class='notice'>\The [src] is full! Activate it.</span>"
else
user.before_take_item(O)
O.loc = src
user << "<span class='notice'>You put \the [O] in \the [src]</span>"
update_icon()
return
/obj/machinery/biogenerator/interact(mob/user as mob)
if(stat & BROKEN)
return
user.set_machine(src)
var/dat = "<TITLE>Biogenerator</TITLE>Biogenerator:<BR>"
if (processing)
dat += "<FONT COLOR=red>Biogenerator is processing! Please wait...</FONT>"
else
dat += "Biomass: [points] points.<HR>"
switch(menustat)
if("menu")
if (beaker)
dat += "<A href='?src=\ref[src];action=activate'>Activate Biogenerator!</A><BR>"
dat += "<A href='?src=\ref[src];action=detach'>Detach Container</A><BR><BR>"
dat += "Food<BR>"
dat += "<A href='?src=\ref[src];action=create;item=milk;cost=20'>10 milk</A> <FONT COLOR=blue>([round(20/build_eff)])</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=meat;cost=50'>Slab of meat</A> <FONT COLOR=blue>([round(50/build_eff)])</FONT><BR>"
dat += "Nutrient<BR>"
dat += "<A href='?src=\ref[src];action=create;item=ez;cost=10'>E-Z-Nutrient</A> <FONT COLOR=blue>([round(10/build_eff)])</FONT> | <A href='?src=\ref[src];action=create;item=ez5;cost=50'>x5</A><BR>"
dat += "<A href='?src=\ref[src];action=create;item=l4z;cost=20'>Left 4 Zed</A> <FONT COLOR=blue>([round(20/build_eff)])</FONT> | <A href='?src=\ref[src];action=create;item=l4z5;cost=100'>x5</A><BR>"
dat += "<A href='?src=\ref[src];action=create;item=rh;cost=25'>Robust Harvest</A> <FONT COLOR=blue>([round(25/build_eff)])</FONT> | <A href='?src=\ref[src];action=create;item=rh5;cost=125'>x5</A><BR>"
dat += "Leather<BR>"
dat += "<A href='?src=\ref[src];action=create;item=wallet;cost=100'>Wallet</A> <FONT COLOR=blue>([round(100/build_eff)])</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=gloves;cost=250'>Botanical gloves</A> <FONT COLOR=blue>([round(250/build_eff)])</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=tbelt;cost=300'>Utility belt</A> <FONT COLOR=blue>([round(300/build_eff)])</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=satchel;cost=400'>Leather Satchel</A> <FONT COLOR=blue>([round(400/build_eff)])</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=cashbag;cost=400'>Cash Bag</A> <FONT COLOR=blue>([round(400/build_eff)])</FONT><BR>"
//dat += "Other<BR>"
//dat += "<A href='?src=\ref[src];action=create;item=monkey;cost=500'>Monkey</A> <FONT COLOR=blue>(500)</FONT><BR>"
else
dat += "<BR><FONT COLOR=red>No beaker inside. Please insert a beaker.</FONT><BR>"
if("nopoints")
dat += "You do not have biomass to create products.<BR>Please, put growns into reactor and activate it.<BR>"
dat += "<A href='?src=\ref[src];action=menu'>Return to menu</A>"
if("complete")
dat += "Operation complete.<BR>"
dat += "<A href='?src=\ref[src];action=menu'>Return to menu</A>"
if("void")
dat += "<FONT COLOR=red>Error: No growns inside.</FONT><BR>Please, put growns into reactor.<BR>"
dat += "<A href='?src=\ref[src];action=menu'>Return to menu</A>"
user << browse(dat, "window=biogenerator")
onclose(user, "biogenerator")
return
/obj/machinery/biogenerator/attack_hand(mob/user as mob)
interact(user)
/obj/machinery/biogenerator/proc/activate()
if (usr.stat)
return
if (stat) //NOPOWER etc
return
if(processing)
usr << "<span class='notice'>The biogenerator is in the process of working.</span>"
return
var/S = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/I in contents)
S += 5
if(I.reagents.get_reagent_amount("nutriment") < 0.1)
points += 1
else points += I.reagents.get_reagent_amount("nutriment") * 10 * eat_eff
del(I)
if(S)
processing = 1
update_icon()
updateUsrDialog()
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
use_power(S * 30)
sleep((S + 15) / eat_eff)
processing = 0
update_icon()
else
menustat = "void"
return
/obj/machinery/biogenerator/proc/create_product(var/item, var/cost)
cost = round(cost/build_eff)
if(cost > points)
menustat = "nopoints"
return 0
processing = 1
update_icon()
updateUsrDialog()
points -= cost
sleep(30)
switch(item)
if("milk")
beaker.reagents.add_reagent("milk", 10)
if("meat")
new/obj/item/weapon/reagent_containers/food/snacks/meat(loc)
if("ez")
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc)
if("l4z")
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc)
if("rh")
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc)
if("ez5") //It's not an elegant method, but it's safe and easy. -Cheridan
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc)
if("l4z5")
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc)
if("rh5")
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc)
if("wallet")
new/obj/item/weapon/storage/wallet(loc)
if("gloves")
new/obj/item/clothing/gloves/botanic_leather(loc)
if("tbelt")
new/obj/item/weapon/storage/belt/utility(loc)
if("satchel")
new/obj/item/weapon/storage/backpack/satchel(loc)
if("cashbag")
new/obj/item/weapon/storage/bag/cash(loc)
if("monkey")
new/mob/living/carbon/monkey(loc)
processing = 0
menustat = "complete"
update_icon()
return 1
/obj/machinery/biogenerator/Topic(href, href_list)
if(stat & BROKEN) return
if(usr.stat || usr.restrained()) return
if(!in_range(src, usr)) return
usr.set_machine(src)
switch(href_list["action"])
if("activate")
activate()
if("detach")
if(beaker)
beaker.loc = src.loc
beaker = null
update_icon()
if("create")
create_product(href_list["item"], text2num(href_list["cost"]))
if("menu")
menustat = "menu"
updateUsrDialog()
/obj/machinery/biogenerator/RefreshParts()
..()
var/man_rating = 0
var/bin_rating = 0
for(var/obj/item/weapon/stock_parts/P in component_parts)
if(istype(P, /obj/item/weapon/stock_parts/matter_bin))
bin_rating += P.rating
if(istype(P, /obj/item/weapon/stock_parts/manipulator))
man_rating += P.rating
build_eff = man_rating
eat_eff = bin_rating

View File

@@ -53,13 +53,6 @@
ASSERT(src.network.len > 0)
..()
/obj/machinery/camera/Del()
if(!alarm_on)
triggerCameraAlarm()
cancelCameraAlarm()
..()
/obj/machinery/camera/emp_act(severity)
if(!isEmpProof())
if(prob(100/severity))
@@ -67,7 +60,7 @@
stat |= EMPED
SetLuminosity(0)
kick_viewers()
triggerCameraAlarm()
triggerCameraAlarm(10 * severity)
update_icon()
spawn(900)
@@ -261,22 +254,16 @@
else
icon_state = initial(icon_state)
/obj/machinery/camera/proc/triggerCameraAlarm()
/obj/machinery/camera/proc/triggerCameraAlarm(var/duration = 0)
alarm_on = 1
if(!get_area(src))
return
for(var/mob/living/silicon/S in mob_list)
S.triggerAlarm("Camera", get_area(src), list(src), src)
camera_alarm.triggerAlarm(loc, src, duration)
/obj/machinery/camera/proc/cancelCameraAlarm()
alarm_on = 0
if(!get_area(src))
if(wires.IsIndexCut(CAMERA_WIRE_ALARM))
return
for(var/mob/living/silicon/S in mob_list)
S.cancelAlarm("Camera", get_area(src), src)
alarm_on = 0
camera_alarm.clearAlarm(loc, src)
//if false, then the camera is listed as DEACTIVATED and cannot be used
/obj/machinery/camera/proc/can_use()
@@ -361,3 +348,13 @@
user.set_machine(src)
wires.Interact(user)
/obj/machinery/camera/proc/nano_structure()
var/cam[0]
cam["name"] = sanitize(c_tag)
cam["deact"] = !can_use()
cam["camera"] = "\ref[src]"
cam["x"] = x
cam["y"] = y
cam["z"] = z
return cam

View File

@@ -45,8 +45,7 @@
if (!status || (stat & NOPOWER))
return 0
if (detectTime == -1)
for (var/mob/living/silicon/aiPlayer in player_list)
aiPlayer.cancelAlarm("Motion", get_area(src), src)
motion_alarm.clearAlarm(loc, src)
detectTime = 0
return 1
@@ -54,8 +53,7 @@
if (!status || (stat & NOPOWER))
return 0
if (!detectTime) return 0
for (var/mob/living/silicon/aiPlayer in player_list)
aiPlayer.triggerAlarm("Motion", get_area(src), list(src), src)
motion_alarm.triggerAlarm(loc, src)
detectTime = -1
return 1

View File

@@ -1,116 +1,85 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
// Converting these to global lists may be a bit laggy when removal procs are called. Consider
// rewriting this properly to fix the update bug, rather than unifying all monitors. ~Z
var/global/list/priority_air_alarms = list()
var/global/list/minor_air_alarms = list()
/obj/machinery/computer/atmos_alert
name = "atmospheric alert computer"
desc = "Used to access the station's atmospheric sensors."
circuit = "/obj/item/weapon/circuitboard/atmos_alert"
icon_state = "alert:0"
var/receive_frequency = 1437
var/datum/radio_frequency/radio_connection
/obj/machinery/computer/atmos_alert/initialize()
/obj/machinery/computer/atmos_alert/New()
..()
set_frequency(receive_frequency)
/obj/machinery/computer/atmos_alert/receive_signal(datum/signal/signal)
if(!signal || signal.encryption) return
var/zone = signal.data["zone"]
var/severity = signal.data["alert"]
if(!zone || !severity) return
minor_air_alarms -= zone
priority_air_alarms -= zone
if(severity=="severe")
priority_air_alarms |= zone
else if (severity=="minor")
minor_air_alarms |= zone
update_icon()
return
/obj/machinery/computer/atmos_alert/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, receive_frequency)
receive_frequency = new_frequency
radio_connection = radio_controller.add_object(src, receive_frequency, RADIO_ATMOSIA)
atmosphere_alarm.register(src, /obj/machinery/computer/station_alert/update_icon)
/obj/machinery/computer/atmos_alert/Del()
atmosphere_alarm.unregister(src)
..()
/obj/machinery/computer/atmos_alert/attack_hand(mob/user)
if(..(user))
return
user << browse(return_text(),"window=computer")
user.set_machine(src)
onclose(user, "computer")
ui_interact(user)
/obj/machinery/computer/atmos_alert/process()
if(..())
src.updateDialog()
/obj/machinery/computer/atmos_alert/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
var/major_alarms[0]
var/minor_alarms[0]
for(var/datum/alarm/alarm in atmosphere_alarm.major_alarms())
major_alarms[++major_alarms.len] = list("name" = sanitize(alarm.alarm_name()), "ref" = "\ref[alarm]")
for(var/datum/alarm/alarm in atmosphere_alarm.minor_alarms())
minor_alarms[++minor_alarms.len] = list("name" = sanitize(alarm.alarm_name()), "ref" = "\ref[alarm]")
data["priority_alarms"] = major_alarms
data["minor_alarms"] = minor_alarms
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "atmos_alert.tmpl", src.name, 500, 500)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
/obj/machinery/computer/atmos_alert/update_icon()
..()
if(stat & (NOPOWER|BROKEN))
return
if(priority_air_alarms.len)
var/list/alarms = atmosphere_alarm.major_alarms()
if(alarms.len)
icon_state = "alert:2"
else if(minor_air_alarms.len)
icon_state = "alert:1"
else
icon_state = "alert:0"
alarms = atmosphere_alarm.minor_alarms()
if(alarms.len)
icon_state = "alert:1"
else
icon_state = initial(icon_state)
return
/obj/machinery/computer/atmos_alert/proc/return_text()
var/priority_text
var/minor_text
if(priority_air_alarms.len)
for(var/zone in priority_air_alarms)
priority_text += "<FONT color='red'><B>[zone]</B></FONT> <A href='?src=\ref[src];priority_clear=[ckey(zone)]'>X</A><BR>"
else
priority_text = "No priority alerts detected.<BR>"
if(minor_air_alarms.len)
for(var/zone in minor_air_alarms)
minor_text += "<B>[zone]</B> <A href='?src=\ref[src];minor_clear=[ckey(zone)]'>X</A><BR>"
else
minor_text = "No minor alerts detected.<BR>"
var/output = {"<B>[name]</B><HR>
<B>Priority Alerts:</B><BR>
[priority_text]
<BR>
<HR>
<B>Minor Alerts:</B><BR>
[minor_text]
<BR>"}
return output
/obj/machinery/computer/atmos_alert/Topic(href, href_list)
if(..())
return
return 1
if(href_list["priority_clear"])
var/removing_zone = href_list["priority_clear"]
for(var/zone in priority_air_alarms)
if(ckey(zone) == removing_zone)
priority_air_alarms -= zone
if(href_list["clear_alarm"])
var/datum/alarm/alarm = locate(href_list["clear_alarm"]) in atmosphere_alarm.alarms
if(alarm)
for(var/datum/alarm_source/alarm_source in alarm.sources)
var/obj/machinery/alarm/air_alarm = alarm_source.source
if(istype(air_alarm))
var/list/new_ref = list("atmos_reset" = 1)
air_alarm.Topic(href, new_ref, custom_state = atmos_alert_topic)
return 1
if(href_list["minor_clear"])
var/removing_zone = href_list["minor_clear"]
for(var/zone in minor_air_alarms)
if(ckey(zone) == removing_zone)
minor_air_alarms -= zone
update_icon()
return
var/datum/topic_state/atmos_alert/atmos_alert_topic = new()
/datum/topic_state/atmos_alert
flags = NANO_IGNORE_DISTANCE
/datum/topic_state/air_alarm/href_list(var/mob/user)
var/list/extra_href = list()
extra_href["remote_connection"] = 1
extra_href["remote_access"] = 1
return extra_href

View File

@@ -3,6 +3,8 @@
/proc/invalidateCameraCache()
for(var/obj/machinery/computer/security/s in world)
s.camera_cache = null
for(var/datum/alarm/A in world)
A.cameras = null
/obj/machinery/computer/security
name = "security camera monitor"
@@ -43,33 +45,17 @@
if(!can_access_camera(C))
continue
var/cam[0]
cam["name"] = sanitize(C.c_tag)
cam["deact"] = !C.can_use()
cam["camera"] = "\ref[C]"
cam["x"] = C.x
cam["y"] = C.y
cam["z"] = C.z
var/cam = C.nano_structure()
cameras[++cameras.len] = cam
if(C == current)
data["current"] = cam
var/list/camera_list = list("cameras" = cameras)
camera_cache=list2json(camera_list)
var/list/camera_list = list("cameras" = cameras)
camera_cache=list2json(camera_list)
else
if(current)
var/cam[0]
cam["name"] = current.c_tag
cam["deact"] = !current.can_use()
cam["camera"] = "\ref[current]"
cam["x"] = current.x
cam["y"] = current.y
cam["z"] = current.z
data["current"] = cam
data["current"] = current.nano_structure()
if(ui)

View File

@@ -5,106 +5,42 @@
icon_state = "alert:0"
circuit = "/obj/item/weapon/circuitboard/stationalert"
var/alarms = list("Fire"=list(), "Atmosphere"=list(), "Power"=list())
var/obj/nano_module/alarm_monitor/engineering/alarm_monitor
/obj/machinery/computer/station_alert/New()
..()
alarm_monitor = new(src)
alarm_monitor.register(src, /obj/machinery/computer/station_alert/update_icon)
attack_ai(mob/user)
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))
return
interact(user)
/obj/machinery/computer/station_alert/Del()
alarm_monitor.unregister(src)
..()
/obj/machinery/computer/station_alert/attack_ai(mob/user)
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))
return
interact(user)
return
/obj/machinery/computer/station_alert/attack_hand(mob/user)
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))
return
interact(user)
return
/obj/machinery/computer/station_alert/interact(mob/user)
alarm_monitor.ui_interact(user)
/obj/machinery/computer/station_alert/update_icon()
..()
if(stat & (BROKEN|NOPOWER))
return
attack_hand(mob/user)
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))
return
interact(user)
return
interact(mob/user)
usr.set_machine(src)
var/dat = "<HEAD><TITLE>Current Station Alerts</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
dat += "<A HREF='?src=\ref[user];mach_close=alerts'>Close</A><br><br>"
for (var/cat in src.alarms)
dat += text("<B>[]</B><BR>\n", cat)
var/list/L = src.alarms[cat]
if (L.len)
for (var/alarm in L)
var/list/alm = L[alarm]
var/area/A = alm[1]
var/list/sources = alm[3]
dat += "<NOBR>"
dat += "&bull; "
dat += "[A.name]"
if (sources.len > 1)
dat += text(" - [] sources", sources.len)
dat += "</NOBR><BR>\n"
else
dat += "-- All Systems Nominal<BR>\n"
dat += "<BR>\n"
user << browse(dat, "window=alerts")
onclose(user, "alerts")
Topic(href, href_list)
if(..())
return
return
proc/triggerAlarm(var/class, area/A, var/O, var/alarmsource)
if(stat & (BROKEN))
return
var/list/L = src.alarms[class]
for (var/I in L)
if (I == A.name)
var/list/alarm = L[I]
var/list/sources = alarm[3]
if (!(alarmsource in sources))
sources += alarmsource
return 1
var/obj/machinery/camera/C = null
var/list/CL = null
if (O && istype(O, /list))
CL = O
if (CL.len == 1)
C = CL[1]
else if (O && istype(O, /obj/machinery/camera))
C = O
L[A.name] = list(A, (C) ? C : O, list(alarmsource))
return 1
proc/cancelAlarm(var/class, area/A as area, obj/origin)
if(stat & (BROKEN))
return
var/list/L = src.alarms[class]
var/cleared = 0
for (var/I in L)
if (I == A.name)
var/list/alarm = L[I]
var/list/srcs = alarm[3]
if (origin in srcs)
srcs -= origin
if (srcs.len == 0)
cleared = 1
L -= I
return !cleared
process()
if(stat & (BROKEN|NOPOWER))
icon_state = "atmos0"
return
var/active_alarms = 0
for (var/cat in src.alarms)
var/list/L = src.alarms[cat]
if(L.len) active_alarms = 1
if(active_alarms)
icon_state = "alert:2"
else
icon_state = "alert:0"
..()
return
var/list/alarms = alarm_monitor.active_alarms()
if(alarms.len)
icon_state = "alert:2"
else
icon_state = initial(icon_state)
return

View File

@@ -1,172 +0,0 @@
/obj/machinery/juicer
name = "Juicer"
icon = 'icons/obj/kitchen.dmi'
icon_state = "juicer1"
layer = 2.9
density = 0
anchored = 0
use_power = 1
idle_power_usage = 5
active_power_usage = 100
var/obj/item/weapon/reagent_containers/beaker = null
var/global/list/allowed_items = list (
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato = "tomatojuice",
/obj/item/weapon/reagent_containers/food/snacks/grown/carrot = "carrotjuice",
/obj/item/weapon/reagent_containers/food/snacks/grown/berries = "berryjuice",
/obj/item/weapon/reagent_containers/food/snacks/grown/banana = "banana",
/obj/item/weapon/reagent_containers/food/snacks/grown/potato = "potato",
/obj/item/weapon/reagent_containers/food/snacks/grown/lemon = "lemonjuice",
/obj/item/weapon/reagent_containers/food/snacks/grown/orange = "orangejuice",
/obj/item/weapon/reagent_containers/food/snacks/grown/lime = "limejuice",
/obj/item/weapon/reagent_containers/food/snacks/watermelonslice = "watermelonjuice",
/obj/item/weapon/reagent_containers/food/snacks/grown/grapes = "grapejuice",
/obj/item/weapon/reagent_containers/food/snacks/grown/poisonberries = "poisonberryjuice",
)
/obj/machinery/juicer/New()
beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
/obj/machinery/juicer/update_icon()
icon_state = "juicer"+num2text(!isnull(beaker))
return
/obj/machinery/juicer/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (istype(O,/obj/item/weapon/reagent_containers/glass) || \
istype(O,/obj/item/weapon/reagent_containers/food/drinks/drinkingglass))
if (beaker)
return 1
else
user.before_take_item(O)
O.loc = src
beaker = O
src.verbs += /obj/machinery/juicer/verb/detach
update_icon()
src.updateUsrDialog()
return 0
if (!is_type_in_list(O, allowed_items))
user << "It looks as not containing any juice."
return 1
user.before_take_item(O)
O.loc = src
src.updateUsrDialog()
return 0
/obj/machinery/juicer/attack_ai(mob/user as mob)
return 0
/obj/machinery/juicer/attack_hand(mob/user as mob)
user.set_machine(src)
interact(user)
/obj/machinery/juicer/interact(mob/user as mob) // The microwave Menu
var/is_chamber_empty = 0
var/is_beaker_ready = 0
var/processing_chamber = ""
var/beaker_contents = ""
for (var/i in allowed_items)
for (var/obj/item/O in src.contents)
if (!istype(O,i))
continue
processing_chamber+= "some <B>[O]</B><BR>"
break
if (!processing_chamber)
is_chamber_empty = 1
processing_chamber = "Nothing."
if (!beaker)
beaker_contents = "\The [src] has no beaker attached."
else if (!beaker.reagents.total_volume)
beaker_contents = "\The [src] has attached an empty beaker."
is_beaker_ready = 1
else if (beaker.reagents.total_volume < beaker.reagents.maximum_volume)
beaker_contents = "\The [src] has attached a beaker with something."
is_beaker_ready = 1
else
beaker_contents = "\The [src] has attached a beaker and beaker is full!"
var/dat = {"
<b>Processing chamber contains:</b><br>
[processing_chamber]<br>
[beaker_contents]<hr>
"}
if (is_beaker_ready && !is_chamber_empty && !(stat & (NOPOWER|BROKEN)))
dat += "<A href='?src=\ref[src];action=juice'>Turn on!<BR>"
if (beaker)
dat += "<A href='?src=\ref[src];action=detach'>Detach a beaker!<BR>"
user << browse("<HEAD><TITLE>Juicer</TITLE></HEAD><TT>[dat]</TT>", "window=juicer")
onclose(user, "juicer")
return
/obj/machinery/juicer/Topic(href, href_list)
if(..())
return
usr.set_machine(src)
switch(href_list["action"])
if ("juice")
juice()
if ("detach")
detach()
src.updateUsrDialog()
return
/obj/machinery/juicer/verb/detach()
set category = "Object"
set name = "Detach Beaker from the juicer"
set src in oview(1)
if (usr.stat != 0)
return
if (!beaker)
return
src.verbs -= /obj/machinery/juicer/verb/detach
beaker.loc = src.loc
beaker = null
update_icon()
/obj/machinery/juicer/proc/get_juice_id(var/obj/item/weapon/reagent_containers/food/snacks/grown/O)
for (var/i in allowed_items)
if (istype(O, i))
return allowed_items[i]
/obj/machinery/juicer/proc/get_juice_amount(var/obj/item/weapon/reagent_containers/food/snacks/grown/O)
if (!istype(O))
return 5
else if (O.potency == -1)
return 5
else
return round(5*sqrt(O.potency))
/obj/machinery/juicer/proc/juice()
power_change() //it is a portable machine
if(stat & (NOPOWER|BROKEN))
return
if (!beaker || beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
return
playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1)
for (var/obj/item/weapon/reagent_containers/food/snacks/O in src.contents)
var/r_id = get_juice_id(O)
beaker.reagents.add_reagent(r_id,get_juice_amount(O))
del(O)
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
break
/obj/structure/closet/crate/juice
New()
..()
new/obj/machinery/juicer(src)
new/obj/item/weapon/reagent_containers/food/snacks/grown/tomato(src)
new/obj/item/weapon/reagent_containers/food/snacks/grown/carrot(src)
new/obj/item/weapon/reagent_containers/food/snacks/grown/berries(src)
new/obj/item/weapon/reagent_containers/food/snacks/grown/banana(src)
new/obj/item/weapon/reagent_containers/food/snacks/grown/tomato(src)
new/obj/item/weapon/reagent_containers/food/snacks/grown/carrot(src)
new/obj/item/weapon/reagent_containers/food/snacks/grown/berries(src)
new/obj/item/weapon/reagent_containers/food/snacks/grown/banana(src)
new/obj/item/weapon/reagent_containers/food/snacks/grown/tomato(src)
new/obj/item/weapon/reagent_containers/food/snacks/grown/carrot(src)
new/obj/item/weapon/reagent_containers/food/snacks/grown/berries(src)
new/obj/item/weapon/reagent_containers/food/snacks/grown/banana(src)

View File

@@ -42,11 +42,11 @@
acceptable_reagents |= reagent
if (recipe.items)
max_n_of_items = max(max_n_of_items,recipe.items.len)
// This will do until I can think of a fun recipe to use dionaea in -
// will also allow anything using the holder item to be microwaved into
// impure carbon. ~Z
acceptable_items |= /obj/item/weapon/holder
acceptable_items |= /obj/item/weapon/reagent_containers/food/snacks/grown
/*******************
* Item Adding
@@ -274,7 +274,7 @@
cooked.loc = src.loc
return
/obj/machinery/microwave/proc/wzhzhzh(var/seconds as num)
/obj/machinery/microwave/proc/wzhzhzh(var/seconds as num) // Whoever named this proc is fucking literally Satan. ~ Z
for (var/i=1 to seconds)
if (stat & (NOPOWER|BROKEN))
return 0

View File

@@ -1,148 +0,0 @@
/obj/machinery/processor
name = "Food Processor"
icon = 'icons/obj/kitchen.dmi'
icon_state = "processor"
layer = 2.9
density = 1
anchored = 1
var/broken = 0
var/processing = 0
use_power = 1
idle_power_usage = 5
active_power_usage = 50
/datum/food_processor_process
var/input
var/output
var/time = 40
proc/process(loc, what)
if (src.output && loc)
new src.output(loc)
if (what)
del(what)
/* objs */
meat
input = /obj/item/weapon/reagent_containers/food/snacks/meat
output = /obj/item/weapon/reagent_containers/food/snacks/meatball
potato
input = /obj/item/weapon/reagent_containers/food/snacks/grown/potato
output = /obj/item/weapon/reagent_containers/food/snacks/rawsticks
carrot
input = /obj/item/weapon/reagent_containers/food/snacks/grown/carrot
output = /obj/item/weapon/reagent_containers/food/snacks/carrotfries
soybeans
input = /obj/item/weapon/reagent_containers/food/snacks/grown/soybeans
output = /obj/item/weapon/reagent_containers/food/snacks/soydope
wheat
input = /obj/item/weapon/reagent_containers/food/snacks/grown/wheat
output = /obj/item/weapon/reagent_containers/food/snacks/flour
spaghetti
input = /obj/item/weapon/reagent_containers/food/snacks/flour
output = /obj/item/weapon/reagent_containers/food/snacks/spagetti
/* mobs */
mob
process(loc, what)
..()
slime
input = /mob/living/carbon/slime
output = /obj/item/weapon/reagent_containers/glass/beaker/slime
monkey
process(loc, what)
var/mob/living/carbon/monkey/O = what
if (O.client) //grief-proof
O.loc = loc
O.visible_message("\blue Suddenly [O] jumps out from the processor!", \
"You jump out from the processor", \
"You hear chimp")
return
var/obj/item/weapon/reagent_containers/glass/bucket/bucket_of_blood = new(loc)
var/datum/reagent/blood/B = new()
B.holder = bucket_of_blood
B.volume = 70
//set reagent data
B.data["donor"] = O
for(var/datum/disease/D in O.viruses)
if(D.spread_type != SPECIAL)
B.data["viruses"] += D.Copy()
B.data["blood_DNA"] = copytext(O.dna.unique_enzymes,1,0)
if(O.resistances&&O.resistances.len)
B.data["resistances"] = O.resistances.Copy()
bucket_of_blood.reagents.reagent_list += B
bucket_of_blood.reagents.update_total()
bucket_of_blood.on_reagent_change()
//bucket_of_blood.reagents.handle_reactions() //blood doesn't react
..()
input = /mob/living/carbon/monkey
output = null
/obj/machinery/processor/proc/select_recipe(var/X)
for (var/Type in typesof(/datum/food_processor_process) - /datum/food_processor_process - /datum/food_processor_process/mob)
var/datum/food_processor_process/P = new Type()
if (!istype(X, P.input))
continue
return P
return 0
/obj/machinery/processor/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(src.processing)
user << "\red The processor is in the process of processing."
return 1
if(src.contents.len > 0) //TODO: several items at once? several different items?
user << "\red Something is already in the processing chamber."
return 1
var/what = O
if (istype(O, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = O
what = G.affecting
var/datum/food_processor_process/P = select_recipe(what)
if (!P)
user << "\red That probably won't blend."
return 1
user.visible_message("[user] put [what] into [src].", \
"You put the [what] into [src].")
user.drop_item()
what:loc = src
return
/obj/machinery/processor/attack_hand(var/mob/user as mob)
if (src.stat != 0) //NOPOWER etc
return
if(src.processing)
user << "\red The processor is in the process of processing."
return 1
if(src.contents.len == 0)
user << "\red The processor is empty."
return 1
for(var/O in src.contents)
var/datum/food_processor_process/P = select_recipe(O)
if (!P)
log_admin("DEBUG: [O] in processor havent suitable recipe. How do you put it in?") //-rastaf0
continue
src.processing = 1
user.visible_message("\blue [user] turns on \a [src].", \
"You turn on \a [src].", \
"You hear a food processor.")
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
use_power(500)
sleep(P.time)
P.process(src.loc, O)
src.processing = 0
src.visible_message("\blue \the [src] finished processing.", \
"You hear the food processor stopping/")

View File

@@ -1,7 +1,7 @@
/obj/machinery/seed_extractor
name = "seed extractor"
desc = "Extracts and bags seeds from produce."
icon = 'icons/obj/hydroponics.dmi'
icon = 'icons/obj/hydroponics_machines.dmi'
icon_state = "sextractor"
density = 1
anchored = 1
@@ -16,10 +16,10 @@ obj/machinery/seed_extractor/attackby(var/obj/item/O as obj, var/mob/user as mob
var/datum/seed/new_seed_type
if(istype(O, /obj/item/weapon/grown))
var/obj/item/weapon/grown/F = O
new_seed_type = seed_types[F.plantname]
new_seed_type = plant_controller.seeds[F.plantname]
else
var/obj/item/weapon/reagent_containers/food/snacks/grown/F = O
new_seed_type = seed_types[F.plantname]
new_seed_type = plant_controller.seeds[F.plantname]
if(new_seed_type)
user << "<span class='notice'>You extract some seeds from [O].</span>"

View File

@@ -1,126 +0,0 @@
/*
/obj/effect/biomass
icon = 'icons/obj/biomass.dmi'
icon_state = "stage1"
opacity = 0
density = 0
anchored = 1
layer = 20 //DEBUG
var/health = 10
var/stage = 1
var/obj/effect/rift/originalRift = null //the originating rift of that biomass
var/maxDistance = 15 //the maximum length of a thread
var/newSpreadDistance = 10 //the length of a thread at which new ones are created
var/curDistance = 1 //the current length of a thread
var/continueChance = 3 //weighed chance of continuing in the same direction. turning left or right has 1 weight both
var/spreadDelay = 1 //will change to something bigger later, but right now I want it to spread as fast as possible for testing
/obj/effect/rift
icon = 'icons/obj/biomass.dmi'
icon_state = "rift"
var/list/obj/effect/biomass/linkedBiomass = list() //all the biomass patches that have spread from it
var/newicon = 1 //DEBUG
/obj/effect/rift/New()
set background = 1
..()
for(var/turf/T in orange(1,src))
if(!IsValidBiomassLoc(T))
continue
var/obj/effect/biomass/starting = new /obj/effect/biomass(T)
starting.set_dir(get_dir(src,starting))
starting.originalRift = src
linkedBiomass += starting
spawn(1) //DEBUG
starting.icon_state = "[newicon]"
/obj/effect/rift/Del()
for(var/obj/effect/biomass/biomass in linkedBiomass)
del(biomass)
..()
/obj/effect/biomass/New()
set background = 1
..()
if(!IsValidBiomassLoc(loc,src))
del(src)
return
spawn(1) //so that the dir and stuff can be set by the source first
if(curDistance >= maxDistance)
return
switch(dir)
if(NORTHWEST)
set_dir(NORTH)
if(NORTHEAST)
set_dir(EAST)
if(SOUTHWEST)
set_dir(WEST)
if(SOUTHEAST)
set_dir(SOUTH)
sleep(spreadDelay)
Spread()
/obj/effect/biomass/proc/Spread(var/direction = dir)
set background = 1
var/possibleDirsInt = 0
for(var/newDirection in cardinal)
if(newDirection == turn(direction,180)) //can't go backwards
continue
var/turf/T = get_step(loc,newDirection)
if(!IsValidBiomassLoc(T,src))
continue
possibleDirsInt |= newDirection
var/list/possibleDirs = list()
if(possibleDirsInt & direction)
for(var/i=0 , i<continueChance , i++)
possibleDirs += direction
if(possibleDirsInt & turn(direction,90))
possibleDirs += turn(direction,90)
if(possibleDirsInt & turn(direction,-90))
possibleDirs += turn(direction,-90)
if(!possibleDirs.len)
return
direction = pick(possibleDirs)
var/obj/effect/biomass/newBiomass = new /obj/effect/biomass(get_step(src,direction))
newBiomass.curDistance = curDistance + 1
newBiomass.maxDistance = maxDistance
newBiomass.set_dir(direction)
newBiomass.originalRift = originalRift
newBiomass.icon_state = "[originalRift.newicon]" //DEBUG
originalRift.linkedBiomass += newBiomass
if(!(curDistance%newSpreadDistance))
var/obj/effect/rift/newrift = new /obj/effect/rift(loc)
if(originalRift.newicon <= 3)
newrift.newicon = originalRift.newicon + 1
// NewSpread()
/obj/effect/biomass/proc/NewSpread(maxDistance = 15)
set background = 1
for(var/turf/T in orange(1,src))
if(!IsValidBiomassLoc(T,src))
continue
var/obj/effect/biomass/starting = new /obj/effect/biomass(T)
starting.set_dir(get_dir(src,starting))
starting.maxDistance = maxDistance
/proc/IsValidBiomassLoc(turf/location,obj/effect/biomass/source = null)
set background = 1
for(var/obj/effect/biomass/biomass in location)
if(biomass != source)
return 0
if(istype(location,/turf/space))
return 0
if(location.density)
return 0
return 1
*/

View File

@@ -21,7 +21,18 @@
var/list/targetTurfs
var/list/wallList
var/density
var/show_log = 1
/datum/effect/effect/system/smoke_spread/chem/spores
show_log = 0
var/datum/seed/seed
/datum/effect/effect/system/smoke_spread/chem/spores/New(seed_name)
if(seed_name && plant_controller)
seed = plant_controller.seeds[seed_name]
if(!seed)
del(src)
..()
/datum/effect/effect/system/smoke_spread/chem/New()
..()
@@ -78,16 +89,17 @@
var/where = "[A.name] | [location.x], [location.y]"
var/whereLink = "<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>[where]</a>"
if(carry.my_atom.fingerprintslast)
var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast)
var/more = ""
if(M)
more = "(<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</a>)"
message_admins("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
else
message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
if(show_log)
if(carry.my_atom.fingerprintslast)
var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast)
var/more = ""
if(M)
more = "(<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</a>)"
message_admins("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
else
message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
//------------------------------------------
@@ -186,8 +198,14 @@
// Randomizes and spawns the smoke effect.
// Also handles deleting the smoke once the effect is finished.
//------------------------------------------
/datum/effect/effect/system/smoke_spread/chem/proc/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1)
var/obj/effect/effect/smoke/chem/smoke = new(location)
/datum/effect/effect/system/smoke_spread/chem/proc/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1, var/obj/effect/effect/smoke/chem/passed_smoke)
var/obj/effect/effect/smoke/chem/smoke
if(passed_smoke)
smoke = passed_smoke
else
smoke = new(location)
if(chemholder.reagents.reagent_list.len)
chemholder.reagents.copy_to(smoke, chemholder.reagents.total_volume / dist, safety = 1) //copy reagents to the smoke so mob/breathe() can handle inhaling the reagents
smoke.icon = I
@@ -202,6 +220,11 @@
fadeOut(smoke)
smoke.delete()
/datum/effect/effect/system/smoke_spread/chem/spores/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1)
var/obj/effect/effect/smoke/chem/spores = new(location)
spores.name = "cloud of [seed.seed_name] [seed.seed_noun]"
..(T, I, dist, spores)
//------------------------------------------
// Fades out the smoke smoothly using it's alpha variable.
//------------------------------------------
@@ -232,7 +255,7 @@
if(!(target in wallList))
wallList += target
continue
if(target in pending)
continue
if(target in complete)
@@ -241,7 +264,7 @@
continue
if(current.c_airblock(target)) //this is needed to stop chemsmoke from passing through thin window walls
continue
if(target.c_airblock(current))
if(target.c_airblock(current))
continue
pending += target

View File

@@ -42,7 +42,7 @@ var/global/list/image/splatter_cache=list()
dry()
/obj/effect/decal/cleanable/blood/update_icon()
if(basecolor == "rainbow") basecolor = "#[pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))]"
if(basecolor == "rainbow") basecolor = "#[get_random_colour(1)]"
color = basecolor
/obj/effect/decal/cleanable/blood/Crossed(mob/living/carbon/human/perp)
@@ -165,11 +165,11 @@ var/global/list/image/splatter_cache=list()
var/image/giblets = new(base_icon, "[icon_state]_flesh", dir)
if(!fleshcolor || fleshcolor == "rainbow")
fleshcolor = "#[pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))]"
fleshcolor = "#[get_random_colour(1)]"
giblets.color = fleshcolor
var/icon/blood = new(base_icon,"[icon_state]",dir)
if(basecolor == "rainbow") basecolor = "#[pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))]"
if(basecolor == "rainbow") basecolor = "#[get_random_colour(1)]"
blood.Blend(basecolor,ICON_MULTIPLY)
icon = blood

View File

@@ -133,3 +133,13 @@
layer = 2
icon = 'icons/effects/tomatodecal.dmi'
random_icon_states = list("smashed_pie")
/obj/effect/decal/cleanable/fruit_smudge
name = "smudge"
desc = "Some kind of fruit smear."
density = 0
anchored = 1
layer = 2
icon = 'icons/effects/blood.dmi'
icon_state = "mfloor1"
random_icon_states = list("mfloor1", "mfloor2", "mfloor3", "mfloor4", "mfloor5", "mfloor6", "mfloor7")

View File

@@ -17,6 +17,14 @@
icon = 'icons/mob/robots.dmi'
icon_state = "remainsrobot"
/obj/effect/decal/remains/mouse
desc = "They look like the remains of a small rodent."
icon_state = "mouse"
/obj/effect/decal/remains/lizard
desc = "They look like the remains of a small rodent."
icon_state = "lizard"
/obj/effect/decal/remains/attack_hand(mob/user as mob)
user << "<span class='notice'>[src] sinks together into a pile of ash.</span>"
var/turf/simulated/floor/F = get_turf(src)

View File

@@ -1,166 +0,0 @@
//separate dm since hydro is getting bloated already
/obj/effect/glowshroom
name = "glowshroom"
anchored = 1
opacity = 0
density = 0
icon = 'icons/obj/lighting.dmi'
icon_state = "glowshroomf"
layer = 2.1
l_color = "#003300"
var/endurance = 30
var/potency = 30
var/delay = 1200
var/floor = 0
var/yield = 3
var/spreadChance = 40
var/spreadIntoAdjacentChance = 60
var/evolveChance = 2
var/lastTick = 0
var/spreaded = 1
/obj/effect/glowshroom/single
spreadChance = 0
/obj/effect/glowshroom/New()
..()
set_dir(CalcDir())
if(!floor)
switch(dir) //offset to make it be on the wall rather than on the floor
if(NORTH)
pixel_y = 32
if(SOUTH)
pixel_y = -32
if(EAST)
pixel_x = 32
if(WEST)
pixel_x = -32
icon_state = "glowshroom[rand(1,3)]"
else //if on the floor, glowshroom on-floor sprite
icon_state = "glowshroomf"
processing_objects += src
SetLuminosity(round(potency/15))
lastTick = world.timeofday
/obj/effect/glowshroom/Del()
processing_objects -= src
..()
/obj/effect/glowshroom/process()
if(!spreaded)
return
if(((world.timeofday - lastTick) > delay) || ((world.timeofday - lastTick) < 0))
lastTick = world.timeofday
spreaded = 0
for(var/i=1,i<=yield,i++)
if(prob(spreadChance))
var/list/possibleLocs = list()
var/spreadsIntoAdjacent = 0
if(prob(spreadIntoAdjacentChance))
spreadsIntoAdjacent = 1
for(var/turf/simulated/floor/plating/airless/asteroid/earth in view(3,src))
if(spreadsIntoAdjacent || !locate(/obj/effect/glowshroom) in view(1,earth))
possibleLocs += earth
if(!possibleLocs.len)
break
var/turf/newLoc = pick(possibleLocs)
var/shroomCount = 0 //hacky
var/placeCount = 1
for(var/obj/effect/glowshroom/shroom in newLoc)
shroomCount++
for(var/wallDir in cardinal)
var/turf/isWall = get_step(newLoc,wallDir)
if(isWall.density)
placeCount++
if(shroomCount >= placeCount)
continue
var/obj/effect/glowshroom/child = new /obj/effect/glowshroom(newLoc)
child.potency = potency
child.yield = yield
child.delay = delay
child.endurance = endurance
spreaded++
if(prob(evolveChance)) //very low chance to evolve on its own
potency += rand(4,6)
/obj/effect/glowshroom/proc/CalcDir(turf/location = loc)
set background = 1
var/direction = 16
for(var/wallDir in cardinal)
var/turf/newTurf = get_step(location,wallDir)
if(newTurf.density)
direction |= wallDir
for(var/obj/effect/glowshroom/shroom in location)
if(shroom == src)
continue
if(shroom.floor) //special
direction &= ~16
else
direction &= ~shroom.dir
var/list/dirList = list()
for(var/i=1,i<=16,i <<= 1)
if(direction & i)
dirList += i
if(dirList.len)
var/newDir = pick(dirList)
if(newDir == 16)
floor = 1
newDir = 1
return newDir
floor = 1
return 1
/obj/effect/glowshroom/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
endurance -= W.force
CheckEndurance()
/obj/effect/glowshroom/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(50))
del(src)
return
if(3.0)
if (prob(5))
del(src)
return
else
return
/obj/effect/glowshroom/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
endurance -= 5
CheckEndurance()
/obj/effect/glowshroom/proc/CheckEndurance()
if(endurance <= 0)
del(src)

View File

@@ -198,11 +198,7 @@
// apparently called whenever an item is removed from a slot, container, or anything else.
/obj/item/proc/dropped(mob/user as mob)
..()
if(zoom) //binoculars, scope, etc
user.client.view = world.view
user.client.pixel_x = 0
user.client.pixel_y = 0
zoom = 0
if(zoom) zoom() //binoculars, scope, etc
// called just as an item is picked up (loc is not yet changed)
/obj/item/proc/pickup(mob/user)
@@ -660,9 +656,8 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
cannotzoom = 1
if(!zoom && !cannotzoom)
if(!usr.hud_used.hud_shown)
usr.button_pressed_F12(1) // If the user has already limited their HUD this avoids them having a HUD when they zoom in
usr.button_pressed_F12(1)
if(usr.hud_used.hud_shown)
usr.toggle_zoom_hud() // If the user has already limited their HUD this avoids them having a HUD when they zoom in
usr.client.view = viewsize
zoom = 1
@@ -688,7 +683,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
else
usr.client.view = world.view
if(!usr.hud_used.hud_shown)
usr.button_pressed_F12(1)
usr.toggle_zoom_hud()
zoom = 0
usr.client.pixel_x = 0

View File

@@ -28,3 +28,30 @@
new /obj/item/weapon/reagent_containers/pill/zoom( src )
new /obj/item/weapon/reagent_containers/pill/zoom( src )
new /obj/item/weapon/reagent_containers/pill/zoom( src )
/obj/item/weapon/reagent_containers/glass/beaker/vial/random
flags = 0
var/list/random_reagent_list = list(list("water" = 15) = 1, list("cleaner" = 15) = 1)
/obj/item/weapon/reagent_containers/glass/beaker/vial/random/toxin
random_reagent_list = list(
list("mindbreaker" = 10, "space_drugs" = 20) = 3,
list("carpotoxin" = 15) = 2,
list("impedrezene" = 15) = 2,
list("zombiepowder" = 10) = 1)
/obj/item/weapon/reagent_containers/glass/beaker/vial/random/New()
..()
if(is_open_container())
flags ^= OPENCONTAINER
var/list/picked_reagents = pickweight(random_reagent_list)
for(var/reagent in picked_reagents)
reagents.add_reagent(reagent, picked_reagents[reagent])
var/list/names = new
for(var/datum/reagent/R in reagents.reagent_list)
names += R.name
desc = "Contains [english_list(names)]."
update_icon()

View File

@@ -4,7 +4,6 @@ T-RAY
DETECTIVE SCANNER
HEALTH ANALYZER
GAS ANALYZER
PLANT ANALYZER
MASS SPECTROMETER
REAGENT SCANNER
*/

View File

@@ -27,6 +27,15 @@ datum/uplink_item/proc/description()
description = replacetext(initial(temp.desc), "\n", "<br>")
return description
/datum/uplink_item/proc/generate_item(var/newloc)
var/list/L = list()
if(ispath(path))
L += new path(newloc)
else if(islist(path))
for(var/item_path in path)
L += new item_path(newloc)
return L
datum/nano_item_lists
var/list/items_nano
var/list/items_reference
@@ -136,10 +145,11 @@ datum/nano_item_lists
used_TC += UI.cost
feedback_add_details("traitor_uplink_items_bought", reference)
var/obj/I = new UI.path(get_turf(usr))
var/list/L = UI.generate_item(get_turf(usr))
if(ishuman(usr))
var/mob/living/carbon/human/A = usr
A.put_in_any_hand_if_possible(I)
for(var/obj/I in L)
A.put_in_any_hand_if_possible(I)
purchase_log[UI] = purchase_log[UI] + 1

View File

@@ -127,7 +127,7 @@
name = "\improper S'rendarr's Hand leaf"
singular_name = "S'rendarr's Hand leaf"
desc = "A poultice made of soft leaves that is rubbed on bruises."
icon = 'icons/obj/harvest.dmi'
//icon = 'icons/obj/harvest.dmi'
icon_state = "shandp"
heal_brute = 7
@@ -135,7 +135,7 @@
name = "\improper Messa's Tear petals"
singular_name = "Messa's Tear petals"
desc = "A poultice made of cold, blue petals that is rubbed on burns."
icon = 'icons/obj/harvest.dmi'
//icon = 'icons/obj/harvest.dmi'
icon_state = "mtearp"
heal_burn = 7
@@ -159,7 +159,7 @@
if(affecting.open == 0)
var/bandaged = affecting.bandage()
var/disinfected = affecting.disinfect()
if(!(bandaged || disinfected))
user << "\red The wounds on [M]'s [affecting.display_name] have already been treated."
return 1

View File

@@ -440,7 +440,7 @@
/obj/item/toy/waterflower
name = "water flower"
desc = "A seemingly innocent sunflower...with a twist."
icon = 'icons/obj/harvest.dmi'
//icon = 'icons/obj/harvest.dmi'
icon_state = "sunflower"
item_state = "sunflower"
var/empty = 0

View File

@@ -4,7 +4,7 @@
//uncomment when this is updated to match storage update
/*
/obj/item/weapon/seedbag
icon = 'icons/obj/hydroponics.dmi'
icon = 'icons/obj/hydroponics_machines.dmi'
icon_state = "seedbag"
name = "Seed Bag"
desc = "A small satchel made for organizing seeds."

View File

@@ -88,7 +88,7 @@
/obj/item/weapon/storage/bag/plants
name = "plant bag"
icon = 'icons/obj/hydroponics.dmi'
icon = 'icons/obj/hydroponics_machines.dmi'
icon_state = "plantbag"
storage_slots = 50; //the number of plant pieces it can carry.
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class

View File

@@ -219,8 +219,8 @@
new /obj/item/ammo_casing/shotgun/stunshell(src)
new /obj/item/ammo_casing/shotgun/stunshell(src)
/obj/item/weapon/storage/box/heavysniperammo
name = "box of 14.5mm AP shells"
/obj/item/weapon/storage/box/sniperammo
name = "box of 14.5mm shells"
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
New()

View File

@@ -128,6 +128,22 @@
new /obj/item/stack/medical/splint(src)
return
/obj/item/weapon/storage/firstaid/surgery
name = "surgery kit"
desc = "Contains tools for surgery."
/obj/item/weapon/storage/firstaid/surgery/New()
..()
if (empty) return
new /obj/item/weapon/bonesetter(src)
new /obj/item/weapon/cautery(src)
new /obj/item/weapon/circular_saw(src)
new /obj/item/weapon/hemostat(src)
new /obj/item/weapon/retractor(src)
new /obj/item/weapon/scalpel(src)
new /obj/item/weapon/surgicaldrill(src)
return
/*
* Pill Bottles
*/

View File

@@ -30,6 +30,7 @@
new /obj/item/ammo_magazine/a357(src)
new /obj/item/weapon/card/emag(src)
new /obj/item/weapon/plastique(src)
new /obj/item/weapon/plastique(src)
return
if("murder")
@@ -47,6 +48,7 @@
return
if("hacker")
new /obj/item/device/encryptionkey/syndicate(src)
new /obj/item/weapon/aiModule/syndicate(src)
new /obj/item/weapon/card/emag(src)
new /obj/item/device/encryptionkey/binary(src)
@@ -62,10 +64,9 @@
return
if("smoothoperator")
new /obj/item/weapon/gun/projectile/pistol(src)
new /obj/item/weapon/silencer(src)
new /obj/item/weapon/soap/syndie(src)
new /obj/item/weapon/storage/box/syndie_kit/g9mm(src)
new /obj/item/weapon/storage/bag/trash(src)
new /obj/item/weapon/soap/syndie(src)
new /obj/item/bodybag(src)
new /obj/item/clothing/under/suit_jacket(src)
new /obj/item/clothing/shoes/laceup(src)
@@ -176,6 +177,15 @@
new /obj/item/weapon/gun/projectile/pistol(src)
new /obj/item/weapon/silencer(src)
/obj/item/weapon/storage/box/syndie_kit/toxin
name = "toxin kit"
desc = "An apple will not be enough to keep the doctor away after this."
/obj/item/weapon/storage/box/syndie_kit/toxin/New()
..()
new /obj/item/weapon/reagent_containers/glass/beaker/vial/random/toxin(src)
new /obj/item/weapon/reagent_containers/syringe(src)
/obj/item/weapon/storage/box/syndie_kit/cigarette
name = "\improper Tricky smokes"
desc = "Comes with the following brands of cigarettes, in this order: 2xFlash, 2xSmoke, 1xMindBreaker, 1xTricordrazine. Avoid mixing them up."
@@ -217,3 +227,11 @@
for(var/reagent in reagents)
C.reagents.add_reagent(reagent, reagents[reagent] * C.storage_slots)
/obj/item/weapon/storage/box/syndie_kit/ewar_voice
name = "Electrowarfare and Voice Synthesiser kit"
desc = "Kit for confounding organic and synthetic entities alike."
/obj/item/weapon/storage/box/syndie_kit/ewar_voice/New()
..()
new /obj/item/rig_module/electrowarfare_suite(src)
new /obj/item/rig_module/voice(src)

View File

@@ -109,10 +109,10 @@
W.relativewall()
for(var/direction in cardinal)
for(var/obj/effect/glowshroom/shroom in get_step(src,direction))
for(var/obj/effect/plant/shroom in get_step(src,direction))
if(!shroom.floor) //shrooms drop to the floor
shroom.floor = 1
shroom.icon_state = "glowshroomf"
shroom.update_icon()
shroom.pixel_x = 0
shroom.pixel_y = 0

View File

@@ -25,11 +25,17 @@
usr << "\red Movement is admin-disabled." //This is to identify lag problems
return
if (istype(A,/mob/living/carbon))
var/mob/living/carbon/M = A
if (istype(A,/mob/living))
var/mob/living/M = A
if(M.lying)
..()
return
// Ugly hack :( Should never have multiple plants in the same tile.
var/obj/effect/plant/plant = locate() in contents
if(plant) plant.trodden_on(M)
// Dirt overlays.
dirt++
var/obj/effect/decal/cleanable/dirt/dirtoverlay = locate(/obj/effect/decal/cleanable/dirt, src)
if (dirt >= 50)
@@ -41,30 +47,21 @@
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(istype(H.shoes, /obj/item/clothing/shoes/clown_shoes))
var/obj/item/clothing/shoes/clown_shoes/O = H.shoes
if(H.m_intent == "run")
if(O.footstep >= 2)
O.footstep = 0
playsound(src, "clownstep", 50, 1) // this will get annoying very fast.
else
O.footstep++
else
playsound(src, "clownstep", 20, 1)
// Tracking blood
var/list/bloodDNA = null
var/bloodcolor=""
if(H.shoes)
var/obj/item/clothing/shoes/S = H.shoes
if(S.track_blood && S.blood_DNA)
bloodDNA = S.blood_DNA
bloodcolor=S.blood_color
S.track_blood--
if(istype(S))
S.handle_movement(src,(H.m_intent == "run" ? 1 : 0))
if(S.track_blood && S.blood_DNA)
bloodDNA = S.blood_DNA
bloodcolor=S.blood_color
S.track_blood--
else
if(H.track_blood && H.feet_blood_DNA)
bloodDNA = H.feet_blood_DNA
bloodcolor=H.feet_blood_color
bloodcolor = H.feet_blood_color
H.track_blood--
if (bloodDNA)
@@ -75,14 +72,11 @@
bloodDNA = null
var/noslip = 0
for (var/obj/structure/bed/chair/C in loc)
if (C.buckled_mob == M)
noslip = 1
if((wet == 1 && M.m_intent == "walk") || noslip)
return // no slipping while sitting in a chair, plz
if(src.wet)
if(M.buckled || (src.wet == 1 && M.m_intent == "walk"))
return
var/slip_dist = 1
var/slip_stun = 6
var/floor_type = "wet"

View File

@@ -51,6 +51,8 @@
/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()
..(newtype)
//Appearance

View File

@@ -14,6 +14,15 @@ var/list/accessible_z_levels = list("1" = 5, "3" = 10, "4" = 15, "5" = 10, "6" =
/turf/space/New()
if(!istype(src, /turf/space/transit))
icon_state = "[((x + y) ^ ~(x * y) + z) % 25]"
update_starlight()
/turf/space/proc/update_starlight()
if(!config.starlight)
return
if(locate(/turf/simulated) in orange(src,1))
SetLuminosity(3)
else
SetLuminosity(0)
/turf/space/attackby(obj/item/C as obj, mob/user as mob)

View File

@@ -251,6 +251,9 @@
if(air_master)
air_master.mark_for_update(src)
for(var/turf/space/S in range(W,1))
S.update_starlight()
W.levelupdate()
return W
@@ -272,6 +275,9 @@
if(air_master)
air_master.mark_for_update(src)
for(var/turf/space/S in range(W,1))
S.update_starlight()
W.levelupdate()
return W