mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-05 15:03:48 +00:00
Merged with dev.
This commit is contained in:
@@ -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()
|
||||
@@ -633,7 +639,7 @@ var/list/ghostteleportlocs = list()
|
||||
/area/prison/cell_block/C
|
||||
name = "Prison Cell Block C"
|
||||
icon_state = "brig"
|
||||
|
||||
|
||||
////////////////////
|
||||
//SPACE STATION 13//
|
||||
////////////////////
|
||||
@@ -1070,7 +1076,7 @@ var/list/ghostteleportlocs = list()
|
||||
name = "\improper Engineering"
|
||||
icon_state = "engineering"
|
||||
ambience = list('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg')
|
||||
|
||||
|
||||
/area/engineering/atmos
|
||||
name = "\improper Atmospherics"
|
||||
icon_state = "atmos"
|
||||
@@ -1082,7 +1088,7 @@ var/list/ghostteleportlocs = list()
|
||||
/area/engineering/atmos/storage
|
||||
name = "\improper Atmospherics Storage"
|
||||
icon_state = "atmos_storage"
|
||||
|
||||
|
||||
/area/engineering/drone_fabrication
|
||||
name = "\improper Drone Fabrication"
|
||||
icon_state = "drone_fab"
|
||||
@@ -1130,7 +1136,7 @@ var/list/ghostteleportlocs = list()
|
||||
/area/engineering/locker_room
|
||||
name = "\improper Engineering Locker Room"
|
||||
icon_state = "engineering_locker"
|
||||
|
||||
|
||||
/area/engineering/workshop
|
||||
name = "\improper Engineering Workshop"
|
||||
icon_state = "engineering_workshop"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -12,9 +12,6 @@
|
||||
var/throwpass = 0
|
||||
var/germ_level = GERM_LEVEL_AMBIENT // The higher the germ level, the more germ on the atom.
|
||||
|
||||
//Examine tab
|
||||
var/datum/descriptions/descriptions = null //See code/datums/descriptions.dm for details.
|
||||
|
||||
///Chemistry.
|
||||
var/datum/reagents/reagents = null
|
||||
|
||||
@@ -205,47 +202,8 @@ its easier to just keep the beam vertical.
|
||||
|
||||
user << "\icon[src] That's [f_name] [suffix]"
|
||||
|
||||
var/datum/descriptions/D = descriptions
|
||||
if(istype(D))
|
||||
user.description_holders["info"] = get_descriptions_info()
|
||||
user.description_holders["fluff"] = get_descriptions_fluff()
|
||||
if(user.mind.special_role)
|
||||
user.description_holders["antag"] = get_descriptions_antag()
|
||||
else
|
||||
user.description_holders["info"] = null
|
||||
user.description_holders["fluff"] = null
|
||||
user.description_holders["antag"] = null
|
||||
|
||||
if(name) //This shouldn't be needed but I'm paranoid.
|
||||
user.description_holders["name"] = "[src.name]" //\icon[src]
|
||||
|
||||
user.description_holders["icon"] = "\icon[src]"
|
||||
|
||||
if(desc)
|
||||
user << desc
|
||||
user.description_holders["desc"] = src.desc
|
||||
else
|
||||
user.description_holders["desc"] = null //This is needed, or else if you examine one thing with a desc, then another without, the panel will retain the first examined's desc.
|
||||
|
||||
return distance == -1 || (get_dist(src, user) <= distance)
|
||||
|
||||
//Override these if you need special behaviour for a specific type.
|
||||
|
||||
/atom/proc/get_descriptions_info()
|
||||
if(descriptions && descriptions.info)
|
||||
return descriptions.info
|
||||
return
|
||||
|
||||
/atom/proc/get_descriptions_fluff()
|
||||
if(descriptions && descriptions.fluff)
|
||||
return descriptions.fluff
|
||||
return
|
||||
|
||||
/atom/proc/get_descriptions_antag()
|
||||
if(descriptions && descriptions.antag)
|
||||
return descriptions.antag
|
||||
return
|
||||
|
||||
// called by mobs when e.g. having the atom as their machine, pulledby, loc (AKA mob being inside the atom) or buckled var set.
|
||||
// see code/modules/mob/mob_movement.dm for more.
|
||||
/atom/proc/relaymove()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
votable = 0
|
||||
|
||||
uplink_welcome = "EVIL METEOR Uplink Console:"
|
||||
uplink_uses = 10
|
||||
|
||||
|
||||
/datum/game_mode/meteor/announce()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 += "• "
|
||||
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
|
||||
|
||||
@@ -250,6 +250,9 @@
|
||||
target = safepick(view(3,target))
|
||||
if(!target)
|
||||
return
|
||||
if(istype(target, /obj/machinery))
|
||||
if (src.interface_action(target))
|
||||
return
|
||||
if(!target.Adjacent(src))
|
||||
if(selected && selected.is_ranged())
|
||||
selected.action(target)
|
||||
@@ -259,6 +262,29 @@
|
||||
src.melee_action(target)
|
||||
return
|
||||
|
||||
/obj/mecha/proc/interface_action(obj/machinery/target)
|
||||
if(istype(target, /obj/machinery/access_button))
|
||||
src.occupant_message("<span class='notice'>Interfacing with [target].</span>")
|
||||
src.log_message("Interfaced with [target].")
|
||||
target.attack_hand(src.occupant)
|
||||
return 1
|
||||
if(istype(target, /obj/machinery/embedded_controller))
|
||||
target.ui_interact(src.occupant)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/mecha/contents_nano_distance(var/src_object, var/mob/living/user)
|
||||
. = user.shared_living_nano_distance(src_object) //allow them to interact with anything they can interact with normally.
|
||||
if(. != STATUS_INTERACTIVE)
|
||||
//Allow interaction with the mecha or anything that is part of the mecha
|
||||
if(src_object == src || (src_object in src))
|
||||
return STATUS_INTERACTIVE
|
||||
if(src.Adjacent(src_object))
|
||||
src.occupant_message("<span class='notice'>Interfacing with [src_object]...</span>")
|
||||
src.log_message("Interfaced with [src_object].")
|
||||
return STATUS_INTERACTIVE
|
||||
if(src_object in view(2, src))
|
||||
return STATUS_UPDATE //if they're close enough, allow the occupant to see the screen through the viewport or whatever.
|
||||
|
||||
/obj/mecha/proc/melee_action(atom/target)
|
||||
return
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -11,12 +11,30 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
var/cost = 0
|
||||
var/path = null
|
||||
var/reference = ""
|
||||
var/description = ""
|
||||
|
||||
datum/uplink_item/New(var/itemPath, var/itemCost as num, var/itemName as text, var/itemReference as text)
|
||||
datum/uplink_item/New(var/itemPath, var/itemCost as num, var/itemName as text, var/itemReference as text, var/itemDescription)
|
||||
cost = itemCost
|
||||
path = itemPath
|
||||
name = itemName
|
||||
reference = itemReference
|
||||
description = itemDescription
|
||||
|
||||
|
||||
datum/uplink_item/proc/description()
|
||||
if(!description)
|
||||
// Fallback description
|
||||
var/obj/temp = src.path
|
||||
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
|
||||
@@ -41,16 +59,17 @@ datum/nano_item_lists
|
||||
uses = ticker.mode.uplink_uses
|
||||
ItemsCategory = ticker.mode.uplink_items
|
||||
|
||||
var/datum/nano_item_lists/IL = generate_item_lists()
|
||||
nanoui_items = IL.items_nano
|
||||
ItemsReference = IL.items_reference
|
||||
|
||||
world_uplinks += src
|
||||
|
||||
/obj/item/device/uplink/Del()
|
||||
world_uplinks -= src
|
||||
..()
|
||||
|
||||
/obj/item/device/uplink/proc/generate_items()
|
||||
var/datum/nano_item_lists/IL = generate_item_lists()
|
||||
nanoui_items = IL.items_nano
|
||||
ItemsReference = IL.items_reference
|
||||
|
||||
// BS12 no longer use this menu but there are forks that do, hency why we keep it
|
||||
/obj/item/device/uplink/proc/generate_menu()
|
||||
var/dat = "<B>[src.welcome]</B><BR>"
|
||||
@@ -87,7 +106,7 @@ datum/nano_item_lists
|
||||
for(var/category in ItemsCategory)
|
||||
nano[++nano.len] = list("Category" = category, "items" = list())
|
||||
for(var/datum/uplink_item/I in ItemsCategory[category])
|
||||
nano[nano.len]["items"] += list(list("Name" = I.name, "Cost" = I.cost, "obj_path" = I.reference))
|
||||
nano[nano.len]["items"] += list(list("Name" = I.name, "Description" = I.description(),"Cost" = I.cost, "obj_path" = I.reference))
|
||||
reference[I.reference] = I
|
||||
|
||||
var/datum/nano_item_lists/result = new
|
||||
@@ -126,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
|
||||
|
||||
@@ -189,6 +209,8 @@ datum/nano_item_lists
|
||||
data["welcome"] = welcome
|
||||
data["crystals"] = uses
|
||||
data["menu"] = nanoui_menu
|
||||
if(!nanoui_items)
|
||||
generate_items()
|
||||
data["nano_items"] = nanoui_items
|
||||
data += nanoui_data
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user