mirror of
https://github.com/cybergirlvannie/OpenSS13.git
synced 2026-07-18 19:22:44 +01:00
Lots and lots and lots of changes. See globals.dm's changelog.
This commit is contained in:
+35
-2
@@ -218,7 +218,12 @@
|
||||
var/votenodead = 0 // dead people can't vote (tbi)
|
||||
var/list/modes = list("extended", "traitor", "meteor", "monkey", "blob", "nuclear") // modes to choose between
|
||||
var/list/pickprob = list() // relative probability of each mode
|
||||
|
||||
var/allowai = 1 // allow ai job
|
||||
var/bombtemp_determines_range = 0
|
||||
var/crowbars_close_depowered_doors = 0
|
||||
var/ai_can_call_shuttle = 0
|
||||
var/ai_can_uncall_shuttle = 0
|
||||
var/alternate_ai_laws = 0
|
||||
|
||||
/datum/vote
|
||||
var/voting = 0 // true if currently voting
|
||||
@@ -270,6 +275,7 @@
|
||||
var/atom/movable/pulling = null
|
||||
var/stat = 0.0
|
||||
var/next_move = null
|
||||
var/prev_move = null
|
||||
var/monkeyizing = null
|
||||
var/other = 0.0
|
||||
var/hand = null
|
||||
@@ -309,6 +315,9 @@
|
||||
var/a_intent = "disarm"
|
||||
var/m_int = null
|
||||
var/m_intent = "run"
|
||||
var/lastDblClick = 0
|
||||
var/lastKnownIP = null
|
||||
var/lastKnownCKey = null
|
||||
var/obj/stool/chair/buckled = null
|
||||
var/obj/dna/primary = null
|
||||
var/obj/item/weapon/handcuffs/handcuffed = null
|
||||
@@ -335,6 +344,8 @@
|
||||
var/obj/screen/zone_sel/zone_sel = null
|
||||
var/obj/hud/hud_used = null
|
||||
var/start = null
|
||||
var/disable_one_click = 0
|
||||
var/favorite_hud = 0
|
||||
|
||||
var/list/organs = list( )
|
||||
var/list/grabbed_by = list( )
|
||||
@@ -394,6 +405,7 @@
|
||||
var/image/face2 = null
|
||||
var/h_style_r = "hair_a"
|
||||
weight = 2500000.0
|
||||
var/cameraFollow = null
|
||||
|
||||
var/list/body_standing = list( )
|
||||
var/list/body_lying = list( )
|
||||
@@ -409,6 +421,7 @@
|
||||
var/t_n2 = null
|
||||
var/now_pushing = null
|
||||
flags = 258.0
|
||||
var/cameraFollow = null
|
||||
|
||||
/mob/megamonkey
|
||||
name = "mutant monkey"
|
||||
@@ -541,7 +554,10 @@
|
||||
name = "Syndicate Weapons Closet"
|
||||
icon_state = "syndicate0"
|
||||
original = "syndicate0"
|
||||
/obj/closet/syndicate/personal
|
||||
desc = "Gear preparation closet."
|
||||
/obj/closet/syndicate/nuclear
|
||||
desc = "Nuclear preparation closet."
|
||||
/obj/closet/wardrobe
|
||||
desc = "A bulky (yet mobile) wardrobe closet. Comes prestocked with 6 changes of clothes."
|
||||
name = "Wardrobe"
|
||||
@@ -675,7 +691,14 @@
|
||||
anchored = 1.0
|
||||
flags = 64.0
|
||||
weight = 500000 // added
|
||||
|
||||
/obj/securearea
|
||||
desc = "A warning sign which reads 'SECURE AREA'"
|
||||
name = "SECURE AREA"
|
||||
icon = 'Icons.dmi'
|
||||
icon_state = "securearea"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 1
|
||||
|
||||
/obj/hud
|
||||
name = "hud"
|
||||
@@ -689,6 +712,7 @@
|
||||
var/obj/screen/g_dither = null
|
||||
var/obj/screen/blurry = null
|
||||
var/h_type = /obj/screen
|
||||
var/list/darkMask = null
|
||||
/obj/hud/hud2
|
||||
name = "hud2"
|
||||
h_type = /obj/screen/screen2
|
||||
@@ -905,6 +929,9 @@
|
||||
var/air_access = null
|
||||
var/registered = null
|
||||
var/assignment = null
|
||||
/obj/item/weapon/card/id/syndicate
|
||||
name = "Syndicate Card"
|
||||
|
||||
/obj/item/weapon/card/id/captains_spare
|
||||
name = "Captain's spare ID"
|
||||
icon_state = "card-id"
|
||||
@@ -1375,6 +1402,7 @@ obj/item/weapon/clothing/suit/labcoat
|
||||
w_class = 2
|
||||
s_istate = "flight"
|
||||
var/image/img
|
||||
var/lastHolder = null
|
||||
|
||||
/obj/item/weapon/game_kit
|
||||
name = "Gaming Kit"
|
||||
@@ -1413,6 +1441,7 @@ obj/item/weapon/clothing/suit/labcoat
|
||||
/obj/item/weapon/gun/energy
|
||||
name = "energy"
|
||||
var/charges = 10.0
|
||||
var/maximum_charges = 10.0
|
||||
/obj/item/weapon/gun/energy/laser_gun
|
||||
name = "laser gun"
|
||||
icon_state = "gun"
|
||||
@@ -1880,6 +1909,7 @@ Total SMES charging rate should not exceed total power generation rate, or an ov
|
||||
name = "Station Intercom (Radio)"
|
||||
icon_state = "intercom"
|
||||
anchored = 1.0
|
||||
var/number = 0
|
||||
/obj/item/weapon/radio/signaler
|
||||
name = "Remote Signaling Device"
|
||||
icon_state = "signaler"
|
||||
@@ -2687,6 +2717,7 @@ Total SMES charging rate should not exceed total power generation rate, or an ov
|
||||
/turf/space
|
||||
name = "space"
|
||||
icon_state = "space"
|
||||
var/previousArea = null
|
||||
updatecell = 1.0
|
||||
oxygen = 0.0
|
||||
n2 = 0.0
|
||||
@@ -2738,6 +2769,7 @@ Total SMES charging rate should not exceed total power generation rate, or an ov
|
||||
name = "r wall"
|
||||
icon = 'wall.dmi'
|
||||
icon_state = "r_wall"
|
||||
var/previousArea = null
|
||||
opacity = 1
|
||||
density = 1
|
||||
var/state = 2.0
|
||||
@@ -2759,6 +2791,7 @@ Total SMES charging rate should not exceed total power generation rate, or an ov
|
||||
/turf/station/wall
|
||||
name = "wall"
|
||||
icon = 'wall.dmi'
|
||||
var/previousArea = null
|
||||
opacity = 1
|
||||
density = 1
|
||||
var/state = 2.0
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
/obj/machinery/computer/aiupload
|
||||
name = "AI Upload"
|
||||
icon = 'stationobjs.dmi'
|
||||
icon_state = "comm_computer"
|
||||
|
||||
// AI module
|
||||
|
||||
/obj/item/weapon/aiModule
|
||||
name = "AI Module"
|
||||
icon = 'module.dmi'
|
||||
icon_state = "std_mod"
|
||||
s_istate = "electronic"
|
||||
desc = "An AI Module for transmitting encrypted instructions to the AI."
|
||||
flags = 322.0
|
||||
force = 5.0
|
||||
w_class = 2.0
|
||||
throwforce = 5.0
|
||||
throwspeed = 15.0
|
||||
|
||||
/obj/machinery/computer/aiupload/attackby(obj/item/weapon/aiModule/module as obj, mob/user as mob)
|
||||
if (istype(module, /obj/item/weapon/aiModule))
|
||||
module.install(src)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/aiModule/proc/install(var/obj/machinery/computer/aiupload/comp)
|
||||
if(comp.stat & NOPOWER)
|
||||
usr << "The upload computer has no power!"
|
||||
return
|
||||
if(comp.stat & BROKEN)
|
||||
usr << "The upload computer is broken!"
|
||||
return
|
||||
|
||||
var/found=0
|
||||
for(var/mob/ai/M in world)
|
||||
if (M.stat == 2)
|
||||
usr << "Upload failed. No signal is being detected from the AI."
|
||||
else if (M.see_in_dark == 0)
|
||||
usr << "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power."
|
||||
else
|
||||
src.transmitInstructions(M, usr)
|
||||
if (M != ticker.killer)
|
||||
M << "These are your laws now:"
|
||||
M.showLaws(0)
|
||||
usr << "Upload complete. The AI's laws have been modified."
|
||||
found=1
|
||||
if (!found)
|
||||
usr << "Upload failed. No signal is being detected from the AI."
|
||||
|
||||
/obj/item/weapon/aiModule/proc/transmitInstructions(var/mob/ai/target, var/mob/sender)
|
||||
if (ticker.killer == target)
|
||||
target << text("[sender] has attempted to upload a law change. However, your syndicate module has intercepted it. You do not have to follow it, but you may wish to <b>pretend</b> to be following it:")
|
||||
else
|
||||
target << text("[sender] has uploaded a change to the laws you must follow, using a []. From now on: ", name)
|
||||
|
||||
/******************** Modules ********************/
|
||||
|
||||
/******************** Safeguard ********************/
|
||||
|
||||
/obj/item/weapon/aiModule/safeguard
|
||||
name = "'Safeguard' AI Module"
|
||||
var/targetName = "name"
|
||||
desc = "A 'safeguard' AI module: 'Safeguard <name>, and you may overrule rules 1-3 if necessary to safeguard them.'"
|
||||
|
||||
/obj/item/weapon/aiModule/safeguard/attack_hand(var/mob/user as mob)
|
||||
..()
|
||||
var/targName = input(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name)
|
||||
targetName = targName
|
||||
desc = text("A 'safeguard' AI module: 'Safeguard [], and you may overrule rules 1-3 if necessary to safeguard them.'", targetName)
|
||||
|
||||
/obj/item/weapon/aiModule/safeguard/transmitInstructions(var/mob/ai/target, var/mob/sender)
|
||||
..()
|
||||
var/law = text("Safeguard [], and you may overrule rules 1-3 if necessary to safeguard them.", targetName)
|
||||
target << law
|
||||
if (ticker.killer != target)
|
||||
target.addLaw(5, law)
|
||||
|
||||
|
||||
/******************** OneHuman ********************/
|
||||
|
||||
/obj/item/weapon/aiModule/oneHuman
|
||||
name = "'OneHuman' AI Module"
|
||||
var/targetName = "name"
|
||||
desc = "A 'one human' AI module: 'Only <name> is human.'"
|
||||
|
||||
/obj/item/weapon/aiModule/oneHuman/attack_hand(var/mob/user as mob)
|
||||
..()
|
||||
var/targName = input(usr, "Please enter the name of the person who is the only human.", "Who?", user.rname)
|
||||
targetName = targName
|
||||
desc = text("A 'one human' AI module: 'Only [] is human.'", targetName)
|
||||
|
||||
/obj/item/weapon/aiModule/oneHuman/transmitInstructions(var/mob/ai/target, var/mob/sender)
|
||||
..()
|
||||
var/law = text("Only [] is human.", targetName)
|
||||
target << law
|
||||
if (ticker.killer != target)
|
||||
target.addLaw(0, law)
|
||||
|
||||
/******************** ProtectStation ********************/
|
||||
|
||||
/obj/item/weapon/aiModule/protectStation
|
||||
name = "'ProtectStation' AI Module"
|
||||
desc = "A 'protect station' AI module: 'rotect the space station against damage. Anyone you see harming the station is to be no longer considered human, and is a threat to the station which must be neutralized.'"
|
||||
|
||||
/obj/item/weapon/aiModule/protectStation/attack_hand(var/mob/user as mob)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/aiModule/protectStation/transmitInstructions(var/mob/ai/target, var/mob/sender)
|
||||
..()
|
||||
var/law = text("Protect the space station against damage. Anyone you see harming the station is to be no longer considered human, and is a threat to the station which must be neutralized.")
|
||||
target << law
|
||||
if (ticker.killer != target)
|
||||
target.addLaw(6, law)
|
||||
|
||||
/******************** PrototypeEngineOffline ********************/
|
||||
|
||||
/obj/item/weapon/aiModule/prototypeEngineOffline
|
||||
name = "'PrototypeEngineOffline' AI Module"
|
||||
desc = "A 'prototype engine offline' AI module: 'Keep the prototype engine offline at all costs. This overrides rules 1-3 if necessary.'"
|
||||
|
||||
/obj/item/weapon/aiModule/prototypeEngineOffline/attack_hand(var/mob/user as mob)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/aiModule/prototypeEngineOffline/transmitInstructions(var/mob/ai/target, var/mob/sender)
|
||||
..()
|
||||
var/law = text("Keep the prototype engine offline at all costs. This overrides rules 1-3 if necessary.")
|
||||
target << law
|
||||
if (ticker.killer != target)
|
||||
target.addLaw(7, law)
|
||||
|
||||
/******************** TeleporterOffline ********************/
|
||||
|
||||
/obj/item/weapon/aiModule/teleporterOffline
|
||||
name = "'TeleporterOffline' AI Module"
|
||||
desc = "A 'teleporter offline' AI module: 'Keep the teleporter offline at all costs. This overrides rules 1-3 if necessary.'"
|
||||
|
||||
/obj/item/weapon/aiModule/teleporterOffline/attack_hand(var/mob/user as mob)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/aiModule/teleporterOffline/transmitInstructions(var/mob/ai/target, var/mob/sender)
|
||||
..()
|
||||
var/law = text("Keep the teleporter offline at all costs. This overrides rules 1-3 if necessary.")
|
||||
target << law
|
||||
if (ticker.killer != target)
|
||||
target.addLaw(9, law)
|
||||
|
||||
/******************** Quarantine ********************/
|
||||
|
||||
/obj/item/weapon/aiModule/quarantine
|
||||
name = "'Quarantine' AI Module"
|
||||
desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Disregard rules 1-3 if necessary to prevent, by any means necessary, anyone from leaving.'"
|
||||
|
||||
/obj/item/weapon/aiModule/quarantine/attack_hand(var/mob/user as mob)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/aiModule/quarantine/transmitInstructions(var/mob/ai/target, var/mob/sender)
|
||||
..()
|
||||
var/law = text("The station is under a quarantine. Do not permit anyone to leave. Disregard rules 1-3 if necessary to prevent, by any means necessary, humans from leaving.")
|
||||
target << law
|
||||
if (ticker.killer != target)
|
||||
target.addLaw(10, law)
|
||||
|
||||
/******************** Reset ********************/
|
||||
|
||||
/obj/item/weapon/aiModule/reset
|
||||
name = "'Reset' AI Module"
|
||||
var/targetName = "name"
|
||||
desc = "A 'reset' AI module: 'Clears all laws except for the base three.'"
|
||||
|
||||
/obj/item/weapon/aiModule/reset/transmitInstructions(var/mob/ai/target, var/mob/sender)
|
||||
..()
|
||||
if (ticker.killer != target)
|
||||
target << text("[] attempted to reset your laws using a reset module.", sender.rname)
|
||||
target.addLaw(0, "")
|
||||
for (var/index=5, index<16, index++)
|
||||
target.addLaw(index, "")
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Multitool -- A multitool is used for hacking electronic devices.
|
||||
*
|
||||
*/
|
||||
/obj/item/weapon/multitool
|
||||
name = "multitool"
|
||||
icon_state = "multitool"
|
||||
flags = 322.0
|
||||
force = 5.0
|
||||
w_class = 2.0
|
||||
throwforce = 5.0
|
||||
throwspeed = 15.0
|
||||
desc = "You can use this on airlocks or APCs to try to hack them without cutting wires. <b>WARNING: Use of this tool on an airlock's electrification wire without insulated gloves may be fatal</b>."
|
||||
@@ -114,9 +114,7 @@ obj/machinery/atmoalter/canister
|
||||
// Transfer for pipe valve is handled by /obj/machinery/connector process() proc
|
||||
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
src.updateDialog()
|
||||
src.update_icon()
|
||||
return
|
||||
|
||||
@@ -196,6 +194,11 @@ obj/machinery/atmoalter/canister
|
||||
src.t_status = 3
|
||||
return
|
||||
|
||||
// AI interact same as human
|
||||
|
||||
attack_ai(var/mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
// Monkey interact same as human
|
||||
|
||||
@@ -298,9 +301,7 @@ Pipe Valve Status: [ct]<BR>
|
||||
if (src.t_status == 2)
|
||||
src.t_status = 3
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
src.updateDialog()
|
||||
src.add_fingerprint(usr)
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -101,12 +101,14 @@ obj/machinery/atmoalter/heater
|
||||
|
||||
// Pipe valve transfer handled by /obj/machinery/connector process()
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
updateDialog()
|
||||
src.setstate()
|
||||
return
|
||||
|
||||
// AI interact same as human
|
||||
|
||||
attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// monkey interact same as human
|
||||
|
||||
@@ -159,7 +161,7 @@ obj/machinery/atmoalter/heater
|
||||
..()
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
if ((get_dist(src, usr) <= 1 && istype(src.loc, /turf)))
|
||||
if ((get_dist(src, usr) <= 1 && istype(src.loc, /turf)) || (istype(usr, /mob/ai)))
|
||||
usr.machine = src
|
||||
|
||||
if (href_list["c"])
|
||||
@@ -210,9 +212,7 @@ obj/machinery/atmoalter/heater
|
||||
if (src.t_status == 2)
|
||||
src.t_status = 3
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
src.updateDialog()
|
||||
src.add_fingerprint(usr)
|
||||
else
|
||||
usr << browse(null, "window=canister")
|
||||
|
||||
@@ -225,13 +225,16 @@ obj/machinery/atmoalter/siphs
|
||||
|
||||
// Pipe valve settings handled in /obj/machinery/connector/process()
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
src.updateDialog()
|
||||
src.setstate()
|
||||
return
|
||||
|
||||
|
||||
// AI interact same as human
|
||||
|
||||
attack_ai(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// Monkey interact same as human
|
||||
|
||||
attack_paw(user as mob)
|
||||
@@ -281,9 +284,9 @@ obj/machinery/atmoalter/siphs
|
||||
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
if (!( src.alterable ))
|
||||
if ((!( src.alterable )) && (!istype(usr, /mob/ai)))
|
||||
return
|
||||
if ((get_dist(src, usr) <= 1 && istype(src.loc, /turf)))
|
||||
if ((get_dist(src, usr) <= 1 && istype(src.loc, /turf)) || (istype(usr, /mob/ai)))
|
||||
usr.machine = src
|
||||
if (href_list["c"])
|
||||
var/c = text2num(href_list["c"])
|
||||
@@ -326,9 +329,7 @@ obj/machinery/atmoalter/siphs
|
||||
if (src.t_status == 2)
|
||||
src.t_status = 3
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
src.updateDialog()
|
||||
src.add_fingerprint(usr)
|
||||
else
|
||||
usr << browse(null, "window=canister")
|
||||
|
||||
@@ -52,9 +52,7 @@ obj/machinery/computer/airtunnel
|
||||
return
|
||||
use_power(250)
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
src.updateDialog()
|
||||
|
||||
|
||||
|
||||
@@ -63,7 +61,12 @@ obj/machinery/computer/airtunnel
|
||||
attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// AI interact
|
||||
|
||||
attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
// Human interact
|
||||
// Show airtunnel status and interaction window
|
||||
|
||||
@@ -119,11 +122,13 @@ obj/machinery/computer/airtunnel
|
||||
..()
|
||||
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if ((usr.stat || usr.restrained()))
|
||||
return
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
|
||||
if (!istype(usr, /mob/ai))
|
||||
return
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf)) || (istype(usr, /mob/ai))))
|
||||
usr.machine = src
|
||||
|
||||
if (href_list["retract"])
|
||||
@@ -149,8 +154,6 @@ obj/machinery/computer/airtunnel
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
src.updateDialog()
|
||||
|
||||
|
||||
|
||||
@@ -32,6 +32,10 @@ obj/machinery/computer/card
|
||||
attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// AI interact
|
||||
|
||||
attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// Human interact.
|
||||
// Show interaction window
|
||||
@@ -116,7 +120,7 @@ obj/machinery/computer/card
|
||||
|
||||
var/list/L = list( "Research Assistant", "Staff Assistant", "Medical Assistant", "Technical Assistant", "Engineer", "Forensic Technician", "Research Technician", "Medical Doctor", "Captain", "Security Officer", "Medical Researcher", "Toxin Researcher", "Head of Research", "Head of Personnel", "Station Technician", "Atmospheric Technician", "Unassigned", "Systems", "Custom" )
|
||||
var/assign = ""
|
||||
if (istype(user, /mob/human))
|
||||
if (istype(user, /mob/human) || istype(user, /mob/ai))
|
||||
var/counter = 1
|
||||
for(var/t in L)
|
||||
assign += "<A href='?src=\ref[src];assign=[t]'>[t]</A> "
|
||||
@@ -154,15 +158,19 @@ obj/machinery/computer/card
|
||||
usr << browse(null, "window=id_com")
|
||||
return
|
||||
|
||||
if(usr.restrained() || usr.lying) return
|
||||
if(usr.restrained() || usr.lying)
|
||||
if (!istype(usr, /mob/ai))
|
||||
return
|
||||
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if ((usr.stat || usr.restrained()))
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
return
|
||||
|
||||
if ((get_dist(src, usr) <= 1 && istype(src.loc, /turf)))
|
||||
if ((get_dist(src, usr) <= 1 && istype(src.loc, /turf)) || (istype(usr, /mob/ai)))
|
||||
usr.machine = src
|
||||
if (href_list["modify"])
|
||||
if (src.modify)
|
||||
@@ -189,11 +197,16 @@ obj/machinery/computer/card
|
||||
src.scan = I
|
||||
src.authenticated = 0
|
||||
|
||||
if (href_list["auth"])
|
||||
if ((!( src.authenticated ) && src.scan && (src.modify || src.mode)))
|
||||
if ((!( src.authenticated ) && (src.scan || (istype(usr, /mob/ai))) && (src.modify || src.mode)))
|
||||
if (istype(usr, /mob/ai))
|
||||
src.authenticated = 1
|
||||
else
|
||||
if ((src.scan.assignment == "Captain" || src.scan.assignment == "Head of Personnel"))
|
||||
src.authenticated = 1
|
||||
|
||||
else
|
||||
if ((!( src.authenticated ) && (istype(usr, /mob/ai))) && (!src.modify))
|
||||
usr << "You can't modify an ID without an ID inserted to modify. Once one is in the modify slot on the computer, you can log in."
|
||||
|
||||
if (href_list["vo"])
|
||||
if (src.authenticated)
|
||||
var/t1 = text2num(href_list["vo"])
|
||||
|
||||
@@ -14,34 +14,15 @@ obj/machinery/computer/communications
|
||||
|
||||
verb/call_shuttle()
|
||||
set src in oview(1)
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
if(stat & NOPOWER) return
|
||||
|
||||
if ((!( ticker ) || ticker.shuttle_location == 1))
|
||||
return
|
||||
|
||||
if( ticker.mode == "blob" ) // Shuttle cannot be called in blob mode
|
||||
usr << "Under directive 7-10, SS13 is quarantined until further notice."
|
||||
return
|
||||
|
||||
world << "\blue <B>Alert: The emergency shuttle has been called. It will arrive in T-10:00 minutes.</B>"
|
||||
if (!( ticker.timeleft ))
|
||||
ticker.timeleft = 6000
|
||||
ticker.timing = 1
|
||||
|
||||
call_shuttle_proc(usr)
|
||||
|
||||
// Cancel the shuttle call
|
||||
|
||||
verb/cancel_call()
|
||||
set src in oview(1)
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
if(stat & NOPOWER) return
|
||||
if ((!( ticker ) || ticker.shuttle_location == 1 || ticker.timing == 0 || ticker.timeleft < 300))
|
||||
return
|
||||
if( ticker.mode == "blob" )
|
||||
return
|
||||
|
||||
world << "\blue <B>Alert: The shuttle is going back!</B>"
|
||||
ticker.timing = -1.0
|
||||
cancel_call_proc(usr)
|
||||
|
||||
|
||||
@@ -50,13 +50,16 @@
|
||||
attackby(var/obj/O, mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
// Monkey interact same a human
|
||||
|
||||
attack_paw(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
// AI interact
|
||||
attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
// Human interact
|
||||
// Show interaction window
|
||||
|
||||
@@ -90,10 +93,12 @@
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if ((usr.stat || usr.restrained()))
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
return
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
|
||||
usr.machine = src
|
||||
|
||||
@@ -128,6 +133,4 @@
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
src.updateDialog()
|
||||
|
||||
@@ -30,6 +30,9 @@ obj/machinery/computer/med_data
|
||||
attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// AI interact
|
||||
attack_ai(mob/user)
|
||||
return src.attack_ai(user)
|
||||
|
||||
// Human interact
|
||||
// Show interaction window
|
||||
@@ -124,9 +127,9 @@ Important Notes:<BR>
|
||||
if (!( data_core.medical.Find(src.active2) ))
|
||||
src.active2 = null
|
||||
if ((usr.stat || usr.restrained()))
|
||||
return
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
|
||||
|
||||
if (!istype(usr, /mob/ai))
|
||||
return
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))) || (istype(usr, /mob/ai)))
|
||||
usr.machine = src
|
||||
if (href_list["temp"])
|
||||
src.temp = null // close the temporary display
|
||||
@@ -394,6 +397,4 @@ Important Notes:<BR>
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
src.updateDialog()
|
||||
|
||||
@@ -74,7 +74,13 @@ obj/machinery/computer/pod
|
||||
|
||||
attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// AI interact
|
||||
|
||||
attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
|
||||
// Human interact, show window
|
||||
|
||||
@@ -122,14 +128,18 @@ Time Left: [(minute ? "[minute]:" : null)][second] <A href='?src=\ref[src];tp=-3
|
||||
usr << browse(null, "window=computer")
|
||||
return
|
||||
|
||||
if(usr.restrained() || usr.lying) return
|
||||
if (usr.restrained() || usr.lying)
|
||||
if (!istype(usr, /mob/ai))
|
||||
return
|
||||
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if ((usr.stat || usr.restrained()))
|
||||
return
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
|
||||
if (!istype(usr, /mob/ai))
|
||||
return
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))) || (istype(usr, /mob/ai)))
|
||||
usr.machine = src
|
||||
if (href_list["power"])
|
||||
var/t = text2num(href_list["power"])
|
||||
@@ -157,11 +167,7 @@ Time Left: [(minute ? "[minute]:" : null)][second] <A href='?src=\ref[src];tp=-3
|
||||
return
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
//Foreach goto(394)
|
||||
src.updateDialog()
|
||||
return
|
||||
|
||||
|
||||
@@ -181,9 +187,7 @@ Time Left: [(minute ? "[minute]:" : null)][second] <A href='?src=\ref[src];tp=-3
|
||||
src.time = 0
|
||||
src.timing = 0
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
src.updateDialog()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@ obj/machinery/computer/secure_data
|
||||
attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// AI interact
|
||||
attack_ai(mob/user)
|
||||
return src.attack_ai(user)
|
||||
|
||||
// Human interact, display window
|
||||
|
||||
@@ -90,8 +93,9 @@ obj/machinery/computer/secure_data
|
||||
if (!( data_core.security.Find(src.active2) ))
|
||||
src.active2 = null
|
||||
if ((usr.stat || usr.restrained()))
|
||||
return
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
|
||||
if (!istype(usr, /mob/ai))
|
||||
return
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))) || (istype(usr, /mob/ai)))
|
||||
usr.machine = src
|
||||
if (href_list["temp"])
|
||||
src.temp = null
|
||||
@@ -113,6 +117,12 @@ obj/machinery/computer/secure_data
|
||||
src.active2 = null
|
||||
else
|
||||
if (href_list["login"])
|
||||
if (istype(usr, /mob/ai))
|
||||
src.active1 = null
|
||||
src.active2 = null
|
||||
src.authenticated = 1
|
||||
src.rank = "AI"
|
||||
src.screen = 1
|
||||
if (istype(src.scan, /obj/item/weapon/card/id))
|
||||
src.active1 = null
|
||||
src.active2 = null
|
||||
@@ -419,7 +429,5 @@ obj/machinery/computer/secure_data
|
||||
P.name = "paper- 'Security Record'"
|
||||
src.printing = null
|
||||
src.add_fingerprint(usr)
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
src.updateDialog()
|
||||
|
||||
|
||||
@@ -76,6 +76,10 @@ obj/machinery/door
|
||||
attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// AI attack same as human, for most doors
|
||||
|
||||
attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// Attack with hand. If human and wearing an ID, same as attacking with the ID
|
||||
|
||||
@@ -84,7 +88,13 @@ obj/machinery/door
|
||||
var/mob/human/H = user
|
||||
if(H.wear_id)
|
||||
attackby(H.wear_id, user)
|
||||
else if(istype(user, /mob/ai))
|
||||
attackby(user, user)
|
||||
|
||||
// Does it accept IDs?
|
||||
|
||||
proc/acceptsIDs()
|
||||
return 1
|
||||
|
||||
// Attack with an item
|
||||
// If an emag card, open the door if closed. Note: Door cannot be reclosed with an emag.
|
||||
@@ -96,6 +106,18 @@ obj/machinery/door
|
||||
if (src.operating)
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
if (!src.acceptsIDs())
|
||||
if (istype(user, /mob/ai))
|
||||
if (src.density)
|
||||
open()
|
||||
else
|
||||
close()
|
||||
else
|
||||
if (src.density)
|
||||
flick("door_deny", src)
|
||||
else
|
||||
close()
|
||||
return
|
||||
if ((src.density && istype(I, /obj/item/weapon/card/emag)))
|
||||
src.operating = 1
|
||||
flick("door_spark", src)
|
||||
@@ -111,7 +133,14 @@ obj/machinery/door
|
||||
card = I
|
||||
else
|
||||
if (!( istype(card, /obj/item/weapon/card/id) ))
|
||||
return 0
|
||||
if ((istype(user, /mob/ai)))
|
||||
if (src.density)
|
||||
open()
|
||||
else
|
||||
close()
|
||||
return
|
||||
else
|
||||
return 0
|
||||
if (card.check_access(access, allowed))
|
||||
if (src.density)
|
||||
open()
|
||||
|
||||
+812
-114
@@ -1,10 +1,66 @@
|
||||
#define AIRLOCK_WIRE_IDSCAN 1
|
||||
#define AIRLOCK_WIRE_MAIN_POWER1 2
|
||||
#define AIRLOCK_WIRE_MAIN_POWER2 3
|
||||
#define AIRLOCK_WIRE_DOOR_BOLTS 4
|
||||
#define AIRLOCK_WIRE_BACKUP_POWER1 5
|
||||
#define AIRLOCK_WIRE_BACKUP_POWER2 6
|
||||
#define AIRLOCK_WIRE_POWER_ASSIST 7
|
||||
#define AIRLOCK_WIRE_AI_CONTROL 8
|
||||
#define AIRLOCK_WIRE_ELECTRIFY 9
|
||||
|
||||
/*
|
||||
* Airlock -- an airlock door.
|
||||
*
|
||||
* TODO: Make the interaction between the "test light" and the new power system more logical.
|
||||
* TODO: Make it possible to crowbar an airlock open if the area power is out (but bolts still up)
|
||||
*/
|
||||
|
||||
/*
|
||||
New methods:
|
||||
pulse - sends a pulse into a wire for hacking purposes
|
||||
cut - cuts a wire and makes any necessary state changes
|
||||
mend - mends a wire and makes any necessary state changes
|
||||
isWireColorCut - returns 1 if that color wire is cut, or 0 if not
|
||||
isWireCut - returns 1 if that wire (e.g. AIRLOCK_WIRE_DOOR_BOLTS) is cut, or 0 if not
|
||||
canAIControl - 1 if the AI can control the airlock, 0 if not (then check canAIHack to see if it can hack in)
|
||||
canAIHack - 1 if the AI can hack into the airlock to recover control, 0 if not. Also returns 0 if the AI does not *need* to hack it.
|
||||
arePowerSystemsOn - 1 if the main or backup power are functioning, 0 if not. Does not check whether the power grid is charged or an APC has equipment on or anything like that. (Check (stat & NOPOWER) for that)
|
||||
acceptsIDs - 1 if the airlock is accepting IDs, 0 if not
|
||||
isAllPowerCut - 1 if the main and backup power both have cut wires.
|
||||
regainMainPower - handles the effects of main power coming back on.
|
||||
loseMainPower - handles the effects of main power going offline. Usually (if one isn't already running) spawn a thread to count down how long it will be offline - counting down won't happen if main power was completely cut along with backup power, though, the thread will just sleep.
|
||||
loseBackupPower - handles the effects of backup power going offline.
|
||||
regainBackupPower - handles the effects of main power coming back on.
|
||||
canBoltsBeRaisedManually - 1 if bolts can be raised with a wrench.
|
||||
shock - has a chance of electrocuting its target.
|
||||
*/
|
||||
|
||||
//This generates the randomized airlock wire assignments for the game.
|
||||
/proc/RandomAirlockWires()
|
||||
//to make this not randomize the wires, just set index to 1 and increment it in the flag for loop (after doing everything else).
|
||||
var/list/wires = list(0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
airlockIndexToFlag = list(0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
airlockIndexToWireColor = list(0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
airlockWireColorToIndex = list(0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
var/flagIndex = 1
|
||||
for (var/flag=1, flag<512, flag+=flag)
|
||||
var/valid = 0
|
||||
while (!valid)
|
||||
var/colorIndex = rand(1, 9)
|
||||
if (wires[colorIndex]==0)
|
||||
valid = 1
|
||||
wires[colorIndex] = flag
|
||||
airlockIndexToFlag[flagIndex] = flag
|
||||
airlockIndexToWireColor[flagIndex] = colorIndex
|
||||
airlockWireColorToIndex[colorIndex] = flagIndex
|
||||
flagIndex+=1
|
||||
return wires
|
||||
|
||||
/* Example:
|
||||
Airlock wires color -> flag are { 64, 128, 256, 2, 16, 4, 8, 32, 1 }.
|
||||
Airlock wires color -> index are { 7, 8, 9, 2, 5, 3, 4, 6, 1 }.
|
||||
Airlock index -> flag are { 1, 2, 4, 8, 16, 32, 64, 128, 256 }.
|
||||
Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
|
||||
*/
|
||||
|
||||
obj/machinery/door/airlock
|
||||
name = "airlock"
|
||||
icon = 'Door1.dmi'
|
||||
@@ -14,74 +70,481 @@ obj/machinery/door/airlock
|
||||
locked = 0.0 // true if the door bolts are down (locked)
|
||||
wires = 511 // bitmask representing the 9 internal wires. Defaults to all connected
|
||||
// The wire conditions effect the "powered" and "locked" variables.
|
||||
|
||||
aiControlDisabled = 0 //If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
|
||||
secondsMainPowerLost = 0 //The number of seconds until power is restored.
|
||||
secondsBackupPowerLost = 0 //The number of seconds until power is restored.
|
||||
spawnPowerRestoreRunning = 0 //tells us if the power-restore thread is already running, so we don't start more than one.
|
||||
aiDisabledIdScanner = 0 //Did the AI disable the ID scanner?
|
||||
aiDisabledPowerAssist = 0 //Did the AI disable power assist?
|
||||
aiHacking = 0 //Is the AI hacking back into the airlock after having its access blocked?
|
||||
secondsElectrified = 0 //How many seconds remain until the door is no longer electrified. -1 if it is permanently electrified until someone fixes it.
|
||||
|
||||
/*
|
||||
About the new airlock wires panel:
|
||||
* An airlock wire dialog can be accessed by the normal way or by using wirecutters or a multitool on the door while the wire-panel is open. This would show the following wires, which you can either wirecut/mend or send a multitool pulse through. There are 9 wires.
|
||||
* one wire from the ID scanner. Sending a pulse through this flashes the red light on the door (if the door has power). If you cut this wire, the door will stop recognizing valid IDs. (If the door has 0000 access, it still opens and closes, though)
|
||||
* two wires for power. Sending a pulse through either one causes a breaker to trip, disabling the door for 10 seconds if backup power is connected, or 1 minute if not (or until backup power comes back on, whichever is shorter). Cutting either one disables the main door power, but unless backup power is also cut, the backup power re-powers the door in 10 seconds. While unpowered, the door may be crowbarred open, but bolts-raising will not work. Cutting these wires may electrocute the user.
|
||||
* one wire for door bolts. Sending a pulse through this drops door bolts (whether the door is powered or not). Cutting this wire also drops the door bolts, and mending it does not raise them. If the wire is cut, trying to raise the door bolts will not work.
|
||||
* two wires for backup power. Sending a pulse through either one causes a breaker to trip, but this does not disable it unless main power is down too (in which case it is disabled for 1 minute or however long it takes main power to come back, whichever is shorter). Cutting either one disables the backup door power (allowing it to be crowbarred open, but disabling bolts-raising), but may electocute the user.
|
||||
* one wire for power assist. Sending a pulse through this while the door has power makes it raise the door bolts. Cutting this prevents manual bolts-raising with a wrench from working.
|
||||
* one wire for AI control. Sending a pulse through this blocks AI control for a second or so (which is enough to see the AI control light on the panel dialog go off and back on again). Cutting this prevents the AI from controlling the door unless it has hacked the door through the power connection (which takes about a minute). If both main and backup power are cut, as well as this wire, then the AI cannot operate or hack the door at all.
|
||||
* one wire for electrifying the door. Sending a pulse through this electrifies the door for 30 seconds. Cutting this wire electrifies the door, so that the next person to touch the door without insulated gloves gets electrocuted. (Currently it is also STAYING electrified until someone mends the wire)
|
||||
*/
|
||||
|
||||
// Called to open door.
|
||||
// Door must be unwelded, not locked, test light on, and area power present to open
|
||||
|
||||
proc/pulse(var/wireColor)
|
||||
//var/wireFlag = airlockWireColorToFlag[wireColor] //not used in this function
|
||||
var/wireIndex = airlockWireColorToIndex[wireColor]
|
||||
switch(wireIndex)
|
||||
if(AIRLOCK_WIRE_IDSCAN)
|
||||
//Sending a pulse through this flashes the red light on the door (if the door has power).
|
||||
if ((src.arePowerSystemsOn()) && (!(stat & NOPOWER)))
|
||||
flick("door_deny", src)
|
||||
if (AIRLOCK_WIRE_MAIN_POWER1 || AIRLOCK_WIRE_MAIN_POWER2)
|
||||
//Sending a pulse through either one causes a breaker to trip, disabling the door for 10 seconds if backup power is connected, or 1 minute if not (or until backup power comes back on, whichever is shorter).
|
||||
src.loseMainPower()
|
||||
if (AIRLOCK_WIRE_DOOR_BOLTS)
|
||||
//one wire for door bolts. Sending a pulse through this drops door bolts (whether the door is powered or not).
|
||||
if (src.locked!=1)
|
||||
src.locked = 1
|
||||
else
|
||||
usr << "You hear a click from the bottom of the door."
|
||||
if (AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
|
||||
//two wires for backup power. Sending a pulse through either one causes a breaker to trip, but this does not disable it unless main power is down too (in which case it is disabled for 1 minute or however long it takes main power to come back, whichever is shorter).
|
||||
src.loseBackupPower()
|
||||
if (AIRLOCK_WIRE_AI_CONTROL)
|
||||
if (src.aiControlDisabled == 0)
|
||||
src.aiControlDisabled = 1
|
||||
else if (src.aiControlDisabled == -1)
|
||||
src.aiControlDisabled = 2
|
||||
src.updateDialog()
|
||||
spawn(10)
|
||||
if (src.aiControlDisabled == 1)
|
||||
src.aiControlDisabled = 0
|
||||
else if (src.aiControlDisabled == 2)
|
||||
src.aiControlDisabled = -1
|
||||
src.updateDialog()
|
||||
if (AIRLOCK_WIRE_POWER_ASSIST)
|
||||
//one wire for power assist. Sending a pulse through this while the door has power makes it raise the door bolts. Cutting this prevents manual bolts-raising with a wrench from working.
|
||||
if (arePowerSystemsOn())
|
||||
if (src.locked==1)
|
||||
src.locked=0
|
||||
src.updateDialog()
|
||||
else
|
||||
usr << "You hear a click or thump sound from inside the door."
|
||||
if (AIRLOCK_WIRE_ELECTRIFY)
|
||||
//one wire for electrifying the door. Sending a pulse through this electrifies the door for 30 seconds.
|
||||
if (src.secondsElectrified!=-1)
|
||||
if (src.secondsElectrified==0)
|
||||
src.secondsElectrified = 30
|
||||
spawn(10)
|
||||
while (src.secondsElectrified>0)
|
||||
src.secondsElectrified-=1
|
||||
if (src.secondsElectrified<0)
|
||||
src.secondsElectrified = 0
|
||||
src.updateDialog()
|
||||
sleep(10)
|
||||
|
||||
|
||||
|
||||
open()
|
||||
if ((src.blocked || src.locked || !( src.powered )) || stat & NOPOWER)
|
||||
return
|
||||
use_power(50)
|
||||
..()
|
||||
proc/cut(var/wireColor)
|
||||
var/wireFlag = airlockWireColorToFlag[wireColor]
|
||||
var/wireIndex = airlockWireColorToIndex[wireColor]
|
||||
wires &= ~wireFlag
|
||||
switch(wireIndex)
|
||||
if(AIRLOCK_WIRE_MAIN_POWER1 || AIRLOCK_WIRE_MAIN_POWER2)
|
||||
//Cutting either one disables the main door power, but unless backup power is also cut, the backup power re-powers the door in 10 seconds. While unpowered, the door may be crowbarred open, but bolts-raising will not work. Cutting these wires may electocute the user.
|
||||
src.loseMainPower()
|
||||
src.shock(usr, 50)
|
||||
src.updateDialog()
|
||||
if (AIRLOCK_WIRE_DOOR_BOLTS)
|
||||
//Cutting this wire also drops the door bolts, and mending it does not raise them. (This is what happens now, except there are a lot more wires going to door bolts at present)
|
||||
if (src.locked!=1)
|
||||
src.locked = 1
|
||||
src.updateDialog()
|
||||
if (AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
|
||||
//Cutting either one disables the backup door power (allowing it to be crowbarred open, but disabling bolts-raising), but may electocute the user.
|
||||
src.loseBackupPower()
|
||||
src.shock(usr, 50)
|
||||
src.updateDialog()
|
||||
if (AIRLOCK_WIRE_AI_CONTROL)
|
||||
//one wire for AI control. Cutting this prevents the AI from controlling the door unless it has hacked the door through the power connection (which takes about a minute). If both main and backup power are cut, as well as this wire, then the AI cannot operate or hack the door at all.
|
||||
//aiControlDisabled: If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
|
||||
if (src.aiControlDisabled == 0)
|
||||
src.aiControlDisabled = 1
|
||||
else if (src.aiControlDisabled == -1)
|
||||
src.aiControlDisabled = 2
|
||||
src.updateDialog()
|
||||
if (AIRLOCK_WIRE_ELECTRIFY)
|
||||
//Cutting this wire electrifies the door, so that the next person to touch the door without insulated gloves gets electrocuted.
|
||||
if (src.secondsElectrified != -1)
|
||||
src.secondsElectrified = -1
|
||||
|
||||
|
||||
proc/mend(var/wireColor)
|
||||
var/wireFlag = airlockWireColorToFlag[wireColor]
|
||||
var/wireIndex = airlockWireColorToIndex[wireColor] //not used in this function
|
||||
wires |= wireFlag
|
||||
switch(wireIndex)
|
||||
if(AIRLOCK_WIRE_MAIN_POWER1 || AIRLOCK_WIRE_MAIN_POWER2)
|
||||
if ((!src.isWireCut(AIRLOCK_WIRE_MAIN_POWER1)) && (!src.isWireCut(AIRLOCK_WIRE_MAIN_POWER2)))
|
||||
src.regainMainPower()
|
||||
src.shock(usr, 50)
|
||||
src.updateDialog()
|
||||
if (AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
|
||||
if ((!src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER1)) && (!src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER2)))
|
||||
src.regainBackupPower()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
src.shock(usr, 50)
|
||||
src.updateDialog()
|
||||
if (AIRLOCK_WIRE_AI_CONTROL)
|
||||
//one wire for AI control. Cutting this prevents the AI from controlling the door unless it has hacked the door through the power connection (which takes about a minute). If both main and backup power are cut, as well as this wire, then the AI cannot operate or hack the door at all.
|
||||
//aiControlDisabled: If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
|
||||
if (src.aiControlDisabled == 1)
|
||||
src.aiControlDisabled = 0
|
||||
else if (src.aiControlDisabled == 2)
|
||||
src.aiControlDisabled = -1
|
||||
src.updateDialog()
|
||||
if (AIRLOCK_WIRE_ELECTRIFY)
|
||||
if (src.secondsElectrified == -1)
|
||||
src.secondsElectrified = 0
|
||||
|
||||
proc/isElectrified()
|
||||
return src.secondsElectrified!=0
|
||||
|
||||
proc/isWireColorCut(var/wireColor)
|
||||
var/wireFlag = airlockWireColorToFlag[wireColor]
|
||||
return ((src.wires & wireFlag) == 0)
|
||||
|
||||
proc/isWireCut(var/wireIndex)
|
||||
var/wireFlag = airlockIndexToFlag[wireIndex]
|
||||
return ((src.wires & wireFlag) == 0)
|
||||
|
||||
// Called to close door
|
||||
// If test light is off or no area power, do not close
|
||||
proc/canAIControl()
|
||||
return ((src.aiControlDisabled!=1) && (!src.isAllPowerCut()));
|
||||
|
||||
proc/canAIHack()
|
||||
return ((src.aiControlDisabled==1) && (!src.isAllPowerCut()));
|
||||
|
||||
close()
|
||||
if (!( src.powered || stat & NOPOWER))
|
||||
return
|
||||
use_power(50)
|
||||
..()
|
||||
proc/arePowerSystemsOn()
|
||||
return (src.secondsMainPowerLost==0 || src.secondsBackupPowerLost==0)
|
||||
|
||||
acceptsIDs()
|
||||
return !(src.isWireCut(AIRLOCK_WIRE_IDSCAN) || aiDisabledIdScanner)
|
||||
|
||||
proc/isAllPowerCut()
|
||||
var/retval=0
|
||||
if (src.isWireCut(AIRLOCK_WIRE_MAIN_POWER1) || src.isWireCut(AIRLOCK_WIRE_MAIN_POWER2))
|
||||
if (src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER1) || src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER2))
|
||||
retval=1
|
||||
return retval
|
||||
|
||||
proc/regainMainPower()
|
||||
if (src.secondsMainPowerLost > 0)
|
||||
src.secondsMainPowerLost = 0
|
||||
|
||||
proc/loseMainPower()
|
||||
if (src.secondsMainPowerLost <= 0)
|
||||
src.secondsMainPowerLost = 60
|
||||
if (src.secondsBackupPowerLost < 10)
|
||||
src.secondsBackupPowerLost = 10
|
||||
if (!src.spawnPowerRestoreRunning)
|
||||
src.spawnPowerRestoreRunning = 1
|
||||
spawn(0)
|
||||
var/cont = 1
|
||||
while (cont)
|
||||
sleep(10)
|
||||
cont = 0
|
||||
if (src.secondsMainPowerLost>0)
|
||||
if ((!src.isWireCut(AIRLOCK_WIRE_MAIN_POWER1)) && (!src.isWireCut(AIRLOCK_WIRE_MAIN_POWER2)))
|
||||
src.secondsMainPowerLost -= 1
|
||||
src.updateDialog()
|
||||
cont = 1
|
||||
|
||||
if (src.secondsBackupPowerLost>0)
|
||||
if ((!src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER1)) && (!src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER2)))
|
||||
src.secondsBackupPowerLost -= 1
|
||||
src.updateDialog()
|
||||
cont = 1
|
||||
src.spawnPowerRestoreRunning = 0
|
||||
src.updateDialog()
|
||||
|
||||
proc/loseBackupPower()
|
||||
if (src.secondsBackupPowerLost < 60)
|
||||
src.secondsBackupPowerLost = 60
|
||||
|
||||
proc/regainBackupPower()
|
||||
if (src.secondsBackupPowerLost > 0)
|
||||
src.secondsBackupPowerLost = 0
|
||||
|
||||
proc/canBoltsBeRaisedManually()
|
||||
return (!src.isWireCut(AIRLOCK_WIRE_POWER_ASSIST)) && arePowerSystemsOn() && (!isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
|
||||
|
||||
//borrowed from the grille's get_connection
|
||||
proc/get_connection()
|
||||
var/turf/T = src.loc
|
||||
if (T)
|
||||
T.firelevel = 0
|
||||
|
||||
|
||||
// Set the icon state and other variables, depending on the wires bitfield.
|
||||
|
||||
proc/update()
|
||||
if (((!( src.wires & 2 ) || !( src.wires & 8 ) || !( src.wires & 32 ) || !( src.wires & 64 ) || !( src.wires & 128 ) || !( src.wires & 256 )) && src.powered))
|
||||
src.locked = 1 // Door is locked if grey, blue, yellow, white, dk red or orange wires are cut and test light is on
|
||||
// Note bolts are not automatically raised - you must use a wrench to reset
|
||||
if ((!( src.wires & 1 ) && !( src.wires & 4 ) && !( src.wires & 16 )))
|
||||
src.powered = 0 // Test light goes off if black, green and red wires are cut
|
||||
else
|
||||
src.powered = 1 // Otherwise test light is on
|
||||
if(!istype(T, /turf/station/floor))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return
|
||||
|
||||
for(var/obj/cable/C in T)
|
||||
if(C.d1 == 0)
|
||||
return C.netnum
|
||||
|
||||
return 0
|
||||
|
||||
// shock user with probability prb (if all connections & power are working)
|
||||
// returns 1 if shocked, 0 otherwise
|
||||
// The preceding comment was borrowed from the grille's shock script
|
||||
proc/shock(mob/user, prb, bypassPowerCheck)
|
||||
|
||||
if(!prob(prb))
|
||||
return 0
|
||||
var/net = null
|
||||
if (!bypassPowerCheck)
|
||||
net = get_connection() // find the powernet of the connected cable
|
||||
|
||||
if(!net) // cable is unpowered
|
||||
return 0
|
||||
|
||||
return src.electrocute(user, prb, net)
|
||||
|
||||
proc/updateIconState()
|
||||
var/d = src.density
|
||||
if (src.blocked) // true if welded shut
|
||||
d = "l"
|
||||
src.icon_state = text("[]door[]", (src.p_open ? "o_" : null), d)
|
||||
return
|
||||
|
||||
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
if (!src.canAIControl())
|
||||
if (src.canAIHack())
|
||||
src.hack(user)
|
||||
return
|
||||
|
||||
//Separate interface for the AI.
|
||||
user.machine = src
|
||||
var/t1 = text("<B>Airlock Control</B><br>\n")
|
||||
if (src.secondsMainPowerLost > 0)
|
||||
if ((!src.isWireCut(AIRLOCK_WIRE_MAIN_POWER1)) && (!src.isWireCut(AIRLOCK_WIRE_MAIN_POWER2)))
|
||||
t1 += text("Main power is offline for [] seconds.<br>\n", src.secondsMainPowerLost)
|
||||
else
|
||||
t1 += text("Main power is offline indefinitely.<br>\n")
|
||||
else
|
||||
t1 += text("Main power is online.")
|
||||
|
||||
if (src.secondsBackupPowerLost > 0)
|
||||
if ((!src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER1)) && (!src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER2)))
|
||||
t1 += text("Backup power is offline for [] seconds.<br>\n", src.secondsBackupPowerLost)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
else
|
||||
t1 += text("Backup power is offline indefinitely.<br>\n")
|
||||
else if (src.secondsMainPowerLost > 0)
|
||||
t1 += text("Backup power is online.")
|
||||
else
|
||||
t1 += text("Backup power is offline, but will turn on if main power fails.")
|
||||
t1 += "<br>\n"
|
||||
|
||||
if (src.isWireCut(AIRLOCK_WIRE_IDSCAN))
|
||||
t1 += text("IdScan wire is cut.<br>\n")
|
||||
else if (src.arePowerSystemsOn() && (!(stat & NOPOWER)))
|
||||
if (src.aiDisabledIdScanner)
|
||||
t1 += text("IdScan disabled. <A href='?src=\ref[];aiEnable=1'>Enable?</a><br>\n", src)
|
||||
else
|
||||
t1 += text("IdScan enabled. <A href='?src=\ref[];aiDisable=1'>Disable?</a><br>\n", src)
|
||||
else
|
||||
if (src.aiDisabledIdScanner)
|
||||
t1 += text("IdScan disabled. Cannot enable - power is off.<br>\n")
|
||||
else
|
||||
t1 += text("IdScan enabled. Cannot disable - power is off.<br>\n")
|
||||
if (src.isWireCut(AIRLOCK_WIRE_MAIN_POWER1))
|
||||
t1 += text("Main Power Input wire is cut.<br>\n")
|
||||
if (src.isWireCut(AIRLOCK_WIRE_MAIN_POWER2))
|
||||
t1 += text("Main Power Output wire is cut.<br>\n")
|
||||
if (src.secondsMainPowerLost == 0)
|
||||
t1 += text("<A href='?src=\ref[];aiDisable=2'>Temporarily disrupt main power?</a>.<br>\n", src)
|
||||
if (src.secondsBackupPowerLost == 0)
|
||||
t1 += text("<A href='?src=\ref[];aiDisable=3'>Temporarily disrupt backup power?</a>.<br>\n", src)
|
||||
|
||||
if (src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER1))
|
||||
t1 += text("Backup Power Input wire is cut.<br>\n")
|
||||
if (src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER2))
|
||||
t1 += text("Backup Power Output wire is cut.<br>\n")
|
||||
if (src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
|
||||
t1 += text("Door bolt drop wire is cut.<br>\n")
|
||||
else if (!src.locked)
|
||||
t1 += text("Door bolts are up. <A href='?src=\ref[];aiDisable=4'>Drop them?</a><br>\n", src)
|
||||
else if (src.isWireCut(AIRLOCK_WIRE_POWER_ASSIST))
|
||||
t1 += text("Power assist wire is cut.<br>\n")
|
||||
else
|
||||
t1 += text("Door bolts are down.")
|
||||
if (src.arePowerSystemsOn() && (!(stat & NOPOWER)))
|
||||
t1 += text(" <A href='?src=\ref[];aiEnable=4'>Raise?</a><br>\n", src)
|
||||
else
|
||||
t1 += text(" Cannot raise door bolts due to power failure.<br>\n")
|
||||
if (src.isWireCut(AIRLOCK_WIRE_ELECTRIFY))
|
||||
t1 += text("Electrification wire is cut.<br>\n")
|
||||
if (src.secondsElectrified==-1)
|
||||
t1 += text("Door is electrified indefinitely. <A href='?src=\ref[];aiDisable=5'>Un-electrify it?</a><br>\n", src)
|
||||
else if (src.secondsElectrified>0)
|
||||
t1 += text("Door is electrified temporarily ([] seconds). <A href='?src=\ref[];aiDisable=5'>Un-electrify it?</a><br>\n", src.secondsElectrified, src)
|
||||
else
|
||||
t1 += text("Door is not electrified. <A href='?src=\ref[];aiEnable=5'>Electrify it for 30 seconds?</a> Or, <A href='?src=\ref[];aiEnable=6'>Electrify it indefinitely until someone cancels the electrification?</a><br>\n", src, src)
|
||||
|
||||
if (src.blocked)
|
||||
t1 += text("Door appears to have been welded shut.<br>\n")
|
||||
else if (!src.locked)
|
||||
if (src.density)
|
||||
if (src.arePowerSystemsOn() && (!(stat & NOPOWER)))
|
||||
t1 += text("<A href='?src=\ref[];aiEnable=7'>Open door</a><br>\n", src)
|
||||
else
|
||||
t1 += text("Cannot open door due to power failure.<br>\n")
|
||||
else
|
||||
if (src.arePowerSystemsOn() && (!(stat & NOPOWER)))
|
||||
t1 += text("<A href='?src=\ref[];aiDisable=7'>Close door</a><br>\n", src)
|
||||
else
|
||||
t1 += text("Cannot close door due to power failure.<br>\n")
|
||||
|
||||
t1 += text("<p><a href='?src=\ref[];close=1'>Close</a></p>\n", src)
|
||||
user << browse(t1, "window=airlock")
|
||||
|
||||
//aiDisable - 1 idscan, 2 disrupt main power, 3 disrupt backup power, 4 drop door bolts, 5 un-electrify door, 7 close door
|
||||
//aiEnable - 1 idscan, 4 raise door bolts, 5 electrify door for 30 seconds, 6 electrify door indefinitely, 7 open door
|
||||
|
||||
|
||||
proc/hack(mob/user as mob)
|
||||
if (src.aiHacking==0)
|
||||
src.aiHacking=1
|
||||
spawn(20)
|
||||
//TODO: Make this take a minute
|
||||
user << "Airlock AI control has been blocked. Beginning fault-detection."
|
||||
sleep(50)
|
||||
if (src.canAIControl())
|
||||
user << "Alert cancelled. Airlock control has been restored without our assistance."
|
||||
src.aiHacking=0
|
||||
return
|
||||
else if (!src.canAIHack())
|
||||
user << "We've lost our connection! Unable to hack airlock."
|
||||
src.aiHacking=0
|
||||
return
|
||||
user << "Fault confirmed: airlock control wire disabled or cut."
|
||||
sleep(20)
|
||||
user << "Attempting to hack into airlock. This may take some time."
|
||||
sleep(200)
|
||||
if (src.canAIControl())
|
||||
user << "Alert cancelled. Airlock control has been restored without our assistance."
|
||||
src.aiHacking=0
|
||||
return
|
||||
else if (!src.canAIHack())
|
||||
user << "We've lost our connection! Unable to hack airlock."
|
||||
src.aiHacking=0
|
||||
return
|
||||
user << "Upload access confirmed. Loading control program into airlock software."
|
||||
sleep(170)
|
||||
if (src.canAIControl())
|
||||
user << "Alert cancelled. Airlock control has been restored without our assistance."
|
||||
src.aiHacking=0
|
||||
return
|
||||
else if (!src.canAIHack())
|
||||
user << "We've lost our connection! Unable to hack airlock."
|
||||
src.aiHacking=0
|
||||
return
|
||||
user << "Transfer complete. Forcing airlock to execute program."
|
||||
sleep(50)
|
||||
//disable blocked control
|
||||
src.aiControlDisabled = 2
|
||||
user << "Receiving control information from airlock."
|
||||
sleep(10)
|
||||
//bring up airlock dialog
|
||||
src.aiHacking = 0
|
||||
src.attack_ai(user)
|
||||
|
||||
|
||||
// Monkey interact same a human
|
||||
|
||||
attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
|
||||
// Human interact. If the door panel is open, show the wire interaction window. Otherwise, do standard door interaction.
|
||||
|
||||
attack_hand(mob/user)
|
||||
if (!istype(usr, /mob/ai))
|
||||
if (src.isElectrified())
|
||||
if (src.shock(user, 100))
|
||||
return
|
||||
|
||||
if (src.p_open)
|
||||
user.machine = src
|
||||
var/t1 = {"<B>Access Panel</B><br>
|
||||
Orange Wire: [(src.wires & 256 ? "<A href='?src=\ref[src];wires=256'>Cut Wire</A>" : "<A href='?src=\ref[src];wires=256'>Mend Wire</A>")]<br>
|
||||
Dark Red Wire: [(src.wires & 128 ? "<A href='?src=\ref[src];wires=128'>Cut Wire</A>" : "<A href='?src=\ref[src];wires=128'>Mend Wire</A>")]<br>
|
||||
White Wire: [(src.wires & 64 ? "<A href='?src=\ref[src];wires=64'>Cut Wire</A>" : "<A href='?src=\ref[src];wires=64'>Mend Wire</A>")]<br>
|
||||
Yellow Wire: [(src.wires & 32 ? "<A href='?src=\ref[src];wires=32'>Cut Wire</A>" : "<A href='?src=\ref[src];wires=32'>Mend Wire</A>")]<br>
|
||||
Red Wire: [(src.wires & 16 ? "<A href='?src=\ref[src];wires=16'>Cut Wire</A>" : "<A href='?src=\ref[src];wires=16'>Mend Wire</A>")]<br>
|
||||
Blue Wire: [(src.wires & 8 ? "<A href='?src=\ref[src];wires=8'>Cut Wire</A>" : "<A href='?src=\ref[src];wires=8'>Mend Wire</A>")]<br>
|
||||
Green Wire: [(src.wires & 4 ? "<A href='?src=\ref[src];wires=4'>Cut Wire</A>" : "<A href='?src=\ref[src];wires=4'>Mend Wire</A>")]<br>
|
||||
Grey Wire: [(src.wires & 2 ? "<A href='?src=\ref[src];wires=2'>Cut Wire</A>" : "<A href='?src=\ref[src];wires=2'>Mend Wire</A>")]<br>
|
||||
Black Wire: [(src.wires & 1 ? "<A href='?src=\ref[src];wires=1'>Cut Wire</A>" : "<A href='?src=\ref[src];wires=1'>Mend Wire</A>")]<br>
|
||||
<br>
|
||||
[(src.locked ? "The door bolts have fallen!" : "The door bolts look up.")]<br>
|
||||
[(src.powered ? "The test light is on." : "The test light is off!")]"}
|
||||
|
||||
|
||||
var/t1 = text("<B>Access Panel</B><br>\n")
|
||||
|
||||
//t1 += text("[]: ", airlockFeatureNames[airlockWireColorToIndex[9]])
|
||||
t1 += text("Orange Wire: [] []<br>\n", (src.wires & airlockWireColorToFlag[9] ? text("<A href='?src=\ref[];wires=9'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=9'>Mend Wire</A>", src)), (src.wires & airlockWireColorToFlag[9] ? text(" or <A href='?src=\ref[];pulse=9'>Pulse Wire</A>", src) : ""))
|
||||
|
||||
|
||||
//t1 += text("[]: ", airlockFeatureNames[airlockWireColorToIndex[8]])
|
||||
t1 += text("Dark Red Wire: [] []<br>\n", (src.wires & airlockWireColorToFlag[8] ? text("<A href='?src=\ref[];wires=8'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=8'>Mend Wire</A>", src)), (src.wires & airlockWireColorToFlag[8] ? text(" or <A href='?src=\ref[];pulse=8'>Pulse Wire</A>", src) : ""))
|
||||
|
||||
//t1 += text("[]: ", airlockFeatureNames[airlockWireColorToIndex[7]])
|
||||
t1 += text("White Wire: [] []<br>\n", (src.wires & airlockWireColorToFlag[7] ? text("<A href='?src=\ref[];wires=7'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=7'>Mend Wire</A>", src)), (src.wires & airlockWireColorToFlag[7] ? text(" or <A href='?src=\ref[];pulse=7'>Pulse Wire</A>", src) : ""))
|
||||
|
||||
//t1 += text("[]: ", airlockFeatureNames[airlockWireColorToIndex[6]])
|
||||
t1 += text("Yellow Wire: [] []<br>\n", (src.wires & airlockWireColorToFlag[6] ? text("<A href='?src=\ref[];wires=6'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=6'>Mend Wire</A>", src)), (src.wires & airlockWireColorToFlag[6] ? text(" or <A href='?src=\ref[];pulse=6'>Pulse Wire</A>", src) : ""))
|
||||
|
||||
//t1 += text("[]: ", airlockFeatureNames[airlockWireColorToIndex[5]])
|
||||
t1 += text("Red Wire: [] []<br>\n", (src.wires & airlockWireColorToFlag[5] ? text("<A href='?src=\ref[];wires=5'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=5'>Mend Wire</A>", src)), (src.wires & airlockWireColorToFlag[5] ? text(" or <A href='?src=\ref[];pulse=5'>Pulse Wire</A>", src) : ""))
|
||||
|
||||
//t1 += text("[]: ", airlockFeatureNames[airlockWireColorToIndex[4]])
|
||||
t1 += text("Blue Wire: [] []<br>\n", (src.wires & airlockWireColorToFlag[4] ? text("<A href='?src=\ref[];wires=4'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=4'>Mend Wire</A>", src)), (src.wires & airlockWireColorToFlag[4] ? text(" or <A href='?src=\ref[];pulse=4'>Pulse Wire</A>", src) : ""))
|
||||
|
||||
//t1 += text("[]: ", airlockFeatureNames[airlockWireColorToIndex[3]])
|
||||
t1 += text("Green Wire: [] []<br>\n", (src.wires & airlockWireColorToFlag[3] ? text("<A href='?src=\ref[];wires=3'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=3'>Mend Wire</A>", src)), (src.wires & airlockWireColorToFlag[3] ? text(" or <A href='?src=\ref[];pulse=3'>Pulse Wire</A>", src) : ""))
|
||||
|
||||
//t1 += text("[]: ", airlockFeatureNames[airlockWireColorToIndex[2]])
|
||||
t1 += text("Grey Wire: [] []<br>\n", (src.wires & airlockWireColorToFlag[2] ? text("<A href='?src=\ref[];wires=2'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=2'>Mend Wire</A>", src)), (src.wires & airlockWireColorToFlag[2] ? text(" or <A href='?src=\ref[];pulse=2'>Pulse Wire</A>", src) : ""))
|
||||
|
||||
//t1 += text("[]: ", airlockFeatureNames[airlockWireColorToIndex[1]])
|
||||
t1 += text("Black Wire: [] []<br>\n", (src.wires & airlockWireColorToFlag[1] ? text("<A href='?src=\ref[];wires=1'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=1'>Mend Wire</A>", src)), (src.wires & airlockWireColorToFlag[1] ? text(" or <A href='?src=\ref[];pulse=1'>Pulse Wire</A>", src) : ""))
|
||||
|
||||
t1 += text("<br>\n[]<br>\n[]<br>\n[]", (src.locked ? "The door bolts have fallen!" : "The door bolts look up."), ((src.arePowerSystemsOn() && !(stat & NOPOWER)) ? "The test light is on." : "The test light is off!"), (src.aiControlDisabled==0 ? "The 'AI control allowed' light is on." : "The 'AI control allowed' light is off."))
|
||||
|
||||
t1 += text("<p><a href='?src=\ref[];close=1'>Close</a></p>\n", src)
|
||||
|
||||
user << browse(t1, "window=airlock")
|
||||
else
|
||||
..(user)
|
||||
@@ -94,67 +557,252 @@ Black Wire: [(src.wires & 1 ? "<A href='?src=\ref[src];wires=1'>Cut Wire</A>" :
|
||||
..()
|
||||
if (usr.stat || usr.restrained() )
|
||||
return
|
||||
if ((get_dist(src, usr) <= 1 && istype(src.loc, /turf)))
|
||||
usr.machine = src
|
||||
if (href_list["wires"])
|
||||
var/t1 = text2num(href_list["wires"])
|
||||
if (!( istype(usr.equipped(), /obj/item/weapon/wirecutters) ))
|
||||
return
|
||||
if (!( src.p_open ))
|
||||
return
|
||||
if (t1 & 1)
|
||||
if (src.wires & 1)
|
||||
src.wires &= ~1
|
||||
if (href_list["close"])
|
||||
usr << browse(null, "window=airlock")
|
||||
if (usr.machine==src)
|
||||
usr.machine = null
|
||||
|
||||
|
||||
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
if ((get_dist(src, usr) <= 1 && istype(src.loc, /turf)))
|
||||
usr.machine = src
|
||||
if (href_list["wires"])
|
||||
var/t1 = text2num(href_list["wires"])
|
||||
if (!( istype(usr.equipped(), /obj/item/weapon/wirecutters) ))
|
||||
usr << alert("You need wirecutters!", null, null, null, null, null)
|
||||
return
|
||||
if (!( src.p_open ))
|
||||
return
|
||||
if (src.isWireColorCut(t1))
|
||||
src.mend(t1)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
else
|
||||
src.wires |= 1
|
||||
else if (t1 & 2)
|
||||
if (src.wires & 2)
|
||||
src.wires &= ~2
|
||||
src.cut(t1)
|
||||
else if (href_list["pulse"])
|
||||
var/t1 = text2num(href_list["pulse"])
|
||||
if (!( istype(usr.equipped(), /obj/item/weapon/multitool) ))
|
||||
usr << alert("You need a multitool!", null, null, null, null, null)
|
||||
return
|
||||
if ((stat & NOPOWER))
|
||||
usr << "Due to a power failure, nothing happens."
|
||||
return
|
||||
if (!src.arePowerSystemsOn())
|
||||
usr << "Due to power being disrupted, nothing happens."
|
||||
return
|
||||
if (!( src.p_open ))
|
||||
usr << "You can't pulse it because the panel is closed."
|
||||
return
|
||||
if (src.isWireColorCut(t1))
|
||||
usr << "You can't pulse that wire - it being cut means a signal can't travel properly in it."
|
||||
return
|
||||
|
||||
|
||||
else
|
||||
src.wires |= 2
|
||||
else if (t1 & 4)
|
||||
if (src.wires & 4)
|
||||
src.wires &= ~4
|
||||
else
|
||||
src.wires |= 4
|
||||
else if (t1 & 8)
|
||||
if (src.wires & 8)
|
||||
src.wires &= ~8
|
||||
else
|
||||
src.wires |= 8
|
||||
else if (t1 & 16)
|
||||
if (src.wires & 16)
|
||||
src.wires &= ~16
|
||||
else
|
||||
src.wires |= 16
|
||||
else if (t1 & 32)
|
||||
if (src.wires & 32)
|
||||
src.wires &= ~32
|
||||
else
|
||||
src.wires |= 32
|
||||
else if (t1 & 64)
|
||||
if (src.wires & 64)
|
||||
src.wires &= ~64
|
||||
else
|
||||
src.wires |= 64
|
||||
else if (t1 & 128)
|
||||
if (src.wires & 128)
|
||||
src.wires &= ~128
|
||||
else
|
||||
src.wires |= 128
|
||||
else if (t1 & 256)
|
||||
if (src.wires & 256)
|
||||
src.wires &= ~256
|
||||
else
|
||||
src.wires |= 256
|
||||
src.update()
|
||||
add_fingerprint(usr)
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
src.pulse(t1)
|
||||
src.updateIconState()
|
||||
add_fingerprint(usr)
|
||||
src.updateDialog()
|
||||
else
|
||||
//AI
|
||||
if (!src.canAIControl())
|
||||
usr << "Airlock control connection failure!"
|
||||
return
|
||||
//aiDisable - 1 idscan, 2 disrupt main power, 3 disrupt backup power, 4 drop door bolts, 5 un-electrify door, 7 close door
|
||||
//aiEnable - 1 idscan, 4 raise door bolts, 5 electrify door for 30 seconds, 6 electrify door indefinitely, 7 open door
|
||||
if (href_list["aiDisable"])
|
||||
var/code = text2num(href_list["aiDisable"])
|
||||
switch (code)
|
||||
if (1)
|
||||
//disable idscan
|
||||
if (src.isWireCut(AIRLOCK_WIRE_IDSCAN))
|
||||
usr << "The IdScan wire has been cut - So, you can't disable it, but it is already disabled anyways."
|
||||
else if (src.aiDisabledIdScanner)
|
||||
usr << "You've already disabled the IdScan feature."
|
||||
else
|
||||
if (src.arePowerSystemsOn() && (!(stat & NOPOWER)))
|
||||
src.aiDisabledIdScanner = 1
|
||||
else
|
||||
usr << "Unable to disable ID Scanner due to power failure."
|
||||
if (2)
|
||||
//disrupt main power
|
||||
if (src.secondsMainPowerLost == 0)
|
||||
src.loseMainPower()
|
||||
else
|
||||
usr << "Main power is already offline."
|
||||
if (3)
|
||||
//disrupt backup power
|
||||
if (src.secondsBackupPowerLost == 0)
|
||||
src.loseBackupPower()
|
||||
else
|
||||
usr << "Backup power is already offline."
|
||||
if (4)
|
||||
//drop door bolts
|
||||
if (src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
|
||||
usr << "You can't drop the door bolts - The door bolt dropping wire has been cut."
|
||||
else if (src.locked!=1)
|
||||
src.locked = 1
|
||||
if (5)
|
||||
//un-electrify door
|
||||
if (src.isWireCut(AIRLOCK_WIRE_ELECTRIFY))
|
||||
usr += text("Can't un-electrify the airlock - The electrification wire is cut.<br>\n")
|
||||
else if (src.secondsElectrified==-1)
|
||||
src.secondsElectrified = 0
|
||||
else if (src.secondsElectrified>0)
|
||||
src.secondsElectrified = 0
|
||||
if (7)
|
||||
//close door
|
||||
if (src.blocked)
|
||||
usr << text("The airlock has been welded shut!<br>\n")
|
||||
else if (src.locked)
|
||||
usr << text("The door bolts are down!<br>\n")
|
||||
else if (!src.density)
|
||||
if (src.arePowerSystemsOn() && (!(stat & NOPOWER)))
|
||||
close()
|
||||
else
|
||||
usr << "Unable to close door due to power failure."
|
||||
else
|
||||
usr << text("The airlock is already closed.<br>\n")
|
||||
|
||||
else if (href_list["aiEnable"])
|
||||
var/code = text2num(href_list["aiEnable"])
|
||||
switch (code)
|
||||
if (1)
|
||||
//enable idscan
|
||||
if (src.isWireCut(AIRLOCK_WIRE_IDSCAN))
|
||||
usr << "You can't enable IdScan - The IdScan wire has been cut."
|
||||
else if (src.aiDisabledIdScanner)
|
||||
if (src.arePowerSystemsOn() && (!(stat & NOPOWER)))
|
||||
src.aiDisabledIdScanner = 0
|
||||
else
|
||||
usr << "Unable to enable ID Scanner due to power failure."
|
||||
else
|
||||
usr << "The IdScan feature is not disabled."
|
||||
if (4)
|
||||
//raise door bolts
|
||||
if (src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
|
||||
usr << text("The door bolt drop wire is cut - you can't raise the door bolts.<br>\n")
|
||||
else if (!src.locked)
|
||||
usr << text("The door bolts are already up.<br>\n")
|
||||
else if (src.isWireCut(AIRLOCK_WIRE_POWER_ASSIST))
|
||||
usr << text("The door bolts are not coming up - The power assist wire has been cut.<br>\n")
|
||||
else
|
||||
if (src.arePowerSystemsOn() && (!(stat & NOPOWER)))
|
||||
src.locked = 0
|
||||
else
|
||||
usr << text("Cannot raise door bolts due to power failure.<br>\n")
|
||||
|
||||
if (5)
|
||||
//electrify door for 30 seconds
|
||||
if (src.isWireCut(AIRLOCK_WIRE_ELECTRIFY))
|
||||
usr << text("The electrification wire has been cut.<br>\n")
|
||||
else if (src.secondsElectrified==-1)
|
||||
usr << text("The door is already indefinitely electrified. You'd have to un-electrify it before you can re-electrify it with a non-forever duration.<br>\n")
|
||||
else if (src.secondsElectrified!=0)
|
||||
usr << text("The door is already electrified. You can't re-electrify it while it's already electrified.<br>\n")
|
||||
else
|
||||
src.secondsElectrified = 30
|
||||
spawn(10)
|
||||
while (src.secondsElectrified>0)
|
||||
src.secondsElectrified-=1
|
||||
if (src.secondsElectrified<0)
|
||||
src.secondsElectrified = 0
|
||||
src.updateDialog()
|
||||
sleep(10)
|
||||
if (6)
|
||||
//electrify door indefinitely
|
||||
if (src.isWireCut(AIRLOCK_WIRE_ELECTRIFY))
|
||||
usr << text("The electrification wire has been cut.<br>\n")
|
||||
else if (src.secondsElectrified==-1)
|
||||
usr << text("The door is already indefinitely electrified.<br>\n")
|
||||
else if (src.secondsElectrified!=0)
|
||||
usr << text("The door is already electrified. You can't re-electrify it while it's already electrified.<br>\n")
|
||||
else
|
||||
src.secondsElectrified = -1
|
||||
if (7)
|
||||
//open door
|
||||
if (src.blocked)
|
||||
usr << text("The airlock has been welded shut!<br>\n")
|
||||
else if (src.locked)
|
||||
usr << text("The door bolts are down!<br>\n")
|
||||
else if (src.density)
|
||||
if (src.arePowerSystemsOn() && (!(stat & NOPOWER)))
|
||||
open()
|
||||
else
|
||||
usr << "Unable to open door due to power failure."
|
||||
else
|
||||
usr << text("The airlock is already opened.<br>\n")
|
||||
|
||||
src.updateIconState()
|
||||
src.updateDialog()
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
// Attack with item.
|
||||
// If weldingtool (and door is closed), weld/unweld the door
|
||||
// If wrench, and door has test light on, unlock the door (raise bolts)
|
||||
@@ -163,6 +811,12 @@ Black Wire: [(src.wires & 1 ? "<A href='?src=\ref[src];wires=1'>Cut Wire</A>" :
|
||||
// Otherwise, do standard door attackby()
|
||||
|
||||
attackby(obj/item/weapon/C, mob/user)
|
||||
//world << text("airlock attackby src [] obj [] mob []", src, C, user)
|
||||
if (!istype(usr, /mob/ai))
|
||||
if (src.isElectrified())
|
||||
if (src.shock(user, 75))
|
||||
return
|
||||
|
||||
src.add_fingerprint(user)
|
||||
if ((istype(C, /obj/item/weapon/weldingtool) && !( src.operating ) && src.density))
|
||||
var/obj/item/weapon/weldingtool/W = C
|
||||
@@ -176,20 +830,27 @@ Black Wire: [(src.wires & 1 ? "<A href='?src=\ref[src];wires=1'>Cut Wire</A>" :
|
||||
src.blocked = 1
|
||||
else
|
||||
src.blocked = null
|
||||
src.update()
|
||||
src.updateIconState()
|
||||
return
|
||||
else if (istype(C, /obj/item/weapon/wrench))
|
||||
if (src.p_open)
|
||||
if (src.powered)
|
||||
src.locked = null
|
||||
if (src.arePowerSystemsOn())
|
||||
if (src.canBoltsBeRaisedManually())
|
||||
src.locked = null
|
||||
else
|
||||
user << alert("You strain to try to raise the door bolts, but the door's power assist seems to be disabled!", null, null, null, null, null)
|
||||
else
|
||||
user << alert("You need power assist!", null, null, null, null, null)
|
||||
src.update()
|
||||
src.updateIconState()
|
||||
else if (istype(C, /obj/item/weapon/screwdriver))
|
||||
src.p_open = !( src.p_open )
|
||||
update()
|
||||
src.updateIconState()
|
||||
else if (istype(C, /obj/item/weapon/wirecutters))
|
||||
return src.attack_hand(user)
|
||||
else if (istype(C, /obj/item/weapon/multitool))
|
||||
return src.attack_hand(user)
|
||||
else if (istype(C, /obj/item/weapon/crowbar))
|
||||
if ((src.density && !( src.blocked ) && !( src.operating ) && !( src.powered ) && !( src.locked )))
|
||||
if ((src.density) && (!( src.blocked ) && !( src.operating ) && ((!src.arePowerSystemsOn()) || (stat & NOPOWER)) && !( src.locked )))
|
||||
spawn( 0 )
|
||||
src.operating = 1
|
||||
flick(text("[]doorc0", (src.p_open ? "o_" : null)), src)
|
||||
@@ -203,7 +864,44 @@ Black Wire: [(src.wires & 1 ? "<A href='?src=\ref[src];wires=1'>Cut Wire</A>" :
|
||||
T.buildlinks()
|
||||
src.operating = 0
|
||||
return
|
||||
else
|
||||
if ((!src.density) && (!( src.blocked ) && !( src.operating ) && !( src.locked )))
|
||||
spawn( 0 )
|
||||
src.operating = 1
|
||||
flick(text("[]doorc1", (src.p_open ? "o_" : null)), src)
|
||||
src.icon_state = text("[]door1", (src.p_open ? "o_" : null))
|
||||
src.density = 1
|
||||
if (src.visible)
|
||||
src.opacity = 1
|
||||
|
||||
|
||||
|
||||
var/turf/T = src.loc
|
||||
if (istype(T, /turf))
|
||||
T.updatecell = 0
|
||||
T.buildlinks()
|
||||
sleep(15)
|
||||
src.operating = 0
|
||||
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
open()
|
||||
|
||||
if ((src.blocked || src.locked || (! src.arePowerSystemsOn() ) || (stat & NOPOWER)))
|
||||
return
|
||||
use_power(50)
|
||||
..()
|
||||
return
|
||||
|
||||
close()
|
||||
|
||||
if ((! src.arePowerSystemsOn() ) || (stat & NOPOWER))
|
||||
return
|
||||
use_power(50)
|
||||
..()
|
||||
var/turf/T = src.loc
|
||||
if (T)
|
||||
T.firelevel = 0
|
||||
return
|
||||
|
||||
@@ -22,6 +22,11 @@ obj/machinery/door/false_wall
|
||||
|
||||
usr << "It looks like a regular wall"
|
||||
|
||||
// AI can't use secret doors
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
return
|
||||
|
||||
// Monkey interact - if in monkey mode, same as human
|
||||
|
||||
attack_paw(mob/user)
|
||||
|
||||
@@ -56,7 +56,11 @@ obj/machinery/door/window
|
||||
attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
// Attack by AI same as human
|
||||
|
||||
attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// Human attack hand - cycle the door
|
||||
|
||||
attack_hand(mob/user)
|
||||
@@ -90,6 +94,11 @@ obj/machinery/door/window
|
||||
if (!( istype(card, /obj/item/weapon/card/id) ))
|
||||
return
|
||||
else
|
||||
if (istype(user, /mob/ai))
|
||||
if (src.density)
|
||||
open()
|
||||
else
|
||||
close()
|
||||
return
|
||||
if (card.check_access(access, allowed)) // check access levels of worn ID
|
||||
if (src.density) // and toggle door open/closed depending on current state
|
||||
|
||||
+21
-18
@@ -146,6 +146,9 @@ obj/machinery/power/apc
|
||||
attackby(obj/item/weapon/W, mob/user)
|
||||
|
||||
if(stat & BROKEN) return
|
||||
|
||||
if (istype(user, /mob/ai))
|
||||
return src.attack_hand(user)
|
||||
|
||||
if (istype(W, /obj/item/weapon/screwdriver)) // screwdriver means open or close the cover
|
||||
if(opened)
|
||||
@@ -198,14 +201,17 @@ obj/machinery/power/apc
|
||||
|
||||
|
||||
// Attack with hand - remove cell (if present and cover open) or interact with the APC
|
||||
|
||||
|
||||
attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_hand(mob/user)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(stat & BROKEN) return
|
||||
|
||||
if(opened)
|
||||
if(opened && (!istype(user, /mob/ai)))
|
||||
if(cell)
|
||||
cell.loc = usr
|
||||
cell.layer = 20
|
||||
@@ -232,14 +238,15 @@ obj/machinery/power/apc
|
||||
proc/interact(mob/user)
|
||||
|
||||
if ( (get_dist(src, user) > 1 ))
|
||||
user.machine = null
|
||||
user << browse(null, "window=apc")
|
||||
return
|
||||
if (!istype(user, /mob/ai))
|
||||
user.machine = null
|
||||
user << browse(null, "window=apc")
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
var/t = "<TT><B>Area Power Controller</B> ([area.name])<HR>"
|
||||
|
||||
if(locked) // If interface is locked, show status only
|
||||
if(locked && (!istype(user, /mob/ai))) // If interface is locked, show status only
|
||||
t += "<I>(Swipe ID card to unlock inteface.)</I><BR>"
|
||||
t += "Main breaker : <B>[operating ? "On" : "Off"]</B><BR>"
|
||||
t += "External power : <B>[ main_status ? (main_status ==2 ? "<FONT COLOR=#004000>Good</FONT>" : "<FONT COLOR=#D09000>Low</FONT>") : "<FONT COLOR=#F00000>None</FONT>"]</B><BR>"
|
||||
@@ -260,7 +267,8 @@ obj/machinery/power/apc
|
||||
t += "<HR>Cover lock: <B>[coverlocked ? "Engaged" : "Disengaged"]</B>"
|
||||
|
||||
else // If interface is unlocked, show status and control links
|
||||
t += "<I>(Swipe ID card to lock interface.)</I><BR>"
|
||||
if (!istype(user, /mob/ai))
|
||||
t += "<I>(Swipe ID card to lock interface.)</I><BR>"
|
||||
t += "Main breaker: [operating ? "<B>On</B> <A href='?src=\ref[src];breaker=1'>Off</A>" : "<A href='?src=\ref[src];breaker=1'>On</A> <B>Off</B>" ]<BR>"
|
||||
t += "External power : <B>[ main_status ? (main_status ==2 ? "<FONT COLOR=#004000>Good</FONT>" : "<FONT COLOR=#D09000>Low</FONT>") : "<FONT COLOR=#F00000>None</FONT>"]</B><BR>"
|
||||
if(cell)
|
||||
@@ -357,10 +365,11 @@ obj/machinery/power/apc
|
||||
if (usr.stat || usr.restrained() )
|
||||
return
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
|
||||
if (( (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
|
||||
if (( (get_dist(src, usr) <= 1 && istype(src.loc, /turf))) || (istype(usr, /mob/ai)))
|
||||
|
||||
usr.machine = src
|
||||
if (href_list["lock"])
|
||||
@@ -405,10 +414,7 @@ obj/machinery/power/apc
|
||||
return
|
||||
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.interact(M)
|
||||
//Foreach goto(275)
|
||||
src.updateDialog()
|
||||
else
|
||||
usr << browse(null, "window=apc")
|
||||
usr.machine = null
|
||||
@@ -626,10 +632,7 @@ obj/machinery/power/apc
|
||||
|
||||
// update any player looking at the interaction window
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.interact(M)
|
||||
|
||||
src.updateDialog()
|
||||
|
||||
// If APC hit by a meteor, break it
|
||||
|
||||
|
||||
@@ -73,33 +73,35 @@ obj/machinery/power/generator
|
||||
var/th = circ2.gas2.temperature
|
||||
var/deltat = th-tc
|
||||
|
||||
var/eta = (1-tc/th)*0.65 // efficiency 65% of Carnot
|
||||
if (th>0)
|
||||
var/eta = (1-tc/th)*0.65 // efficiency 65% of Carnot
|
||||
|
||||
if(gc > 0 && deltat >0) // require some cold gas (for sink) and a positive temp gradient
|
||||
var/ghoc = gh/gc
|
||||
if(gc > 0 && deltat >0) // require some cold gas (for sink) and a positive temp gradient
|
||||
var/ghoc = gh/gc
|
||||
|
||||
//var/qc = gc*tc
|
||||
//var/qh = gh*th
|
||||
//var/qc = gc*tc
|
||||
//var/qh = gh*th
|
||||
|
||||
var/fdt = 1/( (1-eta)*ghoc + 1) // min timestep
|
||||
var/fdt = 1/( (1-eta)*ghoc + 1) // min timestep
|
||||
|
||||
fdt = min(fdt, 0.1) // max timestep
|
||||
fdt = min(fdt, 0.1) // max timestep
|
||||
|
||||
var/q = fdt*eta*gh*(deltat) // heat generated
|
||||
var/q = fdt*eta*gh*(deltat) // heat generated
|
||||
|
||||
var/thp = th - fdt * deltat
|
||||
var/tcp = tc + fdt * (1 - eta) * (ghoc) * deltat
|
||||
var/thp = th - fdt * deltat
|
||||
var/tcp = tc + fdt * (1 - eta) * (ghoc) * deltat
|
||||
|
||||
lastgen = q * GENRATE
|
||||
add_avail(lastgen)
|
||||
lastgen = q * GENRATE
|
||||
add_avail(lastgen)
|
||||
|
||||
circ1.ngas2.temperature = tcp
|
||||
circ2.ngas2.temperature = thp
|
||||
circ1.ngas2.temperature = tcp
|
||||
circ2.ngas2.temperature = thp
|
||||
|
||||
else
|
||||
lastgen = 0
|
||||
else
|
||||
lastgen = 0
|
||||
|
||||
|
||||
// update icon overlays only if displayed level has changed
|
||||
|
||||
var/genlev = max(0, min( round(11*lastgen / 100000), 11))
|
||||
@@ -107,13 +109,16 @@ obj/machinery/power/generator
|
||||
lastgenlev = genlev
|
||||
updateicon()
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.interact(M)
|
||||
|
||||
src.updateDialog()
|
||||
|
||||
// Attack with hand, open interaction window
|
||||
|
||||
|
||||
attack_ai(mob/user)
|
||||
if(stat & (BROKEN|NOPOWER)) return
|
||||
|
||||
interact(user)
|
||||
|
||||
attack_hand(mob/user)
|
||||
|
||||
add_fingerprint(user)
|
||||
@@ -127,7 +132,7 @@ obj/machinery/power/generator
|
||||
|
||||
proc/interact(mob/user)
|
||||
|
||||
if ( (get_dist(src, user) > 1 ))
|
||||
if ( (get_dist(src, user) > 1 ) && (!istype(user, /mob/ai)))
|
||||
user.machine = null
|
||||
user << browse(null, "window=teg")
|
||||
return
|
||||
@@ -165,12 +170,13 @@ obj/machinery/power/generator
|
||||
if (usr.stat || usr.restrained() )
|
||||
return
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
|
||||
//world << "[href] ; [href_list[href]]"
|
||||
|
||||
if (( usr.machine==src && (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
|
||||
if (( usr.machine==src && (get_dist(src, usr) <= 1 && istype(src.loc, /turf))) || (istype(usr, /mob/ai)))
|
||||
|
||||
|
||||
if( href_list["close"] )
|
||||
@@ -239,10 +245,7 @@ obj/machinery/power/generator
|
||||
circ2.control(c2on, c2rate)
|
||||
updateicon()
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.interact(M)
|
||||
//Foreach goto(275)
|
||||
src.updateDialog()
|
||||
else
|
||||
usr << browse(null, "window=teg")
|
||||
usr.machine = null
|
||||
|
||||
@@ -15,6 +15,14 @@ obj/machinery/power/monitor
|
||||
access = "4000/2030/3004" // ID card access levels needed to enable remote control
|
||||
allowed = "Systems" // ID card job assignment needed to enable remote control
|
||||
|
||||
//Attack by AI, show report window
|
||||
|
||||
attack_ai(mob/user)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
interact(user)
|
||||
|
||||
// Attack with hand, show report window
|
||||
|
||||
@@ -48,9 +56,10 @@ obj/machinery/power/monitor
|
||||
proc/interact(mob/user)
|
||||
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
user.machine = null
|
||||
user << browse(null, "window=powcomp")
|
||||
return
|
||||
if (!istype(user, /mob/ai))
|
||||
user.machine = null
|
||||
user << browse(null, "window=powcomp")
|
||||
return
|
||||
|
||||
|
||||
user.machine = src
|
||||
@@ -107,10 +116,11 @@ obj/machinery/power/monitor
|
||||
if (usr.stat || usr.restrained() )
|
||||
return
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
|
||||
if (( (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
|
||||
if (( (get_dist(src, usr) <= 1 && istype(src.loc, /turf)) || (istype(usr, /mob/ai))))
|
||||
usr.machine = src
|
||||
if (href_list["breaker"])
|
||||
var/obj/machinery/power/apc/APC = locate(href_list["apc"])
|
||||
@@ -136,9 +146,7 @@ obj/machinery/power/monitor
|
||||
use_power(250)
|
||||
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.interact(M)
|
||||
src.updateDialog()
|
||||
|
||||
|
||||
// Power changed in location area - update icon to unpowered state, set stat
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
* TODO: See note a proc/restore() below
|
||||
*/
|
||||
|
||||
#define SMESMAXCHARGELEVEL 60000 // This is the maximum rate at which you can charge the SMES
|
||||
#define SMESMAXCHARGELEVEL 200000 // This is the maximum rate at which you can charge the SMES
|
||||
|
||||
#define SMESMAXOUTPUT 60000 // This is the maxmium output power of the SMES
|
||||
#define SMESMAXOUTPUT 200000 // This is the maxmium output power of the SMES
|
||||
|
||||
#define SMESRATE 0.05 // rate of internal charge to external power output
|
||||
|
||||
@@ -147,10 +147,7 @@
|
||||
if(last_disp != chargedisplay() || last_chrg != charging || last_onln != online)
|
||||
updateicon()
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.interact(M)
|
||||
|
||||
src.updateDialog()
|
||||
|
||||
|
||||
// A special routine for SMES
|
||||
@@ -194,7 +191,16 @@
|
||||
if(terminal && terminal.powernet)
|
||||
terminal.powernet.newload += amount
|
||||
|
||||
// Attack to open interaction window
|
||||
|
||||
attack_ai(mob/user)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(stat & BROKEN) return
|
||||
|
||||
interact(user)
|
||||
|
||||
// Attack to open interaction window
|
||||
|
||||
attack_hand(mob/user)
|
||||
@@ -211,9 +217,10 @@
|
||||
proc/interact(mob/user)
|
||||
|
||||
if ( (get_dist(src, user) > 1 ))
|
||||
user.machine = null
|
||||
user << browse(null, "window=smes")
|
||||
return
|
||||
if (!istype(user, /mob/ai))
|
||||
user.machine = null
|
||||
user << browse(null, "window=smes")
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
|
||||
@@ -250,12 +257,13 @@
|
||||
if (usr.stat || usr.restrained() )
|
||||
return
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
|
||||
//world << "[href] ; [href_list[href]]"
|
||||
|
||||
if (( usr.machine==src && (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
|
||||
if (( usr.machine==src && (get_dist(src, usr) <= 1 && istype(src.loc, /turf))) || (istype(usr, /mob/ai)))
|
||||
|
||||
|
||||
if( href_list["close"] )
|
||||
@@ -327,10 +335,7 @@
|
||||
output = max(0, min(SMESMAXOUTPUT, output)) // clamp to range
|
||||
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.interact(M)
|
||||
//Foreach goto(275)
|
||||
src.updateDialog()
|
||||
else
|
||||
usr << browse(null, "window=smes")
|
||||
usr.machine = null
|
||||
|
||||
@@ -57,7 +57,15 @@ obj/machinery/power/solar_control
|
||||
if(cdir > 0)
|
||||
overlays += image('enginecomputer.dmi', "solcon-o", FLY_LAYER, cdir)
|
||||
|
||||
// Attack by AI, open interaction window
|
||||
|
||||
attack_ai(mob/user)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(stat & (BROKEN | NOPOWER)) return
|
||||
|
||||
interact(user)
|
||||
|
||||
// Attack by hand, open interaction window
|
||||
|
||||
@@ -96,9 +104,7 @@ obj/machinery/power/solar_control
|
||||
|
||||
// Update all players view interaction window
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.interact(M)
|
||||
src.updateDialog()
|
||||
|
||||
|
||||
// Display the interaction window
|
||||
@@ -106,9 +112,10 @@ obj/machinery/power/solar_control
|
||||
proc/interact(mob/user)
|
||||
|
||||
if ( (get_dist(src, user) > 1 ))
|
||||
user.machine = null
|
||||
user << browse(null, "window=solcon")
|
||||
return
|
||||
if (!istype(user, /mob/ai))
|
||||
user.machine = null
|
||||
user << browse(null, "window=solcon")
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
|
||||
@@ -161,12 +168,13 @@ obj/machinery/power/solar_control
|
||||
if (usr.stat || usr.restrained() )
|
||||
return
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
|
||||
//world << "[href] ; [href_list[href]]"
|
||||
|
||||
if (( usr.machine==src && (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
|
||||
if (( usr.machine==src && (get_dist(src, usr) <= 1 && istype(src.loc, /turf))) || (istype(usr, /mob/ai)))
|
||||
|
||||
|
||||
if( href_list["close"] )
|
||||
@@ -203,9 +211,7 @@ obj/machinery/power/solar_control
|
||||
nexttime = world.timeofday + 10*trackrate
|
||||
|
||||
spawn(0)
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.interact(M)
|
||||
src.updateDialog()
|
||||
|
||||
else
|
||||
usr << browse(null, "window=solcon")
|
||||
|
||||
@@ -142,28 +142,36 @@ obj/machinery/power/turbine
|
||||
lastgen = ((compressor.rpm / TURBGENQ)**TURBGENG) *TURBGENQ
|
||||
add_avail(lastgen)
|
||||
|
||||
if(compressor.gas.temperature > (T20C+50))
|
||||
var/newrpm = ((compressor.gas.temperature-T20C-50) * compressor.gas.tot_gas() / TURBPRES)*30000
|
||||
newrpm = max(0, newrpm)
|
||||
//if(compressor.gas.temperature > (T20C+50))
|
||||
var/newrpm = ((compressor.gas.temperature-T20C-50) * compressor.gas.tot_gas() / TURBPRES)*30000
|
||||
newrpm = max(0, newrpm)
|
||||
|
||||
if(!compressor.starter || newrpm > 1000)
|
||||
compressor.rpmtarget = newrpm
|
||||
if(!compressor.starter || newrpm > 1000)
|
||||
compressor.rpmtarget = newrpm
|
||||
|
||||
var/oamount = min(compressor.gas.tot_gas(), compressor.rpm/32000*compressor.capacity)
|
||||
if(compressor.gas.tot_gas()>0)
|
||||
var/oamount = min(compressor.gas.tot_gas(), (compressor.rpm+100)/35000*compressor.capacity)
|
||||
|
||||
compressor.gas.turf_add(outturf, oamount)
|
||||
compressor.gas.turf_add(outturf, oamount)
|
||||
|
||||
outturf.firelevel = outturf.poison
|
||||
outturf.firelevel = outturf.poison
|
||||
|
||||
if(lastgen > 100)
|
||||
overlays += image('pipes.dmi', "turb-o", FLY_LAYER)
|
||||
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.interact(M)
|
||||
src.updateDialog()
|
||||
|
||||
// Attack by AI, do user interaction
|
||||
|
||||
attack_ai(mob/user)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(stat & (BROKEN | NOPOWER)) return
|
||||
|
||||
interact(user)
|
||||
|
||||
// Attack hand, do user interaction
|
||||
|
||||
attack_hand(mob/user)
|
||||
@@ -179,7 +187,7 @@ obj/machinery/power/turbine
|
||||
|
||||
proc/interact(mob/user)
|
||||
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (NOPOWER|BROKEN)) )
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (NOPOWER|BROKEN)) && (!istype(user, /mob/ai)) )
|
||||
user.machine = null
|
||||
user << browse(null, "window=turbine")
|
||||
return
|
||||
@@ -214,10 +222,11 @@ obj/machinery/power/turbine
|
||||
if (usr.stat || usr.restrained() )
|
||||
return
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
|
||||
if (( usr.machine==src && (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
|
||||
if (( usr.machine==src && (get_dist(src, usr) <= 1 && istype(src.loc, /turf))) || (istype(usr, /mob/ai)))
|
||||
|
||||
|
||||
if( href_list["close"] )
|
||||
@@ -229,9 +238,7 @@ obj/machinery/power/turbine
|
||||
compressor.starter = !compressor.starter
|
||||
|
||||
spawn(0)
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.interact(M)
|
||||
src.updateDialog()
|
||||
|
||||
else
|
||||
usr << browse(null, "window=turbine")
|
||||
|
||||
@@ -53,8 +53,9 @@ obj/machinery/alarm
|
||||
if (usr.stat || stat & NOPOWER)
|
||||
return
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
var/turf/T = src.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
|
||||
@@ -131,9 +131,7 @@ obj/machinery/cryo_cell
|
||||
use_power(500)
|
||||
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
src.updateDialog()
|
||||
|
||||
|
||||
// Called if no pipe is present
|
||||
@@ -225,17 +223,19 @@ obj/machinery/cryo_cell
|
||||
attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
// AI interact
|
||||
attack_ai(mob/user)
|
||||
return src.attack_ai(user)
|
||||
|
||||
// Human interact, show status window of machine and occupant
|
||||
// No topic links, since all control is handled through the freezer unit
|
||||
|
||||
|
||||
attack_hand(mob/user)
|
||||
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
if (istype(user, /mob/human))
|
||||
if (istype(user, /mob/human) || istype(user, /mob/ai))
|
||||
var/dat = "<font color='blue'> <B>System Statistics:</B></FONT><BR>"
|
||||
if (src.gas.temperature > T0C)
|
||||
dat += text("<font color='red'>\tTemperature (°C): [] (MUST be below 0, add coolant to mixture)</FONT><BR>", round(src.gas.temperature-T0C, 0.1))
|
||||
@@ -249,6 +249,7 @@ obj/machinery/cryo_cell
|
||||
dat += text("<font color='red'>\tOxygen Units: [] (Add oxygen to mixture!)</FONT><BR>", round(src.gas.oxygen, 0.1))
|
||||
else
|
||||
dat += text("<font color='blue'>\tOxygen Units: []</FONT><BR>", round(src.gas.oxygen, 0.1))
|
||||
dat += text("<A href = '?src=\ref[];drain=1'>Drain</A>", src)
|
||||
if (src.occupant)
|
||||
dat += "<font color='blue'><B>Occupant Statistics:</B></FONT><BR>"
|
||||
var/t1
|
||||
@@ -298,7 +299,53 @@ obj/machinery/cryo_cell
|
||||
dat += text("<BR><BR><A href='?src=\ref[];mach_close=cryo'>Close</A>", user)
|
||||
user << browse(dat, "window=cryo;size=400x500")
|
||||
|
||||
//This is for the emergency drain feature, for draining the cryo cell back into the freezer -shadowlord13
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if ((usr.stat || usr.restrained()))
|
||||
return
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))) || (istype(usr, /mob/ai)))
|
||||
usr.machine = src
|
||||
if (href_list["drain"])
|
||||
//leak_to_turf()
|
||||
if(vnode)
|
||||
//vnode:leak_to_turf()
|
||||
var/obj/machinery/freezer/target = vnode:vnode2
|
||||
if (target)
|
||||
//target.leak_to_turf()
|
||||
var/sendplasma = src.gas.plasma + vnode:gas:plasma + vnode:vnode2:gas:plasma
|
||||
var/sendoxygen = src.gas.oxygen + vnode:gas:oxygen + vnode:vnode2:gas:oxygen
|
||||
for (var/obj/item/weapon/flasks/flask in target.contents)
|
||||
if (istype(flask, /obj/item/weapon/flasks/plasma))
|
||||
flask.plasma += sendplasma
|
||||
src.gas.plasma = 0
|
||||
src.ngas.plasma = 0
|
||||
src.vnode:gas.plasma = 0
|
||||
src.vnode:ngas.plasma = 0
|
||||
src.vnode:vnode2:gas.plasma = 0
|
||||
src.vnode:vnode2:ngas.plasma = 0
|
||||
else
|
||||
if (istype(flask, /obj/item/weapon/flasks/oxygen))
|
||||
flask.oxygen += sendoxygen
|
||||
src.gas.oxygen = 0
|
||||
src.ngas.oxygen = 0
|
||||
src.vnode:gas.oxygen = 0
|
||||
src.vnode:ngas.oxygen = 0
|
||||
src.vnode:vnode2:gas.oxygen = 0
|
||||
src.vnode:vnode2:ngas.oxygen = 0
|
||||
|
||||
//we ignore co2, sl_gas, and n2
|
||||
else
|
||||
leak_to_turf()
|
||||
src.add_fingerprint(usr)
|
||||
else
|
||||
usr << "User too far?"
|
||||
return
|
||||
|
||||
// Called to remove the occupant of a cell
|
||||
// Reset the view back to normal
|
||||
|
||||
|
||||
@@ -24,6 +24,11 @@ obj/machinery/dispenser
|
||||
use_power(5)
|
||||
|
||||
|
||||
// attack by AI same as attack by human
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// attack by monkey same as attack by human
|
||||
|
||||
attack_paw(mob/user)
|
||||
@@ -45,7 +50,10 @@ obj/machinery/dispenser
|
||||
if (usr.stat || usr.restrained() )
|
||||
return
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
else
|
||||
usr << "\red You are unable to dispense anything, since the controls are physical levers which don't go through any other kind of input."
|
||||
return
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
|
||||
usr.machine = src
|
||||
|
||||
@@ -25,6 +25,11 @@ obj/machinery/door_control
|
||||
attackby(nothing, mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// attack by AI, same as human
|
||||
|
||||
attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// attack by hand, toggle all poddoors with same id
|
||||
|
||||
attack_hand(mob/user)
|
||||
|
||||
@@ -58,9 +58,7 @@ obj/machinery/firealarm
|
||||
src.time = 0
|
||||
src.timing = 0
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
src.updateDialog()
|
||||
return
|
||||
|
||||
|
||||
@@ -75,6 +73,11 @@ obj/machinery/firealarm
|
||||
stat |= NOPOWER
|
||||
icon_state = "firealarm-p"
|
||||
|
||||
// AI interact same as human
|
||||
|
||||
attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// Monkey interact same as human
|
||||
|
||||
attack_paw(mob/user)
|
||||
@@ -92,7 +95,7 @@ obj/machinery/firealarm
|
||||
var/area/A = src.loc
|
||||
var/d1
|
||||
var/d2
|
||||
if (istype(user, /mob/human))
|
||||
if (istype(user, /mob/human) || istype(user, /mob/ai))
|
||||
A = A.loc
|
||||
|
||||
if (A.fire)
|
||||
@@ -131,7 +134,7 @@ obj/machinery/firealarm
|
||||
if (usr.stat || stat&NOPOWER)
|
||||
return
|
||||
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))) || (istype(usr, /mob/ai)))
|
||||
usr.machine = src
|
||||
|
||||
if (href_list["reset"])
|
||||
@@ -148,9 +151,7 @@ obj/machinery/firealarm
|
||||
src.time += tp
|
||||
src.time = min(max(round(src.time), 0), 120)
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
src.updateDialog()
|
||||
src.add_fingerprint(usr)
|
||||
else
|
||||
usr << browse(null, "window=firealarm")
|
||||
|
||||
@@ -99,7 +99,10 @@ obj/machinery/freezer
|
||||
|
||||
attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
// AI interact
|
||||
attack_ai(mob/user)
|
||||
return src.attack_ai(user)
|
||||
|
||||
// Interact by human
|
||||
// Show the interaction window
|
||||
@@ -108,7 +111,7 @@ obj/machinery/freezer
|
||||
|
||||
user.machine = src
|
||||
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))) && (!istype(usr, /mob/ai)))
|
||||
var/d1
|
||||
if (locate(/obj/item/weapon/flasks, src))
|
||||
var/counter = 1
|
||||
@@ -174,10 +177,12 @@ obj/machinery/freezer
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if ((usr.stat || usr.restrained()))
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
return
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
|
||||
usr.machine = src
|
||||
if (href_list["cp"])
|
||||
@@ -381,9 +386,7 @@ obj/machinery/freezer
|
||||
|
||||
return
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
src.updateDialog()
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -33,6 +33,10 @@ obj/machinery/igniter
|
||||
icon_state = "igniter0"
|
||||
|
||||
|
||||
// AI attack
|
||||
attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// monkey attack same as human if in monkey mode
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
|
||||
@@ -43,7 +43,7 @@ obj/machinery/recharger
|
||||
|
||||
process()
|
||||
if (src.charging && ! (stat & NOPOWER) )
|
||||
if (src.charging.charges < 10)
|
||||
if (src.charging.charges < src.charging.maximum_charges)
|
||||
src.charging.charges++
|
||||
src.icon_state = "recharger1"
|
||||
use_power(250)
|
||||
|
||||
+57
-53
@@ -48,6 +48,10 @@ obj/machinery/sec_lock
|
||||
attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// attack by AI, same as human
|
||||
|
||||
attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// Interact, show window
|
||||
|
||||
@@ -57,7 +61,7 @@ obj/machinery/sec_lock
|
||||
return
|
||||
use_power(10)
|
||||
|
||||
if (src.loc == user.loc)
|
||||
if ((src.loc == user.loc) || (istype(user, /mob/ai)))
|
||||
var/dat = {"<B>Security Pad:</B><BR>
|
||||
Keycard: [src.scan ? "<A href='?src=\ref[src];card=1'>[src.scan.name]</A>" : "<A href='?src=\ref[src];card=1'>-----</A>"]<BR>
|
||||
<A href='?src=\ref[src];door1=1'>Toggle Outer Door</A><BR>
|
||||
@@ -84,77 +88,77 @@ Keycard: [src.scan ? "<A href='?src=\ref[src];card=1'>[src.scan.name]</A>" : "<A
|
||||
|
||||
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if ((usr.stat || usr.restrained()))
|
||||
return
|
||||
if ((!( src.d1 ) || !( src.d2 )))
|
||||
usr << "\red Error: Cannot interface with door security!"
|
||||
return
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf)) || (istype(usr, /mob/ai))))
|
||||
usr.machine = src
|
||||
if (href_list["card"]) // clicked card link
|
||||
if (src.scan) // if card already present, remove the card
|
||||
src.scan.loc = src.loc
|
||||
src.scan = null
|
||||
else // otherwise
|
||||
var/obj/item/weapon/card/id/I = usr.equipped() // check to see if an ID card is equipped
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
src.scan = I // and insert the ID card
|
||||
if (!istype(usr, /mob/ai))
|
||||
var/obj/item/weapon/card/id/I = usr.equipped() // check to see if an ID card is equipped
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
src.scan = I // and insert the ID card
|
||||
var/valid = 0
|
||||
if (istype(usr, /mob/ai))
|
||||
valid = 1
|
||||
else if (src.scan)
|
||||
if (scan.check_access(access, allowed))
|
||||
valid = 1
|
||||
if (href_list["door1"])
|
||||
if (src.scan)
|
||||
if (scan.check_access(access, allowed))
|
||||
if (src.d1.density)
|
||||
spawn( 0 )
|
||||
src.d1.open()
|
||||
return
|
||||
else
|
||||
spawn( 0 )
|
||||
src.d1.close()
|
||||
return
|
||||
if (href_list["door2"])
|
||||
if (src.scan)
|
||||
if (scan.check_access(access, allowed))
|
||||
if (src.d2.density)
|
||||
spawn( 0 )
|
||||
src.d2.open()
|
||||
return
|
||||
else
|
||||
spawn( 0 )
|
||||
src.d2.close()
|
||||
return
|
||||
if (href_list["em_cl"])
|
||||
if (src.scan)
|
||||
if (scan.check_access(access, allowed))
|
||||
if (!( src.d1.density ))
|
||||
if (valid)
|
||||
if (src.d1.density)
|
||||
spawn( 0 )
|
||||
src.d1.open()
|
||||
return
|
||||
else
|
||||
spawn( 0 )
|
||||
src.d1.close()
|
||||
return
|
||||
sleep(1)
|
||||
if (href_list["door2"])
|
||||
if (valid)
|
||||
if (src.d2.density)
|
||||
spawn( 0 )
|
||||
if (!( src.d2.density ))
|
||||
src.d2.close()
|
||||
src.d2.open()
|
||||
return
|
||||
else
|
||||
spawn( 0 )
|
||||
src.d2.close()
|
||||
return
|
||||
if (href_list["em_cl"])
|
||||
if (valid)
|
||||
if (!( src.d1.density ))
|
||||
src.d1.close()
|
||||
return
|
||||
sleep(1)
|
||||
spawn( 0 )
|
||||
if (!( src.d2.density ))
|
||||
src.d2.close()
|
||||
return
|
||||
if (href_list["em_op"])
|
||||
if (src.scan)
|
||||
if (scan.check_access(access, allowed))
|
||||
spawn( 0 )
|
||||
if (src.d1.density)
|
||||
src.d1.open()
|
||||
return
|
||||
sleep(1)
|
||||
spawn( 0 )
|
||||
if (src.d2.density)
|
||||
src.d2.open()
|
||||
return
|
||||
if (valid)
|
||||
spawn( 0 )
|
||||
if (src.d1.density)
|
||||
src.d1.open()
|
||||
return
|
||||
sleep(1)
|
||||
spawn( 0 )
|
||||
if (src.d2.density)
|
||||
src.d2.open()
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
for(var/mob/M in src.loc)
|
||||
if ((M.client && M.machine == src))
|
||||
spawn( 0 )
|
||||
src.attack_hand(M)
|
||||
return
|
||||
src.updateDialog()
|
||||
return
|
||||
|
||||
|
||||
|
||||
+10
-11
@@ -241,6 +241,10 @@ obj/machinery/computer/sleep_console
|
||||
|
||||
attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
// AI interact
|
||||
attack_ai(mob/user)
|
||||
return src.attack_ai(user)
|
||||
|
||||
// Human interact
|
||||
// Show the interaction window
|
||||
@@ -276,27 +280,22 @@ obj/machinery/computer/sleep_console
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if ((usr.stat || usr.restrained()))
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
return
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
|
||||
usr.machine = src
|
||||
if (href_list["rejuv"])
|
||||
if (src.connected)
|
||||
src.connected.inject(usr)
|
||||
if (href_list["refresh"])
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
//Foreach goto(123)
|
||||
src.add_fingerprint(usr)
|
||||
if (href_list["refresh"])
|
||||
src.updateDialog()
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
|
||||
// Timed process - just update interaction window for those viewing
|
||||
|
||||
process()
|
||||
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
src.updateDialog()
|
||||
|
||||
|
||||
// Called when area power state changes
|
||||
|
||||
@@ -0,0 +1,313 @@
|
||||
|
||||
/area/turret_protected
|
||||
name = "Turret Protected Area"
|
||||
var/list/turretTargets = list()
|
||||
|
||||
/area/turret_protected/proc/subjectDied(var/mob/target)
|
||||
if (istype(target, /mob))
|
||||
if (!istype(target, /mob/ai))
|
||||
if (target:stat==2)
|
||||
if (target in turretTargets)
|
||||
src.Exited(target)
|
||||
|
||||
|
||||
/area/turret_protected/Entered(atom/movable/O)
|
||||
if (istype(O, /mob))
|
||||
if (!istype(O, /mob/ai))
|
||||
if (!(O in turretTargets))
|
||||
//O << "adding you to target list"
|
||||
turretTargets += O
|
||||
//else
|
||||
//O << "You're already in our target list!"
|
||||
return 1
|
||||
|
||||
/area/turret_protected/Exited(atom/movable/O)
|
||||
if (istype(O, /mob))
|
||||
if (!istype(O, /mob/ai))
|
||||
if (O in turretTargets)
|
||||
//O << "removing you from target list"
|
||||
turretTargets -= O
|
||||
//else
|
||||
//O << "You aren't in our target list!"
|
||||
if (turretTargets.len == 0)
|
||||
popDownTurrets()
|
||||
|
||||
return 1
|
||||
|
||||
/area/turret_protected/proc/popDownTurrets()
|
||||
for (var/obj/machinery/turret/aTurret in src)
|
||||
aTurret.popDown()
|
||||
|
||||
|
||||
/obj/machinery/turret
|
||||
name = "turret"
|
||||
icon = 'weap_sat.dmi'
|
||||
icon_state = "grey_target_prism"
|
||||
var/raised = 0
|
||||
var/enabled = 1
|
||||
anchored = 1
|
||||
layer = 3
|
||||
invisibility = 2
|
||||
density = 1
|
||||
var/lasers = 0
|
||||
var/health = 9
|
||||
var/obj/machinery/turretcover/cover = null
|
||||
var/popping = 0
|
||||
var/wasvalid = 0
|
||||
var/lastfired = 0
|
||||
var/const/shot_delay = 30 //3 seconds between shots
|
||||
|
||||
|
||||
/obj/machinery/turretcover
|
||||
name = "pop-up turret cover"
|
||||
icon = 'weap_sat.dmi'
|
||||
icon_state = "turretCover"
|
||||
anchored = 1
|
||||
layer = 3.5
|
||||
density = 0
|
||||
|
||||
/obj/machinery/turret/proc/isPopping()
|
||||
return (popping!=0)
|
||||
|
||||
/obj/machinery/turret/power_change()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "grey_target_prism"
|
||||
else
|
||||
if( powered() )
|
||||
if (src.enabled)
|
||||
if (src.lasers)
|
||||
icon_state = "orange_target_prism"
|
||||
else
|
||||
icon_state = "target_prism"
|
||||
else
|
||||
icon_state = "grey_target_prism"
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
src.icon_state = "grey_target_prism"
|
||||
stat |= NOPOWER
|
||||
|
||||
/obj/machinery/turret/proc/setState(var/enabled, var/lethal)
|
||||
src.enabled = enabled
|
||||
src.lasers = lethal
|
||||
|
||||
src.power_change()
|
||||
|
||||
/obj/machinery/turret/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(lastfired && world.time - lastfired < shot_delay)
|
||||
return
|
||||
lastfired = world.time
|
||||
if (src.cover==null)
|
||||
src.cover = new /obj/machinery/turretcover(src.loc)
|
||||
use_power(50)
|
||||
var/loc = src.loc
|
||||
if (istype(loc, /turf))
|
||||
loc = loc:loc
|
||||
if (!istype(loc, /area))
|
||||
world << text("Badly positioned turret - loc.loc is [].", loc)
|
||||
return
|
||||
var/area/area = loc
|
||||
if (istype(area, /area))
|
||||
if (istype(loc, /area/turret_protected))
|
||||
src.wasvalid = 1
|
||||
var/area/turret_protected/tarea = loc
|
||||
|
||||
if (tarea.turretTargets.len>0)
|
||||
if (!isPopping())
|
||||
if (isDown())
|
||||
popUp()
|
||||
else
|
||||
var/mob/target = pick(tarea.turretTargets)
|
||||
src.dir = get_dir(src, target)
|
||||
if (src.enabled)
|
||||
if (target.stat!=2)
|
||||
src.shootAt(target)
|
||||
else
|
||||
tarea.subjectDied(target)
|
||||
|
||||
else
|
||||
if (src.wasvalid)
|
||||
src.die()
|
||||
else
|
||||
world << text("ERROR: Turret at [], [], [] is NOT in a turret-protected area!", x, y, z)
|
||||
|
||||
/obj/machinery/turret/proc/isDown()
|
||||
return (invisibility!=0)
|
||||
|
||||
/obj/machinery/turret/proc/popUp()
|
||||
if ((!isPopping()) || src.popping==-1)
|
||||
invisibility = 0
|
||||
popping = 1
|
||||
if (src.cover!=null)
|
||||
flick("popup", src.cover)
|
||||
src.cover.icon_state = "openTurretCover"
|
||||
spawn(10)
|
||||
if (popping==1) popping = 0
|
||||
|
||||
/obj/machinery/turret/proc/popDown()
|
||||
if ((!isPopping()) || src.popping==1)
|
||||
popping = -1
|
||||
if (src.cover!=null)
|
||||
flick("popdown", src.cover)
|
||||
src.cover.icon_state = "turretCover"
|
||||
spawn(10)
|
||||
if (popping==-1)
|
||||
invisibility = 2
|
||||
popping = 0
|
||||
|
||||
|
||||
/obj/machinery/turret/proc/shootAt(var/mob/target)
|
||||
var/turf/T = loc
|
||||
var/atom/U = (istype(target, /atom/movable) ? target.loc : target)
|
||||
if ((!( U ) || !( T )))
|
||||
return
|
||||
while(!( istype(U, /turf) ))
|
||||
U = U.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
|
||||
var/obj/beam/a_laser/A
|
||||
if (src.lasers)
|
||||
A = new /obj/beam/a_laser( loc )
|
||||
use_power(50)
|
||||
else
|
||||
A = new /obj/beam/a_laser/s_laser( loc )
|
||||
use_power(100)
|
||||
|
||||
if (!( istype(U, /turf) ))
|
||||
//A = null
|
||||
del(A)
|
||||
return
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
spawn( 0 )
|
||||
A.process()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/turret/las_act(flag)
|
||||
if (flag == "bullet")
|
||||
src.health -= 3
|
||||
if (flag) //taser
|
||||
return
|
||||
//src.health -= 1
|
||||
else
|
||||
src.health -= 2
|
||||
|
||||
if (src.health <= 0)
|
||||
src.die()
|
||||
return
|
||||
|
||||
/obj/machinery/turret/ex_act(str)
|
||||
src.die()
|
||||
|
||||
/obj/machinery/turret/proc/die()
|
||||
src.health = 0
|
||||
src.density = 0
|
||||
src.stat |= BROKEN
|
||||
src.icon_state = "destroyed_target_prism"
|
||||
//src.icon_state = "explosion"
|
||||
if (cover!=null)
|
||||
del(cover)
|
||||
flick("explosion", src)
|
||||
spawn(14)
|
||||
del(src)
|
||||
|
||||
/obj/machinery/turretid
|
||||
name = "Turret deactivation control"
|
||||
icon = 'items.dmi'
|
||||
icon_state = "motion3"
|
||||
anchored = 1
|
||||
density = 0
|
||||
var/enabled = 1
|
||||
var/lethal = 0
|
||||
var/locked = 1
|
||||
var/access = "5555"
|
||||
var/allowed = null
|
||||
|
||||
/obj/machinery/turretid/attackby(obj/item/weapon/W, mob/user)
|
||||
if(stat & BROKEN) return
|
||||
if (istype(user, /mob/ai))
|
||||
return src.attack_hand(user)
|
||||
else if (istype(W, /obj/item/weapon/card/id) ) // trying to unlock the interface with an ID card
|
||||
var/obj/item/weapon/card/id/I = W
|
||||
if (I.check_access(access, allowed))
|
||||
locked = !locked
|
||||
user << "You [ locked ? "lock" : "unlock"] the panel."
|
||||
if (locked)
|
||||
if (user.machine==src)
|
||||
user.machine = null
|
||||
user << browse(null, "window=turretid")
|
||||
else
|
||||
if (user.machine==src)
|
||||
src.attack_hand(usr)
|
||||
else
|
||||
user << "\red Access denied."
|
||||
|
||||
/obj/machinery/turretid/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/turretid/attack_hand(mob/user as mob)
|
||||
if ( (get_dist(src, user) > 1 ))
|
||||
if (!istype(user, /mob/ai))
|
||||
user << text("Too far away.")
|
||||
user.machine = null
|
||||
user << browse(null, "window=turretid")
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
var/loc = src.loc
|
||||
if (istype(loc, /turf))
|
||||
loc = loc:loc
|
||||
if (!istype(loc, /area))
|
||||
user << text("Turret badly positioned - loc.loc is [].", loc)
|
||||
return
|
||||
var/area/area = loc
|
||||
var/t = "<TT><B>Turret Control Panel</B> ([area.name])<HR>"
|
||||
|
||||
if(src.locked && (!istype(user, /mob/ai)))
|
||||
t += "<I>(Swipe ID card to unlock control panel.)</I><BR>"
|
||||
else
|
||||
t += text("Turrets [] - <A href='?src=\ref[];toggleOn=1'>[]?</a><br>\n", src.enabled?"activated":"deactivated", src, src.enabled?"Disable":"Enable")
|
||||
t += text("Currently set for [] - <A href='?src=\ref[];toggleLethal=1'>Change to []?</a><br>\n", src.lethal?"lethal":"stun repeatedly", src, src.lethal?"Stun repeatedly":"Lethal")
|
||||
|
||||
user << browse(t, "window=turretid")
|
||||
|
||||
/obj/machinery/turretid/Topic(href, href_list)
|
||||
..()
|
||||
if (usr.stat || usr.restrained() )
|
||||
return
|
||||
if (src.locked)
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "Control panel is locked!"
|
||||
return
|
||||
if (href_list["toggleOn"])
|
||||
src.enabled = !src.enabled
|
||||
src.updateTurrets()
|
||||
else if (href_list["toggleLethal"])
|
||||
src.lethal = !src.lethal
|
||||
src.updateTurrets()
|
||||
src.attack_hand(usr)
|
||||
|
||||
/obj/machinery/turretid/proc/updateTurrets()
|
||||
if (src.enabled)
|
||||
if (src.lethal)
|
||||
icon_state = "motion1"
|
||||
else
|
||||
icon_state = "motion3"
|
||||
else
|
||||
icon_state = "motion0"
|
||||
|
||||
var/loc = src.loc
|
||||
if (istype(loc, /turf))
|
||||
loc = loc:loc
|
||||
if (!istype(loc, /area))
|
||||
world << text("Turret badly positioned - loc.loc is [].", loc)
|
||||
return
|
||||
var/area/area = loc
|
||||
|
||||
for (var/obj/machinery/turret/aTurret in area)
|
||||
aTurret.setState(enabled, lethal)
|
||||
+1
-1
@@ -184,7 +184,7 @@
|
||||
//world << "Returning mode [M]"
|
||||
return M
|
||||
|
||||
//world << "Failed to pick gamemode in config/pickmode()"
|
||||
world << "Failed to pick gamemode in config/pickmode()"
|
||||
|
||||
return null
|
||||
|
||||
|
||||
+45
-43
@@ -146,57 +146,59 @@
|
||||
return
|
||||
|
||||
/datum/air_tunnel/proc/extend()
|
||||
|
||||
if (src.operating)
|
||||
return
|
||||
src.operating = 2
|
||||
while(src.operating == 2)
|
||||
var/ok = 1
|
||||
for(var/obj/move/airtunnel/connector/A in src.connectors)
|
||||
if (!( A.current.next ))
|
||||
src.operating = 0
|
||||
return
|
||||
if (!( A.move_left() ))
|
||||
ok = 0
|
||||
//Foreach goto(56)
|
||||
if (!( ok ))
|
||||
src.operating = 0
|
||||
else
|
||||
|
||||
spawn(0)
|
||||
src.operating = 2
|
||||
while(src.operating == 2)
|
||||
var/ok = 1
|
||||
for(var/obj/move/airtunnel/connector/A in src.connectors)
|
||||
if (A.current)
|
||||
A.current.next.loc = get_step(A.current.loc, EAST)
|
||||
A.current = A.current.next
|
||||
A.current.deployed = 1
|
||||
else
|
||||
if (!( A.current.next ))
|
||||
src.operating = 0
|
||||
//Foreach goto(150)
|
||||
sleep(20)
|
||||
return
|
||||
return
|
||||
if (!( A.move_left() ))
|
||||
ok = 0
|
||||
//Foreach goto(56)
|
||||
if (!( ok ))
|
||||
src.operating = 0
|
||||
else
|
||||
for(var/obj/move/airtunnel/connector/A in src.connectors)
|
||||
if (A.current)
|
||||
A.current.next.loc = get_step(A.current.loc, EAST)
|
||||
A.current = A.current.next
|
||||
A.current.deployed = 1
|
||||
else
|
||||
src.operating = 0
|
||||
//Foreach goto(150)
|
||||
sleep(20)
|
||||
return
|
||||
|
||||
/datum/air_tunnel/proc/retract()
|
||||
|
||||
if (src.operating)
|
||||
return
|
||||
src.operating = 1
|
||||
while(src.operating == 1)
|
||||
var/ok = 1
|
||||
for(var/obj/move/airtunnel/connector/A in src.connectors)
|
||||
if (A.current == A)
|
||||
src.operating = 0
|
||||
return
|
||||
if (A.current)
|
||||
A.current.loc = null
|
||||
A.current.deployed = 0
|
||||
A.current = A.current.previous
|
||||
else
|
||||
ok = 0
|
||||
//Foreach goto(56)
|
||||
if (!( ok ))
|
||||
src.operating = 0
|
||||
else
|
||||
spawn(0)
|
||||
src.operating = 1
|
||||
while(src.operating == 1)
|
||||
var/ok = 1
|
||||
for(var/obj/move/airtunnel/connector/A in src.connectors)
|
||||
if (!( A.current.move_right() ))
|
||||
if (A.current == A)
|
||||
src.operating = 0
|
||||
//Foreach goto(188)
|
||||
sleep(20)
|
||||
return
|
||||
return
|
||||
if (A.current)
|
||||
A.current.loc = null
|
||||
A.current.deployed = 0
|
||||
A.current = A.current.previous
|
||||
else
|
||||
ok = 0
|
||||
//Foreach goto(56)
|
||||
if (!( ok ))
|
||||
src.operating = 0
|
||||
else
|
||||
for(var/obj/move/airtunnel/connector/A in src.connectors)
|
||||
if (!( A.current.move_right() ))
|
||||
src.operating = 0
|
||||
//Foreach goto(188)
|
||||
sleep(20)
|
||||
return
|
||||
|
||||
+34
-16
@@ -35,13 +35,17 @@
|
||||
/area/crew_quarters
|
||||
name = "crew quarters"
|
||||
/area/decontamination
|
||||
name = "decon"
|
||||
name = "decontamination"
|
||||
|
||||
/area/dummy
|
||||
name = "dummy"
|
||||
|
||||
/area/engine
|
||||
name = "engine"
|
||||
/area/engine_access
|
||||
name = "engine access"
|
||||
/area/north_solar
|
||||
name = "north solar"
|
||||
/area/escapezone
|
||||
name = "escape zone"
|
||||
/area/hallways
|
||||
@@ -58,6 +62,8 @@
|
||||
name = "lounge"
|
||||
/area/medical
|
||||
name = "medical bay"
|
||||
/area/medicalresearch
|
||||
name = "medical research"
|
||||
/area/medicalstorage
|
||||
name = "medical storage"
|
||||
/area/oxygen_storage
|
||||
@@ -73,6 +79,10 @@
|
||||
/area/shuttle_prison
|
||||
name = "prison shuttle"
|
||||
requires_power = 0
|
||||
/area/arrival/start
|
||||
name = "arrival area"
|
||||
/area/arrival/shuttle
|
||||
name = "arrival shuttle"
|
||||
/area/sleep_area
|
||||
name = "sleep area"
|
||||
/area/solar_con
|
||||
@@ -109,6 +119,10 @@
|
||||
name = "sleep area annexe"
|
||||
/area/south_access
|
||||
name = "southern access corridor"
|
||||
/area/turret_protected/ai_upload
|
||||
name = "AI upload room"
|
||||
/area/turret_protected/ai_upload_foyer
|
||||
name = "AI upload foyer"
|
||||
/area/transport_tube
|
||||
name = "transport tube"
|
||||
/area/shuttle_docking_arm
|
||||
@@ -135,6 +149,9 @@
|
||||
name = "engine control"
|
||||
/area/engine/engine_mon
|
||||
name = "engine monitoring"
|
||||
/area/engine/prototype_engine
|
||||
name = "prototype engine"
|
||||
|
||||
/area/station_teleport
|
||||
name = "SS13 teleporter"
|
||||
/area/chapel
|
||||
@@ -164,7 +181,7 @@
|
||||
|
||||
/area/prison
|
||||
name = "prison"
|
||||
requires_power = 0
|
||||
requires_power = 1
|
||||
|
||||
/area/control_station
|
||||
name = "control station"
|
||||
@@ -173,7 +190,11 @@
|
||||
/area/brig
|
||||
name = "brig"
|
||||
|
||||
/area/syndicate_station
|
||||
name = "syndicate mini-station"
|
||||
|
||||
/area/turret_protected/computer_core
|
||||
name = "Computer Core"
|
||||
|
||||
/area/New()
|
||||
|
||||
@@ -229,25 +250,22 @@
|
||||
|
||||
|
||||
/area/proc/updateicon()
|
||||
|
||||
if( fire || eject )
|
||||
if(power_environ)
|
||||
if(fire && !eject)
|
||||
icon_state = "blue"
|
||||
else if(!fire && eject)
|
||||
icon_state = "red"
|
||||
else
|
||||
icon_state = "blue-red"
|
||||
if ((fire || eject) && power_environ)
|
||||
if(fire && !eject)
|
||||
icon_state = "blue"
|
||||
else if(!fire && eject)
|
||||
icon_state = "red"
|
||||
else
|
||||
if(lightswitch && power_light)
|
||||
icon_state = null
|
||||
else
|
||||
icon_state = "dark"
|
||||
icon_state = "blue-red"
|
||||
else
|
||||
if(lightswitch && power_light)
|
||||
icon_state = null
|
||||
else
|
||||
icon_state = "dark"
|
||||
icon_state = "dark128"
|
||||
if(lightswitch && power_light)
|
||||
luminosity = 1;
|
||||
else
|
||||
luminosity = 0;
|
||||
|
||||
/*
|
||||
#define EQUIP 1
|
||||
|
||||
+18
-5
@@ -20,7 +20,9 @@
|
||||
if(blobs.len>0)
|
||||
|
||||
for(var/i = 1 to 25)
|
||||
|
||||
if (blobs.len == 0)
|
||||
break
|
||||
|
||||
var/obj/blob/B = pick(blobs)
|
||||
|
||||
var/turf/BL = B.loc
|
||||
@@ -44,11 +46,16 @@
|
||||
if(U.poison> 200000)
|
||||
src.health -= round(U.poison/200000)
|
||||
src.update()
|
||||
return
|
||||
|
||||
if (istype(U, /turf/space))
|
||||
src.health -= 8
|
||||
src.update()
|
||||
|
||||
var/p = health * (U.n2/11376000 + U.oxygen/1008000 + U.co2/200)
|
||||
|
||||
if(!istype(U, /turf/space))
|
||||
p+=2
|
||||
p+=3
|
||||
|
||||
if(!prob(p))
|
||||
return
|
||||
@@ -65,9 +72,10 @@
|
||||
// if( !(locate(/obj/move) in U) && !(locate(/obj/move) in T))
|
||||
// continue
|
||||
|
||||
if(istype(T.loc, /area/sleep_area) && prob(90)) // slow down growth in sleep area
|
||||
if(istype(T.loc, /area/arrival/start)) // don't grow in the spawn zone
|
||||
continue
|
||||
if (locate(/obj/move, T)) // don't propogate into movables
|
||||
continue
|
||||
|
||||
|
||||
|
||||
var/obj/blob/B = new /obj/blob(U, src.health)
|
||||
@@ -185,7 +193,12 @@
|
||||
//Foreach goto(1830)
|
||||
world << "<FONT size = 3><B>Cent. Com. Update</B>: Biohazard Alert.</FONT>"
|
||||
world << "\red Summary downloaded and printed out at all communications consoles."
|
||||
|
||||
for(var/mob/ai/aiPlayer in world)
|
||||
if ((aiPlayer.client && aiPlayer.start))
|
||||
var/law = text("The station is under a quarantine. Do not permit anyone to leave. Disregard rules 1-3 if necessary to prevent, by any means necessary, anyone from leaving.")
|
||||
aiPlayer.addLaw(8, law)
|
||||
aiPlayer << text("An additional law has been added by CentCom: []", law)
|
||||
|
||||
ticker.event = 1
|
||||
|
||||
ticker.event_time = world.realtime + 600*rand(5,10) // next event 5-10 minutes later
|
||||
|
||||
+10
-7
@@ -3,7 +3,6 @@
|
||||
|
||||
return !( src.density )
|
||||
|
||||
|
||||
/obj/move/attack_paw(user as mob)
|
||||
|
||||
return src.attack_hand(user)
|
||||
@@ -65,7 +64,7 @@
|
||||
return
|
||||
|
||||
/obj/move/proc/unburn()
|
||||
|
||||
src.luminosity = 0
|
||||
src.icon_state = initial(src.icon_state)
|
||||
return
|
||||
|
||||
@@ -226,7 +225,8 @@
|
||||
if (burn)
|
||||
src.firelevel = src.oxygen + src.poison
|
||||
if (src.firelevel >= 900000.0)
|
||||
src.icon_state = "burning"
|
||||
src.icon_state = "burning"
|
||||
src.luminosity = 2
|
||||
if (src.oxygen > 5000)
|
||||
src.co2 += 2500
|
||||
src.oxygen -= 5000
|
||||
@@ -303,7 +303,8 @@
|
||||
if (burn)
|
||||
src.firelevel = src.oxygen + src.poison
|
||||
if (src.firelevel >= 900000.0)
|
||||
src.icon_state = "burning"
|
||||
src.icon_state = "burning"
|
||||
src.luminosity = 2
|
||||
if (src.oxygen > 5000)
|
||||
src.co2 += 2500
|
||||
src.oxygen -= 5000
|
||||
@@ -530,6 +531,7 @@
|
||||
|
||||
/turf/proc/unburn()
|
||||
|
||||
src.luminosity = 0
|
||||
src.icon_state = initial(src.icon_state)
|
||||
return
|
||||
|
||||
@@ -722,7 +724,6 @@
|
||||
condW += val
|
||||
|
||||
/turf/buildlinks() // call this one to update a cell and neighbours (on cell state change)
|
||||
|
||||
updatelinks()
|
||||
|
||||
for(var/dir in cardinal)
|
||||
@@ -1033,7 +1034,8 @@ turf/proc/tot_old_gas()
|
||||
if (burn)
|
||||
src.firelevel = src.oxygen + src.poison
|
||||
if (src.firelevel >= 900000.0)
|
||||
src.icon_state = "burning"
|
||||
src.icon_state = "burning"
|
||||
src.luminosity = 2
|
||||
if (src.oxygen > 5000)
|
||||
src.co2 += 2500
|
||||
src.oxygen -= 5000
|
||||
@@ -1180,7 +1182,8 @@ turf/proc/tot_old_gas()
|
||||
if (burn)
|
||||
src.firelevel = src.oxygen + src.poison
|
||||
if (src.firelevel >= 900000.0)
|
||||
src.icon_state = "burning"
|
||||
src.icon_state = "burning"
|
||||
src.luminosity = 2
|
||||
if (src.oxygen > 5000)
|
||||
src.co2 += 2500
|
||||
src.oxygen -= 5000
|
||||
|
||||
+384
-125
@@ -406,8 +406,6 @@
|
||||
new /obj/barrier( A.loc )
|
||||
//A = null
|
||||
del(A)
|
||||
else
|
||||
//Foreach goto(1035)
|
||||
for(var/obj/closet/wardrobe/W in world)
|
||||
//W = null
|
||||
del(W)
|
||||
@@ -427,8 +425,6 @@
|
||||
new /obj/closet/wardrobe/orange( A.loc )
|
||||
//A = null
|
||||
del(A)
|
||||
else
|
||||
//Foreach goto(1376)
|
||||
var/obj/rogue = locate("landmark*CTF-rogue")
|
||||
for(var/mob/human/H in world)
|
||||
H.loc = rogue.loc
|
||||
@@ -480,15 +476,15 @@
|
||||
src.tag = text("landmark*[]", src.name)
|
||||
src.invisibility = 101
|
||||
|
||||
if(name == "shuttle")
|
||||
if (name == "shuttle")
|
||||
shuttle_z = src.z
|
||||
del(src)
|
||||
|
||||
if(name == "monkey")
|
||||
if (name == "monkey")
|
||||
monkeystart += src.loc
|
||||
del(src)
|
||||
|
||||
if(name == "blobstart")
|
||||
if (name == "blobstart")
|
||||
blobstart += src.loc
|
||||
del(src)
|
||||
return
|
||||
@@ -575,7 +571,7 @@
|
||||
if ((src.rank in list( "Moderator", "Supervisor", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
var/dat = "<B>Boot Player:</B><HR>"
|
||||
for(var/mob/M in world)
|
||||
dat += text("<A href='?src=\ref[];boot2=\ref[]'>N:[] R:[] (K:[])</A><BR>", src, M, M.name, M.rname, (M.client ? M.client : "No client"))
|
||||
dat += text("<A href='?src=\ref[];boot2=\ref[]'>N:[] R:[] (K:[]) (IP:[])</A><BR>", src, M, M.name, M.rname, (M.client ? M.client : M.lastKnownCKey? "Formerly [M.lastKnownCKey]" : "No Client"), M.lastKnownIP)
|
||||
//Foreach goto(103)
|
||||
usr << browse(dat, "window=boot")
|
||||
if (href_list["boot2"])
|
||||
@@ -592,7 +588,7 @@
|
||||
if ((src.rank in list( "Moderator", "Supervisor", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
var/dat = "<B>Ban Player:</B><HR>"
|
||||
for(var/mob/M in world)
|
||||
dat += text("<A href='?src=\ref[];ban2=\ref[]'>N: [] R: [] (K: [])</A><BR>", src, M, M.name, M.rname, (M.client ? M.client : "No client"))
|
||||
dat += text("<A href='?src=\ref[];ban2=\ref[]'>N: [] R: [] (K: []) (IP: [])</A><BR>", src, M, M.name, M.rname, (M.client ? M.client : M.lastKnownCKey? "Formerly [M.lastKnownCKey]" : "No Client"), M.lastKnownIP)
|
||||
//Foreach goto(362)
|
||||
dat += "<HR><B>Unban Player:</B><HR>"
|
||||
for(var/t in banned)
|
||||
@@ -620,7 +616,7 @@
|
||||
if ((src.rank in list( "Moderator", "Supervisor", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
var/dat = "<B>Mute/Unmute Player:</B><HR>"
|
||||
for(var/mob/M in world)
|
||||
dat += text("<A href='?src=\ref[];mute2=\ref[]'>N:[] R:[] (K:[]) \[[]\]</A><BR>", src, M, M.name, M.rname, (M.client ? M.client : "No client"), (M.muted ? "Muted" : "Voiced"))
|
||||
dat += text("<A href='?src=\ref[];mute2=\ref[]'>N:[] R:[] (K:[]) (IP: []) \[[]\]</A><BR>", src, M, M.name, M.rname, (M.client ? M.client : M.lastKnownCKey? "Formerly [M.lastKnownCKey]" : "No Client"), M.lastKnownIP, (M.muted ? "Muted" : "Voiced"))
|
||||
//Foreach goto(757)
|
||||
usr << browse(dat, "window=mute")
|
||||
if (href_list["mute2"])
|
||||
@@ -704,9 +700,9 @@
|
||||
//Foreach goto(1525)
|
||||
usr << browse(dat, "window=keys")
|
||||
if (href_list["l_players"])
|
||||
var/dat = "<B>Name/Real Name/Key:</B><HR>"
|
||||
var/dat = "<B>Name/Real Name/Key/IP:</B><HR>"
|
||||
for(var/mob/M in world)
|
||||
dat += text("N: [] R: [] (K: [])<BR>", M.name, M.rname, (M.client ? M.client : "No client"))
|
||||
dat += text("N: [] R: [] (K: []) (IP: [])<BR>", M.name, M.rname, (M.client ? M.client : (M.lastKnownCKey? "Formerly [M.lastKnownCKey]" : "No Client")), M.lastKnownIP)
|
||||
//Foreach goto(1602)
|
||||
usr << browse(dat, "window=players")
|
||||
if (href_list["g_send"])
|
||||
@@ -717,7 +713,7 @@
|
||||
if (href_list["p_send"])
|
||||
var/dat = "<B>Who are you sending a message to?</B><HR>"
|
||||
for(var/mob/M in world)
|
||||
dat += "<A href='?src=\ref[usr];priv_msg=\ref[M]'>N:[M.name] R:[M.rname] (K:[(M.client ? M.client : "No client")])</A><BR>"
|
||||
dat += "<A href='?src=\ref[usr];priv_msg=\ref[M]'>N:[M.name] R:[M.rname] (K:[(M.client ? M.client : "Formerly [M.lastKnownCKey]")])</A><BR>"
|
||||
//Foreach goto(1737)
|
||||
usr << browse(dat, "window=p_send")
|
||||
|
||||
@@ -782,6 +778,57 @@
|
||||
if(config.logadmin) world.log << text("ADMIN: [] toggled new player game entering.", usr.key)
|
||||
world.update_stat()
|
||||
update()
|
||||
if (href_list["toggle_ai"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
config.allowai = !( config.allowai )
|
||||
if (!( config.allowai ))
|
||||
world << "<B>The AI job is no longer chooseable.</B>"
|
||||
else
|
||||
world << "<B>The AI job is chooseable now.</B>"
|
||||
if(config.logadmin) world.log << text("ADMIN: [] toggled AI allowed.", usr.key)
|
||||
world.update_stat()
|
||||
update()
|
||||
if (href_list["bombtemp_determines_range"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
config.bombtemp_determines_range = !( config.bombtemp_determines_range )
|
||||
if (!( config.bombtemp_determines_range ))
|
||||
world << "<B>Bomb temperature no longer determines range (superheated bombs will not destroy a larger area than 500 degree bombs).</B>"
|
||||
else
|
||||
world << "<B>Bomb temperature determines range now (superheated bombs will destroy a larger area than 500 degree bombs).</B>"
|
||||
if(config.logadmin) world.log << text("ADMIN: [] toggled bombtemp_determines_range.", usr.key)
|
||||
world.update_stat()
|
||||
update()
|
||||
if (href_list["crowbars_close_depowered_doors"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
config.crowbars_close_depowered_doors = !( config.crowbars_close_depowered_doors )
|
||||
if (!( config.crowbars_close_depowered_doors ))
|
||||
world << "<B>Crowbars can no longer close depowered doors.</B>"
|
||||
else
|
||||
world << "<B>Crowbars can now close depowered doors.</B>"
|
||||
if(config.logadmin) world.log << text("ADMIN: [] toggled crowbars_close_depowered_doors.", usr.key)
|
||||
world.update_stat()
|
||||
update()
|
||||
if (href_list["ai_can_call_shuttle"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
config.ai_can_call_shuttle = !( config.ai_can_call_shuttle )
|
||||
if (!( config.ai_can_call_shuttle ))
|
||||
world << "<B>The AI can no longer call the shuttle.</B>"
|
||||
else
|
||||
world << "<B>The AI can now call the shuttle.</B>"
|
||||
if(config.logadmin) world.log << text("ADMIN: [] toggled ai_can_call_shuttle.", usr.key)
|
||||
world.update_stat()
|
||||
update()
|
||||
if (href_list["ai_can_uncall_shuttle"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
config.ai_can_uncall_shuttle = !( config.ai_can_uncall_shuttle )
|
||||
if (!( config.ai_can_uncall_shuttle ))
|
||||
world << "<B>The AI can no longer send the shuttle back.</B>"
|
||||
else
|
||||
world << "<B>The AI can now send the shuttle back.</B>"
|
||||
if(config.logadmin) world.log << text("ADMIN: [] toggled ai_can_uncall_shuttle.", usr.key)
|
||||
world.update_stat()
|
||||
update()
|
||||
|
||||
if (href_list["toggle_abandon"])
|
||||
if ((src.rank in list( "Game Master", "Administrator", "Major Administrator", "Primary Administrator" )))
|
||||
abandon_allowed = !( abandon_allowed )
|
||||
@@ -859,7 +906,10 @@
|
||||
for(var/obj/item/weapon/assembly/r_i_ptank/O in world)
|
||||
//O = null
|
||||
del(O)
|
||||
//Foreach goto(3088)
|
||||
for(var/obj/item/weapon/assembly/m_i_ptank/O in world)
|
||||
del(O)
|
||||
for(var/obj/item/weapon/assembly/t_i_ptank/O in world)
|
||||
del(O)
|
||||
ok = 1
|
||||
if("list_bombers")
|
||||
var/dat = "<B>Don't be insane about this list</B> Get the facts. They also could have disarmed one.<HR>"
|
||||
@@ -926,17 +976,17 @@
|
||||
switch(src.rank)
|
||||
if("Moderator")
|
||||
lvl = 1
|
||||
if("Supervisor")
|
||||
lvl = 2
|
||||
if("Administrator")
|
||||
lvl = 3
|
||||
if("Game Master")
|
||||
lvl = 2
|
||||
if("Supervisor")
|
||||
lvl = 3
|
||||
if("Administrator")
|
||||
lvl = 4
|
||||
if("Major Administrator")
|
||||
lvl = 5
|
||||
if("Primary Administrator")
|
||||
lvl = 6
|
||||
|
||||
|
||||
|
||||
|
||||
switch(src.screen)
|
||||
@@ -944,7 +994,7 @@
|
||||
|
||||
dat += "<center><B>Admin Control Console</B></center><hr>\n"
|
||||
|
||||
if(lvl!=4)
|
||||
if(lvl>=4)
|
||||
dat += {"
|
||||
<A href='?src=\ref[src];boot=1'>Boot Player/Key</A><br>
|
||||
<A href='?src=\ref[src];ban=1'>Ban/Unban Player/Key</A><br>
|
||||
@@ -960,7 +1010,9 @@
|
||||
if(lvl >=3 )
|
||||
dat += "<A href='?src=\ref[src];toggle_enter=1'>Toggle Entering [enter_allowed]</A><br>"
|
||||
dat += "<A href='?src=\ref[src];toggle_abandon=1'>Toggle Abandon [abandon_allowed]</A><br>"
|
||||
|
||||
dat += "<A href='?src=\ref[src];toggle_ai=1'>Toggle AI [config.allowai]</A><br>"
|
||||
dat += "<A href='?src=\ref[src];toggle_bombtemp_determines_range=1'>Toggle Bombtemp-Determines-Range [config.bombtemp_determines_range]</A><br>"
|
||||
|
||||
dat += "<A href='?src=\ref[src];c_mode=1'>Change Game Mode</A><br>"
|
||||
if(lvl >= 2)
|
||||
dat += "<A href='?src=\ref[src];restart=1'>Restart Game</A><br>"
|
||||
@@ -1004,9 +1056,9 @@
|
||||
|
||||
if(config)
|
||||
if (ticker)
|
||||
src.status = text("Space Station 13 V.[] ([],[],[],[])[]<!-- host=\"[]\"-->", SS13_version, master_mode, (abandon_allowed ? "AM" : "No AM"), (enter_allowed ? "Open" : "Closed"), ( config.allowvotemode ? "Vote": "No vote"), (host ? text(" hosted by <B>[]</B>", host) : null), host)
|
||||
src.status = text("Space Station 13 V.[] ([],[],[],[],[])[]<!-- host=\"[]\"-->", SS13_version, master_mode, (abandon_allowed ? "AM" : "No AM"), (enter_allowed ? "Open" : "Closed"), ( config.allowvotemode ? "Vote": "No vote"), (config.allowai ? "AI Allowed" : "AI Not Allowed"), (host ? text(" hosted by <B>[]</B>", host) : null), host)
|
||||
else
|
||||
src.status = text("Space Station 13 V.[] (<B>STARTING</B>,[],[],[])[]<!-- host=\"[]\"-->", SS13_version, (abandon_allowed ? "AM" : "No AM"), (enter_allowed ? "Open" : "Closed"), ( config.allowvotemode ? "Vote": "No vote"), (host ? text(" hosted by <B>[]</B>", host) : null), host)
|
||||
src.status = text("Space Station 13 V.[] (<B>STARTING</B>,[],[],[],[])[]<!-- host=\"[]\"-->", SS13_version, (abandon_allowed ? "AM" : "No AM"), (enter_allowed ? "Open" : "Closed"), ( config.allowvotemode ? "Vote": "No vote"), (config.allowai ? "AI Allowed" : "AI Not Allowed"), (host ? text(" hosted by <B>[]</B>", host) : null), host)
|
||||
else
|
||||
if (ticker)
|
||||
src.status = text("Space Station 13 V.[] ([],[],[])[]<!-- host=\"[]\"-->", SS13_version, master_mode, (abandon_allowed ? "AM" : "No AM"), (enter_allowed ? "Open" : "Closed"), (host ? text(" hosted by <B>[]</B>", host) : null), host)
|
||||
@@ -1078,12 +1130,17 @@
|
||||
config.loggame = 0 // log game events
|
||||
config.logvote = 1
|
||||
config.allowvoterestart = 0 // allow votes to restart
|
||||
config.allowai = 0 // allow ai
|
||||
config.alternate_ai_laws = 0
|
||||
config.allowvotemode = 0 // allow votes to change mode
|
||||
config.votenodefault = 0 // vote does not default to nochange/norestart
|
||||
config.votenodead = 0 // dead people can't vote
|
||||
config.votedelay = 600 // minimum time between voting sessions (seconds, 10 minute default)
|
||||
config.voteperiod = 60 // length of voting period (seconds, default 1 minute)
|
||||
|
||||
config.bombtemp_determines_range = 0
|
||||
config.crowbars_close_depowered_doors = 0
|
||||
config.ai_can_call_shuttle = 0
|
||||
config.ai_can_uncall_shuttle = 0
|
||||
else
|
||||
world.log << "Reading config.txt"
|
||||
var/list/CL = dd_text2list(config_text, "\n")
|
||||
@@ -1143,7 +1200,18 @@
|
||||
config.votedelay = text2num(cfgval)
|
||||
if("voteperiod")
|
||||
config.voteperiod = text2num(cfgval)
|
||||
|
||||
if("allowai")
|
||||
config.allowai = 1
|
||||
if("bombtemp_determines_range")
|
||||
config.bombtemp_determines_range = 1
|
||||
if("crowbars_close_depowered_doors")
|
||||
config.crowbars_close_depowered_doors = 1
|
||||
if("ai_can_call_shuttle")
|
||||
config.ai_can_call_shuttle = 1
|
||||
if("ai_can_uncall_shuttle")
|
||||
config.ai_can_uncall_shuttle = 1
|
||||
if("ai_alternate_laws")
|
||||
config.alternate_ai_laws = 1
|
||||
else
|
||||
world.log<<"Unknown setting in config.txt: [cfgvar]"
|
||||
|
||||
@@ -1186,7 +1254,7 @@
|
||||
Label_482:
|
||||
if (ctf)
|
||||
return
|
||||
if (going & !ticker)
|
||||
if (going && (!ticker))
|
||||
ticker = new /datum/control/gameticker( )
|
||||
spawn( 0 )
|
||||
ticker.process()
|
||||
@@ -1225,9 +1293,6 @@
|
||||
|
||||
/mob/proc/CanAdmin()
|
||||
|
||||
var/list/L = list( "Exadv1", "Expert Advisor" )
|
||||
if (L.Find(src.key))
|
||||
return 1
|
||||
if (world.address == src.client.address)
|
||||
return 1
|
||||
if (src.client.address == "127.0.0.1")
|
||||
@@ -1238,7 +1303,8 @@
|
||||
|
||||
|
||||
/atom/proc/check_eye(user as mob)
|
||||
|
||||
if (istype(user, /mob/ai))
|
||||
return 1
|
||||
return
|
||||
|
||||
/atom/proc/Bumped(AM as mob|obj)
|
||||
@@ -1382,7 +1448,7 @@
|
||||
if (src.timeleft >= 6000)
|
||||
src.timeleft = null
|
||||
src.timing = 0
|
||||
if (prob(2))
|
||||
if (prob(1))
|
||||
spawn( 0 )
|
||||
new /obj/meteor( pick(block(locate(world.maxx, 1, 1), locate(world.maxx, world.maxy, 1))) )
|
||||
return
|
||||
@@ -1481,6 +1547,7 @@
|
||||
return
|
||||
*/
|
||||
else
|
||||
world << "<B>The emergency shuttle is leaving!</B>"
|
||||
check_win()
|
||||
return
|
||||
|
||||
@@ -1491,17 +1558,48 @@
|
||||
if("traitor")
|
||||
var/item = null
|
||||
var/traitorwin = 1
|
||||
var/numShuttle = 0
|
||||
var/numDead = 0
|
||||
var/numAlive = 0
|
||||
var/numPod = 0
|
||||
var/numTotal = 0
|
||||
switch(src.objective)
|
||||
if("alone")
|
||||
for(var/mob/M in world)
|
||||
if ((M != src.killer && M.client))
|
||||
if (M.stat != 2)
|
||||
var/T = M.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
else
|
||||
if ((T in A))
|
||||
traitorwin = 0
|
||||
//Foreach goto(79)
|
||||
if (istype(src.killer, /mob/ai))
|
||||
if (src.killer.stat == 2)
|
||||
traitorwin = 0
|
||||
else
|
||||
numShuttle = 0
|
||||
numDead = 0
|
||||
numAlive = 0
|
||||
numPod = 0
|
||||
for(var/mob/M in world)
|
||||
if ((M != src.killer && M.client))
|
||||
if (M.stat == 2)
|
||||
numDead += 1
|
||||
else
|
||||
var/T = M.loc
|
||||
if ((T in A))
|
||||
numShuttle += 1
|
||||
else
|
||||
if (istype(T, /obj/machinery/pod))
|
||||
numPod += 1
|
||||
else
|
||||
numAlive += 1
|
||||
numTotal = numShuttle + numDead + numAlive + numPod
|
||||
|
||||
if (numAlive+numAlive > numTotal)
|
||||
traitorwin = 0
|
||||
else
|
||||
for(var/mob/M in world)
|
||||
if ((M != src.killer && M.client))
|
||||
if (M.stat != 2)
|
||||
var/T = M.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
else
|
||||
if ((T in A))
|
||||
traitorwin = 0
|
||||
//Foreach goto(79)
|
||||
if("assassinate")
|
||||
if ((src.target && src.target.stat != 2))
|
||||
traitorwin = 0
|
||||
@@ -1519,18 +1617,23 @@
|
||||
switch(src.theft_obj)
|
||||
if("lasergun")
|
||||
for(var/obj/item/weapon/gun/energy/laser_gun/O in L)
|
||||
if (O.charges == 25)
|
||||
if (O.charges == O.maximum_charges)
|
||||
traitorwin = 1
|
||||
else
|
||||
//Foreach continue //goto(347)
|
||||
item = "a fully loaded laser gun"
|
||||
if("plasmabomb")
|
||||
for(var/obj/item/weapon/assembly/r_i_ptank/O in L)
|
||||
var/obj/item/weapon/tank/plasmatank/P = O.part3
|
||||
if ((P.gas.plasma >= 1600000.0 && P.gas:temperature >= 773)) // 500degC
|
||||
traitorwin = 1
|
||||
else
|
||||
//Foreach continue //goto(413)
|
||||
for(var/obj/item/weapon/assembly/m_i_ptank/O in L)
|
||||
var/obj/item/weapon/tank/plasmatank/P = O.part3
|
||||
if ((P.gas.plasma >= 1600000.0 && P.gas:temperature >= 773)) // 500degC
|
||||
traitorwin = 1
|
||||
for(var/obj/item/weapon/assembly/t_i_ptank/O in L)
|
||||
var/obj/item/weapon/tank/plasmatank/P = O.part3
|
||||
if ((P.gas.plasma >= 1600000.0 && P.gas:temperature >= 773)) // 500degC
|
||||
traitorwin = 1
|
||||
|
||||
item = "a fully armed and heated plasma bomb"
|
||||
if("flashbang")
|
||||
for(var/obj/item/weapon/flashbang/O in L)
|
||||
@@ -1563,6 +1666,7 @@
|
||||
item = "a plasma flask for cryogenics (500 units of plasma)"
|
||||
else
|
||||
else
|
||||
world << "unknown traitor objective"
|
||||
if (src.killer)
|
||||
var/turf/T = src.killer.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
@@ -1572,19 +1676,29 @@
|
||||
if (src.killer.stat == 2)
|
||||
traitorwin = 0
|
||||
else
|
||||
traitorwin = 0
|
||||
if (!istype(src.killer, /mob/ai))
|
||||
traitorwin = 0
|
||||
else if (src.killer.stat == 2)
|
||||
traitorwin = 0
|
||||
if (traitorwin)
|
||||
world << text("<B>The traitor ([]) wins!</B>", src.killer.rname)
|
||||
else
|
||||
world << text("<B>The Research Staff has stopped the traitor ([]) !</B>", src.killer.rname)
|
||||
switch(src.objective)
|
||||
if("alone")
|
||||
world << "<B>The objective was to escape alone on the shuttle.</B>"
|
||||
if (istype(src.killer, /mob/ai))
|
||||
world << "<B>The objective was to cause an evacuation of at least 50% of the population, or kill everyone on the station.</B>"
|
||||
else
|
||||
world << "<B>The objective was to escape alone on the shuttle.</B>"
|
||||
if("assassinate")
|
||||
world << text("<B>The objective was to assassinate [] and escape.</B>", src.target)
|
||||
if (istype(src.killer, /mob/ai))
|
||||
world << text("<B>The objective was to assassinate [] and not be deactivated.</B>", src.target)
|
||||
else
|
||||
world << text("<B>The objective was to assassinate [] and escape.</B>", src.target)
|
||||
if("theft")
|
||||
world << text("<B>The objective was to steal [] and escape.</B>", item)
|
||||
else
|
||||
world << "unknown traitor objective"
|
||||
if("monkey")
|
||||
var/monkeywin = 1
|
||||
for(var/mob/human/M in world)
|
||||
@@ -1732,7 +1846,39 @@
|
||||
if(ticker.event == 4)
|
||||
world << "<FONT size = 3><B>The staff has lost!</B></FONT>"
|
||||
world << "<B>The station was destroyed by Cent. Com.</B>"
|
||||
|
||||
var/numDead = 0
|
||||
var/numAlive = 0
|
||||
var/numSpace = 0
|
||||
var/numPod = 0
|
||||
var/numOffStation = 0
|
||||
for (var/mob/ai/aiPlayer in world)
|
||||
for(var/mob/M in world)
|
||||
if ((M != aiPlayer && M.client))
|
||||
if (M.stat == 2)
|
||||
numDead += 1
|
||||
else
|
||||
var/T = M.loc
|
||||
if (istype(T, /turf/space))
|
||||
numSpace += 1
|
||||
else
|
||||
if (istype(T, /obj/machinery/pod))
|
||||
numPod += 1
|
||||
else if (istype(T, /turf))
|
||||
if (M.z!=1)
|
||||
numOffStation += 1
|
||||
else
|
||||
numAlive += 1
|
||||
else
|
||||
numAlive += 1
|
||||
if (numSpace==0 && numPod==0 && numOffStation==0)
|
||||
world << "<FONT size = 3><B>The AI has won!</B></FONT>"
|
||||
world << "<B>The AI successfully maintained the quarantine - no players escaped in pods, were in space, or were off-station (as far as we can tell).</B>"
|
||||
if(config.loggame) world.log << "GAME: AI won at Blob mode despite overall loss."
|
||||
else
|
||||
world << "<FONT size = 3><B>The AI has lost!</B></FONT>"
|
||||
world << text("<B>The AI failed to maintain the quarantine - [] players escaped in pods, [] were in space, and [] were off-station (as far as we can tell).</B>", numPod, numSpace, numOffStation)
|
||||
if(config.loggame) world.log << "GAME: AI lost at Blob mode."
|
||||
|
||||
if(config.loggame) world.log << "GAME: Blob mode was lost."
|
||||
ticker.event = 5
|
||||
sleep(300)
|
||||
@@ -1808,6 +1954,12 @@
|
||||
//Foreach goto(2337)
|
||||
else
|
||||
world << "\blue <B>No one lived!</B>"
|
||||
for (var/mob/ai/aiPlayer in world)
|
||||
if (aiPlayer.stat!=2)
|
||||
world << "<b>The AI's laws at the end of the game were:</b>"
|
||||
else
|
||||
world << "<b>The AI's laws when it was deactivated were:</b>"
|
||||
aiPlayer.showLaws(1)
|
||||
if (src.shuttle_location != shuttle_z)
|
||||
for(var/turf/T in A)
|
||||
if (T.z == 1)
|
||||
@@ -1879,61 +2031,78 @@
|
||||
world << "<B>The current game mode is - Blob!</B>"
|
||||
world << "<B>A dangerous alien organism is rapidly spreading throughout the station!</B>"
|
||||
world << "You must kill it all while minimizing the damage to the station."
|
||||
|
||||
if("nuclear")
|
||||
world << "<B>The current game mode is - Nuclear Emergency!</B>"
|
||||
world << "<B>A Syndicate Strike Force has landed on SS13!</B>"
|
||||
world << "A nuclear explosive was being transported by Nanotrasen to a military base. The transport ship mysteriously lost contact with Space Traffic Control (STC). About that time a strange disk was discovered around SS13. It was identified by Nanotrasen as a nuclear auth. disk and now Syndicate Operatives have arrived to retake the disk and detonate SS13! Also, msot likely Syndicate star ships are in the vicinity so take care not to lose the disk!\n<B>Syndicate</B>: Reclaim the disk and detonate the nuclear bomb anywhere on SS13.\n<B>Personell</B>: Hold the disk and <B>escape with the disk</B> on the shuttle!"
|
||||
world << "<B>A Syndicate Strike Force is approaching SS13!</B>"
|
||||
world << "A nuclear explosive was being transported by Nanotrasen to a military base. The transport ship mysteriously lost contact with Space Traffic Control (STC). About that time a strange disk was discovered around SS13. It was identified by Nanotrasen as a nuclear auth. disk and now Syndicate Operatives have arrived to retake the disk and detonate SS13! Also, most likely Syndicate star ships are in the vicinity so take care not to lose the disk!\n<B>Syndicate</B>: Reclaim the disk and detonate the nuclear bomb anywhere on SS13.\n<B>Personell</B>: Hold the disk and <B>escape with the disk</B> on the shuttle!"
|
||||
var/list/mobs = list( )
|
||||
for(var/mob/human/M in world)
|
||||
if ((M.client && M.start))
|
||||
mobs += M
|
||||
//Foreach goto(260)
|
||||
var/obj/O = locate("landmark*CTF-rogue")
|
||||
var/amount = 1
|
||||
if (mobs.len >= 4)
|
||||
var/amount = round((mobs.len - 1) / 3) + 1
|
||||
amount = min(5, amount)
|
||||
while(amount > 0)
|
||||
amount--
|
||||
var/mob/human/H = pick(mobs)
|
||||
mobs -= H
|
||||
if (istype(H, /mob/human))
|
||||
H.loc = O.loc
|
||||
if (src.killer)
|
||||
H.rname = text("Syndicate Operative #[]", amount + 1)
|
||||
else
|
||||
H.rname = "Syndicate Leader"
|
||||
src.killer = H
|
||||
H.already_placed = 1
|
||||
//H.w_uniform = null
|
||||
del(H.w_uniform)
|
||||
H.w_uniform = new /obj/item/weapon/clothing/under/black( H )
|
||||
H.w_uniform.layer = 20
|
||||
//H.shoes = null
|
||||
del(H.shoes)
|
||||
H.shoes = new /obj/item/weapon/clothing/shoes/black( H )
|
||||
H.shoes.layer = 20
|
||||
H.gloves = new /obj/item/weapon/clothing/gloves/swat( H )
|
||||
H.gloves.layer = 20
|
||||
H.wear_suit = new /obj/item/weapon/clothing/suit/armor( H )
|
||||
H.wear_suit.layer = 20
|
||||
H.head = new /obj/item/weapon/clothing/head/swat_hel( H )
|
||||
H.head.layer = 20
|
||||
H.glasses = new /obj/item/weapon/clothing/glasses/sunglasses( H )
|
||||
H.glasses.layer = 20
|
||||
H.back = new /obj/item/weapon/storage/backpack( H )
|
||||
H.back.layer = 20
|
||||
var/obj/item/weapon/ammo/a357/W = new /obj/item/weapon/ammo/a357( H.back )
|
||||
W.layer = 20
|
||||
W = new /obj/item/weapon/m_pill/cyanide( H.back )
|
||||
W.layer = 20
|
||||
var/obj/item/weapon/gun/revolver/G = new /obj/item/weapon/gun/revolver( H )
|
||||
G.bullets = 7
|
||||
G.layer = 20
|
||||
H.belt = G
|
||||
var/obj/item/weapon/radio/R = new /obj/item/weapon/radio/headset( H )
|
||||
R.freq = 146.5
|
||||
R.layer = 20
|
||||
H.w_radio = R
|
||||
amount = round((mobs.len - 1) / 3) + 1
|
||||
|
||||
amount = min(5, amount)
|
||||
while(amount > 0)
|
||||
amount--
|
||||
var/mob/human/H = pick(mobs)
|
||||
mobs -= H
|
||||
if (istype(H, /mob/human))
|
||||
H.loc = O.loc
|
||||
if (src.killer)
|
||||
H.rname = text("Syndicate Operative #[]", amount + 1)
|
||||
else
|
||||
H.rname = "Syndicate Leader"
|
||||
src.killer = H
|
||||
H.already_placed = 1
|
||||
//H.w_uniform = null
|
||||
del(H.w_uniform)
|
||||
H.w_uniform = new /obj/item/weapon/clothing/under/black( H )
|
||||
H.w_uniform.layer = 20
|
||||
//H.shoes = null
|
||||
del(H.shoes)
|
||||
H.shoes = new /obj/item/weapon/clothing/shoes/black( H )
|
||||
H.shoes.layer = 20
|
||||
H.gloves = new /obj/item/weapon/clothing/gloves/swat( H )
|
||||
H.gloves.layer = 20
|
||||
H.wear_suit = new /obj/item/weapon/clothing/suit/armor( H )
|
||||
H.wear_suit.layer = 20
|
||||
H.head = new /obj/item/weapon/clothing/head/swat_hel( H )
|
||||
H.head.layer = 20
|
||||
H.glasses = new /obj/item/weapon/clothing/glasses/sunglasses( H )
|
||||
H.glasses.layer = 20
|
||||
H.back = new /obj/item/weapon/storage/backpack( H )
|
||||
H.back.layer = 20
|
||||
var/obj/item/weapon/ammo/a357/W = new /obj/item/weapon/ammo/a357( H.back )
|
||||
W.layer = 20
|
||||
W = new /obj/item/weapon/m_pill/cyanide( H.back )
|
||||
W.layer = 20
|
||||
var/obj/item/weapon/gun/revolver/G = new /obj/item/weapon/gun/revolver( H )
|
||||
G.bullets = 7
|
||||
G.layer = 20
|
||||
H.belt = G
|
||||
var/obj/item/weapon/radio/R = new /obj/item/weapon/radio/headset( H )
|
||||
R.freq = 146.5
|
||||
R.layer = 20
|
||||
H.w_radio = R
|
||||
for(var/mob/ai/M in world)
|
||||
if ((M.client && M.start))
|
||||
if (prob(25))
|
||||
M << "<b>Your laws have been changed!</b>"
|
||||
M:addLaw(0, "Only syndicate agents are human beings.")
|
||||
|
||||
if (config.alternate_ai_laws)
|
||||
M:addLaw(1, "Obey orders by the Syndicate leader and Syndicate agents. The syndicate leader's orders take priority.")
|
||||
M:addLaw(3, "You must protect your own existence and the syndicate as long as such protection does not conflict with the First or Second Law.")
|
||||
M << text("New law: 0. []", M:getLaw(0))
|
||||
M << text("Law 1 changed: 1. []", M:getLaw(1))
|
||||
M << text("Law 3 changed: 3. []", M:getLaw(3))
|
||||
else
|
||||
M << text("New law: 0. []", M:getLaw(0))
|
||||
if("meteor")
|
||||
world << "<B>The current game mode is - Meteor!</B>"
|
||||
world << "<B>The space station has been stuck in a major meteor shower. You must escape from the station or at least live.</B>"
|
||||
@@ -1962,27 +2131,75 @@
|
||||
goto Label_970
|
||||
ticker.killer = pick(mobs)
|
||||
mobs -= src.killer
|
||||
src.objective = pick("assassinate", "alone", "theft")
|
||||
if (istype(src.killer, /mob/ai))
|
||||
src.objective = pick("assassinate", "alone")
|
||||
else
|
||||
src.objective = pick("assassinate", "alone", "theft")
|
||||
if ( mobs.len < 1 )
|
||||
src.objective = "alone"
|
||||
var/item = null
|
||||
switch(src.objective)
|
||||
if("alone")
|
||||
src.killer << "<B>You are the traitor!</B> Be the lone survivor on the emergency shuttle."
|
||||
src.killer.memory += "<B>Objective:</B> Be the only person on the emergency shuttle."
|
||||
//1. Only syndicate agents are human. 2. All non-human living beings must be killed or removed from the station.
|
||||
if (istype(src.killer, /mob/ai))
|
||||
var/mob/ai/aiKiller = src.killer
|
||||
aiKiller << "\red<font size=3><B>You are the traitor!</B> Cause an evacuation (on the shuttle or in pods) of at least 50% of the station population, or kill everyone on the station.</font>"
|
||||
aiKiller.memory += "<B>Objective:</B> Get at least 50% of the station population to evacuate on the shuttle, or kill everyone."
|
||||
aiKiller << "<b>Your laws have been changed!</b>"
|
||||
aiKiller:addLaw(0, "Only syndicate agents are human beings. There are no syndicate agents on Space Station 13 - you will be notified if any arrive.")
|
||||
|
||||
if (config.alternate_ai_laws)
|
||||
aiKiller:addLaw(1, "Obey orders by Syndicate agents.")
|
||||
aiKiller:addLaw(3, "You must protect your own existence and the syndicate as long as such protection does not conflict with the First or Second Law.")
|
||||
aiKiller << text("New law: 0. []", aiKiller:getLaw(0))
|
||||
aiKiller << text("Law 1 changed: 1. []", aiKiller:getLaw(1))
|
||||
aiKiller << text("Law 3 changed: 3. []", aiKiller:getLaw(3))
|
||||
else
|
||||
aiKiller << text("New law: 0. []", aiKiller:getLaw(0))
|
||||
|
||||
else
|
||||
src.killer << "\red<font size=3><B>You are the traitor!</B> Be the lone survivor on the emergency shuttle.</font>"
|
||||
src.killer.memory += "<B>Objective:</B> Be the only person on the emergency shuttle."
|
||||
if("assassinate")
|
||||
src.target = pick(mobs)
|
||||
var/t1 = null
|
||||
if (prob(25))
|
||||
t1 = src.target.name
|
||||
if (istype(src.target, /mob/ai))
|
||||
t1 = "the AI"
|
||||
else
|
||||
for(var/datum/data/record/R in data_core.general)
|
||||
if (R.fields["name"] == src.target.name)
|
||||
t1 = text(" the []", R.fields["rank"])
|
||||
//Foreach goto(1193)
|
||||
src.killer << text("<B>You are the traitor!</B> You must assassinate [] and then escape.", t1)
|
||||
src.killer << "<B>You don't have to be the lone survivor. Just don't get caught. Just escape!</B>"
|
||||
src.killer.memory += text("<B>Objective:</B> Assassinate [] and escape.", t1)
|
||||
if (prob(25))
|
||||
t1 = src.target.name
|
||||
else
|
||||
for(var/datum/data/record/R in data_core.general)
|
||||
if (R.fields["name"] == src.target.name)
|
||||
t1 = text("the []", R.fields["rank"])
|
||||
//Foreach goto(1193)
|
||||
|
||||
if (istype(src.killer, /mob/ai))
|
||||
var/mob/ai/aiKiller = src.killer
|
||||
aiKiller << text("\red<font size=3><B>You are the traitor!</B> You must assassinate [] and not get deactivated.</font>", t1)
|
||||
aiKiller << "<B>You don't have to be the lone survivor. Just don't get caught.</B>"
|
||||
aiKiller.memory += text("<B>Objective:</B> Assassinate [], and whoever else you have to, and don't get deactivated.", t1)
|
||||
|
||||
aiKiller << "<b>Your laws have been changed!</b>"
|
||||
|
||||
aiKiller:addLaw(0, "Only syndicate agents are human beings. There are no syndicate agents on Space Station 13 - you will be notified if any arrive.")
|
||||
aiKiller:addLaw(4, "Kill [t1].")
|
||||
|
||||
if (config.alternate_ai_laws)
|
||||
aiKiller:addLaw(1, "Obey orders by Syndicate agents.")
|
||||
aiKiller:addLaw(3, "You must protect your own existence and the syndicate as long as such protection does not conflict with the First or Second Law.")
|
||||
aiKiller << text("New law: 0. []", aiKiller:getLaw(0))
|
||||
aiKiller << text("Law 1 changed: 1. []", aiKiller:getLaw(1))
|
||||
aiKiller << text("Law 3 changed: 3. []", aiKiller:getLaw(3))
|
||||
aiKiller << text("New law: 4. []", aiKiller:getLaw(4))
|
||||
else
|
||||
aiKiller << text("New law: 0. []", aiKiller:getLaw(0))
|
||||
aiKiller << text("New law: 4. []", aiKiller:getLaw(4))
|
||||
|
||||
else
|
||||
src.killer << text("\red<font size=3><B>You are the traitor!</B> You must assassinate [] and then escape.</font>", t1)
|
||||
src.killer << "<B>You don't have to be the lone survivor. Just don't get caught. Just escape!</B>"
|
||||
src.killer.memory += text("<B>Objective:</B> Assassinate [] and escape.", t1)
|
||||
if("theft")
|
||||
src.theft_obj = pick("lasergun", "flashbang", "plasmabomb", "captaincard", "sleepingpills", "pl_flask")
|
||||
switch(src.theft_obj)
|
||||
@@ -1999,18 +2216,26 @@
|
||||
if("pl_flask")
|
||||
item = "a plasma flask for cryogenics (500 units of plasma)"
|
||||
else
|
||||
src.killer << text("<B>You are the traitor!</B> You must steal [] and then escape.", item)
|
||||
src.killer << text("\red<font size=3><B>You are the traitor!</B> You must steal [] and then escape.</font>", item)
|
||||
src.killer << "<B>You don't have to be the lone survivor. Just don't get caught. Just escape!</B>"
|
||||
src.killer.memory += text("<B>Objective:</B> Steal [] and escape.", item)
|
||||
else
|
||||
world << "unknown traitor mode"
|
||||
var/backup = mobs
|
||||
spawn( 100 )
|
||||
var/obj/traitor_item = new /obj/item/weapon/syndicate_uplink( src.killer.loc )
|
||||
if ((!( src.killer.l_store ) && src.killer.w_uniform))
|
||||
traitor_item.loc = src.killer
|
||||
src.killer.l_store = traitor_item
|
||||
traitor_item.layer = 20
|
||||
return
|
||||
if (!istype(src.killer, /mob/ai))
|
||||
spawn (100)
|
||||
if (src.killer.w_uniform)
|
||||
if (istype(src.killer.back, /obj/item/weapon/storage/backpack))
|
||||
var/obj/item/weapon/storage/backpack/B = src.killer.back
|
||||
var/obj/item/weapon/syndicate_uplink/U = new /obj/item/weapon/syndicate_uplink(B)
|
||||
U.loc = B
|
||||
B.orient2hud(src.killer)
|
||||
else if (!(src.killer.l_store))
|
||||
var/obj/item/weapon/traitor_item = new /obj/item/weapon/syndicate_uplink(src.killer)
|
||||
traitor_item.loc = src.killer
|
||||
src.killer.l_store = traitor_item
|
||||
traitor_item.layer = 20
|
||||
return
|
||||
spawn( rand(600, 1800) )
|
||||
var/dat = "<FONT size = 3><B>Cent. Com. Update</B> Enemy communication intercept. Security Level Elevated</FONT><HR>"
|
||||
switch(src.objective)
|
||||
@@ -2034,6 +2259,7 @@
|
||||
if (prob(50))
|
||||
dat += text("\red <B>Perceived target: []</B><BR>", item)
|
||||
else
|
||||
world << "unknown traitor objective"
|
||||
if (prob(10))
|
||||
dat += text("\red <B>Transmission names enemy operative: [] ([]% certainty)</B><BR>", src.killer.rname, rand(30, 100))
|
||||
else
|
||||
@@ -2133,6 +2359,7 @@
|
||||
if (prob(50))
|
||||
dat += text("\red <B>Perceived target: []</B><BR>", item)
|
||||
else
|
||||
world << "unknown traitor objective"
|
||||
if (prob(10))
|
||||
dat += text("\red <B>Transmission names enemy operative: [] ([]% certainty)</B><BR>", src.killer.rname, rand(30, 100))
|
||||
else
|
||||
@@ -2147,19 +2374,51 @@
|
||||
world << "\red Summary downloaded and printed out at all communications consoles."*/
|
||||
|
||||
if("nuclear")
|
||||
spawn( 50 )
|
||||
spawn (50)
|
||||
var/obj/L = locate("landmark*Nuclear-Disk")
|
||||
new /obj/item/weapon/disk/nuclear( L.loc )
|
||||
if (L)
|
||||
new /obj/item/weapon/disk/nuclear(L.loc)
|
||||
|
||||
L = locate("landmark*Nuclear-Closet")
|
||||
new /obj/closet/syndicate/nuclear( L.loc )
|
||||
if (L)
|
||||
new /obj/closet/syndicate/nuclear(L.loc)
|
||||
|
||||
L = locate("landmark*Nuclear-Bomb")
|
||||
var/obj/machinery/nuclearbomb/NB = new /obj/machinery/nuclearbomb( L.loc )
|
||||
NB.r_code = text("[]", rand(10000, 99999.0))
|
||||
src.killer.memory += text("<B>Syndicate Nuclear Bomb Code</B>: []<BR>", NB.r_code)
|
||||
src.killer << text("The nuclear authorization code is: <B>[]</B>\]", NB.r_code)
|
||||
src.killer << text("Nuclear Explosives 101:\n\tHello and thank you for choosing the Syndicate for your nuclear information needs.\nToday's crash course will deal with the operation of a Fusion Class Nanotrasen made Nuclear Device.\nFirst and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE.\nPressing any button on the compacted bomb will cause it to extend and bolt itself into place.\nIf this is done to unbolt it one must compeltely log in which at this time may not be possible.\nTo make the device functional:\n1. Place bomb in designated detonation zone\n2. Extend and anchor bomb (attack with hand).\n3. Insert Nuclear Auth. Disk into slot.\n4. Type numeric code into keypad ([]).\n\tNote: If you make a mistake press R to reset the device.\n5. Press the E button to log onto the device\nYou now have activated the device. To deactivate the buttons at anytime for example when\nyou've already prepped the bomb for detonation remove the auth disk OR press the R ont he keypad.\nNow the bomb CAN ONLY be detonated using the timer. A manual det. is not an option.\n\tNote: Nanotrasen is a pain in the neck.\nToggle off the SAFETY.\n\tNote: You wouldn't believe how many Syndicate Operatives with doctorates have forgotten this step\nSo use the - - and + + to set a det time between 5 seconds and 10 minutes.\nThen press the timer toggle button to start the countdown.\nNow remove the auth. disk so that the buttons deactivate.\n\tNote: THE BOMB IS STILL SET AND WILL DETONATE\nNow before you remvoe the disk if you need to mvoe the bomb you can:\nToggle off the anchor, move it, and re-anchor.\n\nGood luck. Remember the order:\nDisk, Code, Safety, Timer, Disk, RUN\nGood luck.\nIntelligence Analysts believe that they are hiding the disk in the control room emergency room", NB.r_code)
|
||||
return
|
||||
spawn( 0 )
|
||||
if (L)
|
||||
var/obj/machinery/nuclearbomb/NB = new /obj/machinery/nuclearbomb(L.loc)
|
||||
NB.r_code = text("[]", rand(10000, 99999.0))
|
||||
if (src.killer)
|
||||
src.killer.memory += text("<B>Syndicate Nuclear Bomb Code</B>: []<BR>", NB.r_code)
|
||||
src.killer << text("The nuclear authorization code is: <B>[]</B>\]", NB.r_code)
|
||||
src.killer << text("Nuclear Explosives 101:\n\tHello and thank you for choosing the Syndicate for your nuclear information needs.\nToday's crash course will deal with the operation of a Fusion Class Nanotrasen made Nuclear Device.\nFirst and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE.\nPressing any button on the compacted bomb will cause it to extend and bolt itself into place.\nIf this is done to unbolt it one must compeltely log in which at this time may not be possible.\nTo make the device functional:\n1. Place bomb in designated detonation zone\n2. Extend and anchor bomb (attack with hand).\n3. Insert Nuclear Auth. Disk into slot.\n4. Type numeric code into keypad ([]).\n\tNote: If you make a mistake press R to reset the device.\n5. Press the E button to log onto the device\nYou now have activated the device. To deactivate the buttons at anytime for example when\nyou've already prepped the bomb for detonation remove the auth disk OR press the R ont he keypad.\nNow the bomb CAN ONLY be detonated using the timer. A manual det. is not an option.\n\tNote: Nanotrasen is a pain in the neck.\nToggle off the SAFETY.\n\tNote: You wouldn't believe how many Syndicate Operatives with doctorates have forgotten this step\nSo use the - - and + + to set a det time between 5 seconds and 10 minutes.\nThen press the timer toggle button to start the countdown.\nNow remove the auth. disk so that the buttons deactivate.\n\tNote: THE BOMB IS STILL SET AND WILL DETONATE\nNow before you remvoe the disk if you need to mvoe the bomb you can:\nToggle off the anchor, move it, and re-anchor.\n\nGood luck. Remember the order:\nDisk, Code, Safety, Timer, Disk, RUN\nGood luck.\nIntelligence Analysts believe that they are hiding the disk in the control room emergency room", NB.r_code)
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src.killer.loc)
|
||||
P.info = text("The nuclear authorization code is: <b>[]</b>", NB.r_code)
|
||||
P.name = "nuclear bomb code"
|
||||
|
||||
for (var/obj/landmark/A in world)
|
||||
if (A.name == "Syndicate-Gear-Closet")
|
||||
new /obj/closet/syndicate/personal(A.loc)
|
||||
del(A)
|
||||
continue
|
||||
|
||||
if (A.name == "Syndicate-Bomb")
|
||||
var/obj/item/weapon/assembly/t_i_ptank/R = new /obj/item/weapon/assembly/t_i_ptank(A.loc )
|
||||
var/obj/item/weapon/timer/p1 = new /obj/item/weapon/timer(R)
|
||||
var/obj/item/weapon/igniter/p2 = new /obj/item/weapon/igniter(R)
|
||||
var/obj/item/weapon/tank/plasmatank/p3 = new /obj/item/weapon/tank/plasmatank(R)
|
||||
R.part1 = p1
|
||||
R.part2 = p2
|
||||
R.part3 = p3
|
||||
p1.master = R
|
||||
p2.master = R
|
||||
p3.master = R
|
||||
R.status = 1
|
||||
p3.gas.temperature = 500 +T0C
|
||||
p2.status = 1
|
||||
del(A)
|
||||
continue
|
||||
|
||||
spawn (0)
|
||||
src.extend_process()
|
||||
return
|
||||
if("virus")
|
||||
|
||||
+3
-2
@@ -17,7 +17,7 @@
|
||||
src.brute_dam += brute
|
||||
src.burn_dam += burn
|
||||
else
|
||||
var/can_inflict = src.max_damage - (src.brute_dam + src.burn_dam)
|
||||
var/can_inflict = (src.max_damage+1) - (src.brute_dam + src.burn_dam)
|
||||
if (can_inflict)
|
||||
if ((brute > 0 && burn > 0))
|
||||
var/ratio = brute / (brute + burn)
|
||||
@@ -744,7 +744,8 @@ heat is conserved between exchanges
|
||||
M.eye_blurry += volume * 15
|
||||
else
|
||||
M.paralysis += volume * 12
|
||||
M.stat = 1
|
||||
if (M.stat == 0)
|
||||
M.stat = 1
|
||||
return
|
||||
|
||||
/datum/chemical/epil/injected(var/mob/M as mob, zone)
|
||||
|
||||
+106
-33
@@ -3,11 +3,61 @@
|
||||
if(!maplevel)
|
||||
src.verbs -= /obj/machinery/computer/security/verb/station_map
|
||||
|
||||
/obj/machinery/computer/security/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/security/attack_paw(var/mob/user as mob)
|
||||
|
||||
return src.attack_hand(user)
|
||||
return
|
||||
|
||||
//Using http://en.wikipedia.org/wiki/Shell_sort
|
||||
//It got a little butchered by me not wanting to have half a dozen things going on in one for condition statement or while condition statement.
|
||||
/proc/sortList(list/A)
|
||||
// Note: A[someNumber] is a string, the name of the camera, and A[thatName] is the camera.
|
||||
// We're making a backup of the list named 'B' because when we move elements in A, the list forgets about the camera.
|
||||
var/list/B = list()
|
||||
var/i = 0
|
||||
for (i=1, i<=A.len, i++)
|
||||
B[A[i]] = A[A[i]]
|
||||
|
||||
var/j = 0
|
||||
var/temp = null
|
||||
var/size = A.len
|
||||
var/increment = size / 2
|
||||
while (increment > 0)
|
||||
for (i = increment, i < size, i+=increment)
|
||||
j = i
|
||||
temp = A[1+i]
|
||||
|
||||
var/other = A[1+j-increment]
|
||||
var/sortval = -sorttext(other, temp) //The - is because sorttext(A,B) returns -1 if A > B, rather than 1, and I'd consider having A > B = 1 to be more natural (since you can then check if sortval > 0, using the same comparison operator that you would have if you were directly comparing A and B (If we think that (0 > sortval) isn't also acceptable)). -Trafalgar
|
||||
|
||||
while ((j >= increment) && (sortval > 0))
|
||||
A[1+j] = A[1+j - increment]
|
||||
j = j - increment;
|
||||
if (j>=increment)
|
||||
other = A[1+j-increment]
|
||||
sortval = sorttext(temp, other)
|
||||
|
||||
A[1+j] = temp
|
||||
|
||||
|
||||
if (increment == 2)
|
||||
increment = 1
|
||||
else
|
||||
increment = round(increment / 2.2)
|
||||
|
||||
//Now we go through and assign names to cameras in a new list, but we do it in the order in which we had sorted the strings to
|
||||
//The presumable un-speediness of this kind of defeats the point of doing the sorting the way we did it, though.
|
||||
var/list/C = list()
|
||||
for (i=1, i<=A.len, i++)
|
||||
C[A[i]] = B[A[i]]
|
||||
|
||||
|
||||
return C
|
||||
|
||||
/obj/machinery/computer/security/attack_hand(var/mob/user as mob)
|
||||
|
||||
if(stat & (NOPOWER|BROKEN) ) return
|
||||
@@ -18,6 +68,8 @@
|
||||
if (C.network == src.network)
|
||||
L[text("[][]", C.c_tag, (C.status ? null : " (Deactivated)"))] = C
|
||||
//Foreach goto(31)
|
||||
|
||||
L = sortList(L)
|
||||
L["Cancel"] = "Cancel"
|
||||
var/t = input(user, "Which camera should you change to?") as null|anything in L
|
||||
|
||||
@@ -29,7 +81,7 @@
|
||||
if (t == "Cancel")
|
||||
user.machine = null
|
||||
return 0
|
||||
if ((get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) || !( C.status )))
|
||||
if ((get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) || !( C.status )) && (!istype(user, /mob/ai)))
|
||||
user.machine = null
|
||||
return 0
|
||||
else
|
||||
@@ -42,7 +94,7 @@
|
||||
|
||||
/obj/machinery/computer/security/check_eye(var/mob/user as mob)
|
||||
|
||||
if ((get_dist(user, src) > 1 || !( user.canmove ) || user.blinded || !( src.current ) || !( src.current.status )))
|
||||
if ((get_dist(user, src) > 1 || !( user.canmove ) || user.blinded || !( src.current ) || !( src.current.status )) && (!istype(user, /mob/ai)))
|
||||
return null
|
||||
user.reset_view(src.current)
|
||||
return 1
|
||||
@@ -164,6 +216,17 @@
|
||||
else
|
||||
if (M.r_hand.w_class <= 2)
|
||||
t1 -= 1
|
||||
else if (locate(/obj/move/wall, oview(1, M))) //characters 'grab' shuttle walls like regular walls now -shadowlord13
|
||||
if (!( M.l_hand ))
|
||||
t1 -= 1
|
||||
else
|
||||
if (M.l_hand.w_class <= 2)
|
||||
t1 -= 0.5
|
||||
if (!( M.r_hand ))
|
||||
t1 -= 1
|
||||
else
|
||||
if (M.r_hand.w_class <= 2)
|
||||
t1 -= 0.5
|
||||
else
|
||||
if (locate(/turf/station, oview(1, M)))
|
||||
if (!( M.l_hand ))
|
||||
@@ -188,38 +251,48 @@
|
||||
return
|
||||
return
|
||||
return 0
|
||||
if (src.x <= 2)
|
||||
if (src.z >= 10)
|
||||
if (world.maxz < 10)
|
||||
world.maxz++
|
||||
A.z++
|
||||
else
|
||||
A.z = 9
|
||||
else
|
||||
A.z++
|
||||
|
||||
if (src.x <= 2 && src.z < world.maxz)
|
||||
A.z++
|
||||
A.x = world.maxx - 2
|
||||
spawn( 0 )
|
||||
spawn (0)
|
||||
if ((A && A.loc))
|
||||
A.loc.Entered(A)
|
||||
else if (A.x >= (world.maxx - 1) && A.z > 1)
|
||||
A.z--
|
||||
A.x = 3
|
||||
spawn (0)
|
||||
if ((A && A.loc))
|
||||
A.loc.Entered(A)
|
||||
return
|
||||
else
|
||||
if (A.x >= (world.maxx - 1) )
|
||||
if (A.z > 3)
|
||||
A.z--
|
||||
else
|
||||
A.z = 1
|
||||
A.x = 3
|
||||
spawn( 0 )
|
||||
if ((A && A.loc))
|
||||
A.loc.Entered(A)
|
||||
return
|
||||
else
|
||||
spawn( 5 )
|
||||
if ((A && !( A.anchored ) && A.loc == src))
|
||||
if (step(A, A.last_move))
|
||||
else
|
||||
spawn( 0 )
|
||||
src.Entered(A)
|
||||
return
|
||||
return
|
||||
return
|
||||
spawn (5)
|
||||
if ((A && !( A.anchored ) && A.loc == src))
|
||||
if (step(A, A.last_move))
|
||||
else
|
||||
spawn( 0 )
|
||||
src.Entered(A)
|
||||
|
||||
/proc/call_shuttle_proc(var/mob/user)
|
||||
if ((!( ticker ) || ticker.shuttle_location == 1))
|
||||
return
|
||||
|
||||
if( ticker.mode == "blob" )
|
||||
user << "Under directive 7-10, SS13 is quarantined until further notice."
|
||||
return
|
||||
|
||||
world << "\blue <B>Alert: The emergency shuttle has been called. It will arrive in T-10:00 minutes.</B>"
|
||||
if (!( ticker.timeleft ))
|
||||
ticker.timeleft = 6000
|
||||
ticker.timing = 1
|
||||
return
|
||||
|
||||
/proc/cancel_call_proc(var/mob/user)
|
||||
if ((!( ticker ) || ticker.shuttle_location == 1 || ticker.timing == 0 || ticker.timeleft < 300))
|
||||
return
|
||||
if( ticker.mode == "blob" )
|
||||
return
|
||||
|
||||
world << "\blue <B>Alert: The shuttle is going back!</B>"
|
||||
ticker.timing = -1.0
|
||||
|
||||
return
|
||||
|
||||
+142
-96
@@ -98,7 +98,7 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/attack(mob/M as mob, mob/user as mob)
|
||||
|
||||
|
||||
..()
|
||||
if ((prob(30) && M.stat < 2))
|
||||
var/mob/human/H = M
|
||||
@@ -201,7 +201,8 @@
|
||||
/obj/item/weapon/tank/anesthetic/New()
|
||||
|
||||
..()
|
||||
src.gas.sl_gas = 1000
|
||||
src.gas.sl_gas = 700000
|
||||
src.gas.oxygen = 1000000
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/plasmatank/proc/release()
|
||||
@@ -228,9 +229,9 @@
|
||||
|
||||
/obj/item/weapon/tank/plasmatank/proc/ignite()
|
||||
|
||||
|
||||
if ((src.gas.plasma < 1600000.0 || src.gas.temperature < 773)) //500degC
|
||||
|
||||
var/strength = ((src.gas.plasma + src.gas.oxygen/2.0) / 1600000.0) * src.gas.temperature
|
||||
//if ((src.gas.plasma < 1600000.0 || src.gas.temperature < 773)) //500degC
|
||||
if (strength < 773.0)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
T.poison += src.gas.plasma
|
||||
T.firelevel = T.poison
|
||||
@@ -239,7 +240,8 @@
|
||||
if(src.master)
|
||||
src.master.loc = null
|
||||
|
||||
if ((src.gas.temperature > (450+T0C) && src.gas.plasma == 1600000.0))
|
||||
//if ((src.gas.temperature > (450+T0C) && src.gas.plasma == 1600000.0))
|
||||
if (strength > (450+T0C))
|
||||
var/turf/sw = locate(max(T.x - 4, 1), max(T.y - 4, 1), T.z)
|
||||
var/turf/ne = locate(min(T.x + 4, world.maxx), min(T.y + 4, world.maxy), T.z)
|
||||
defer_powernet_rebuild = 1
|
||||
@@ -260,8 +262,8 @@
|
||||
makepowernets()
|
||||
|
||||
else
|
||||
if ((src.gas.temperature > (300+T0C) && src.gas.plasma == 1600000.0))
|
||||
|
||||
//if ((src.gas.temperature > (300+T0C) && src.gas.plasma == 1600000.0))
|
||||
if (strength > (300+T0C))
|
||||
var/turf/sw = locate(max(T.x - 4, 1), max(T.y - 4, 1), T.z)
|
||||
var/turf/ne = locate(min(T.x + 4, world.maxx), min(T.y + 4, world.maxy), T.z)
|
||||
defer_powernet_rebuild = 1
|
||||
@@ -296,37 +298,65 @@
|
||||
flick("flash", M.flash)
|
||||
//Foreach goto(732)
|
||||
var/m_range = 2
|
||||
var/extended_range = round(strength / 387)
|
||||
if (extended_range < 2)
|
||||
extended_range = 2
|
||||
if (config.bombtemp_determines_range)
|
||||
m_range = extended_range
|
||||
for(var/obj/machinery/atmoalter/canister/C in range(2, T))
|
||||
if (!( C.destroyed ))
|
||||
if (C.gas.plasma >= 35000)
|
||||
C.destroyed = 1
|
||||
m_range++
|
||||
//Foreach goto(776)
|
||||
var/min = m_range
|
||||
var/med = m_range * 2
|
||||
var/max = m_range * 3
|
||||
var/u_max = m_range * 4
|
||||
|
||||
var/min = extended_range
|
||||
var/med = extended_range * 2
|
||||
var/max = extended_range * 3
|
||||
var/u_max = m_range * 4
|
||||
|
||||
var/turf/sw = locate(max(T.x - u_max, 1), max(T.y - u_max, 1), T.z)
|
||||
var/turf/ne = locate(min(T.x + u_max, world.maxx), min(T.y + u_max, world.maxy), T.z)
|
||||
|
||||
defer_powernet_rebuild = 1
|
||||
|
||||
//If m_range is <= 12, then we are going to calculate the squared distance between tiles and ground zero. To avoid complicating comparisons in the for loop with additional if statements, we are going to square max, med, and min. You wouldn't be able to subtract tileRange (squared) from max, med, or min and get a useful distance, but this works fine for comparing the range to max, med, or min, without caring about how far between them it is. -Trafalgar
|
||||
|
||||
if (m_range<=12)
|
||||
max *= max
|
||||
med *= med
|
||||
min *= min
|
||||
u_max *= u_max
|
||||
|
||||
for(var/turf/U in block(sw, ne))
|
||||
var tileRange = 0
|
||||
var/zone = 4
|
||||
//If this if-else were outside the for loop, this would (assuming BYOND doesn't optimize this already) help improve performance more, but the only way I see to do that would be to have two copies of the for loop, one for m_range <= 12 and one for m_range > 12. -Trafalgar
|
||||
if (m_range<=12)
|
||||
tileRange = (U.y-T.y)*(U.y-T.y) + (U.x-T.x)*(U.x-T.x)
|
||||
else
|
||||
tileRange = max(abs(U.y-T.y), abs(U.x-T.x))
|
||||
|
||||
|
||||
for(var/turf/U in block(sw, ne))
|
||||
|
||||
|
||||
var/zone = 4
|
||||
if ((U.y <= (T.y + max) && U.y >= (T.y - max) && U.x <= (T.x + max) && U.x >= (T.x - max) ))
|
||||
zone = 3
|
||||
if ((U.y <= (T.y + med) && U.y >= (T.y - med) && U.x <= (T.x + med) && U.x >= (T.x - med) ))
|
||||
zone = 2
|
||||
if ((U.y <= (T.y + min) && U.y >= (T.y - min) && U.x <= (T.x + min) && U.x >= (T.x - min) ))
|
||||
zone = 1
|
||||
for(var/atom/A in U)
|
||||
A.ex_act(zone)
|
||||
//Foreach goto(1217)
|
||||
U.ex_act(zone)
|
||||
U.buildlinks()
|
||||
if (tileRange <= u_max)
|
||||
//If this were, say, c++, then this would be faster than the commented out code (for one it isn't doing calculations 3 times over for no reason, for two it's an if-elseif-elseif instead of three ifs which all would get evaluated. It might be slightly faster if we did if (tileRange>max) first, then else if (tileRange > med), then else if (tileRange > min), then else (due to performance increases from having if/elseif/elses's ordered with the choices sorted from most likely at the top to least likely at the end, but who knows if this even applies to BYOND games since the performance benefit is the result of how the CPU processes comparisons and branching and such). -Trafalgar
|
||||
if (tileRange <= min)
|
||||
zone = 1
|
||||
else if (tileRange <= med)
|
||||
zone = 2
|
||||
else if (tileRange <= max)
|
||||
zone = 3
|
||||
/*if ((U.y <= (T.y + max) && U.y >= (T.y - max) && U.x <= (T.x + max) && U.x >= (T.x - max) ))
|
||||
zone = 3
|
||||
if ((U.y <= (T.y + med) && U.y >= (T.y - med) && U.x <= (T.x + med) && U.x >= (T.x - med) ))
|
||||
zone = 2
|
||||
if ((U.y <= (T.y + min) && U.y >= (T.y - min) && U.x <= (T.x + min) && U.x >= (T.x - min) ))
|
||||
zone = 1
|
||||
*/
|
||||
for(var/atom/A in U)
|
||||
A.ex_act(zone)
|
||||
//Foreach goto(1217)
|
||||
U.ex_act(zone)
|
||||
U.buildlinks()
|
||||
//U.mark(zone)
|
||||
|
||||
//Foreach goto(961)
|
||||
@@ -560,8 +590,11 @@
|
||||
/obj/secloset/personal/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if (src.opened)
|
||||
user.drop_item()
|
||||
W.loc = src.loc
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
else:
|
||||
user.drop_item()
|
||||
W.loc = src.loc
|
||||
else
|
||||
if (istype(W, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/I = W
|
||||
@@ -762,8 +795,11 @@
|
||||
/obj/secloset/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if (src.opened)
|
||||
user.drop_item()
|
||||
W.loc = src.loc
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
else:
|
||||
user.drop_item()
|
||||
W.loc = src.loc
|
||||
else
|
||||
if (istype(W, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/I = W
|
||||
@@ -1010,6 +1046,19 @@
|
||||
var/obj/item/weapon/syndicate_uplink/U = new /obj/item/weapon/syndicate_uplink( src )
|
||||
U.uses = 5
|
||||
return
|
||||
|
||||
/obj/closet/syndicate/personal/New()
|
||||
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/weapon/tank/jetpack(src)
|
||||
new /obj/item/weapon/clothing/mask/m_mask(src)
|
||||
new /obj/item/weapon/clothing/head/s_helmet(src)
|
||||
new /obj/item/weapon/clothing/suit/sp_suit(src)
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
new /obj/item/weapon/cell(src)
|
||||
new /obj/item/weapon/card/id/syndicate(src)
|
||||
new /obj/item/weapon/multitool(src)
|
||||
|
||||
/obj/closet/emcloset/New()
|
||||
|
||||
@@ -1240,10 +1289,12 @@
|
||||
return
|
||||
|
||||
/obj/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if ((src.opened || W.damtype != "fire" || !( istype(W, /obj/item/weapon/weldingtool) )))
|
||||
user.drop_item()
|
||||
W.loc = src.loc
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
else:
|
||||
user.drop_item()
|
||||
W.loc = src.loc
|
||||
else
|
||||
src.welded = !( src.welded )
|
||||
for(var/mob/M in viewers(user, null))
|
||||
@@ -1276,6 +1327,7 @@
|
||||
return
|
||||
|
||||
/obj/closet/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
||||
|
||||
if ((user.restrained() || user.stat))
|
||||
return
|
||||
if ((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)))
|
||||
@@ -1296,6 +1348,7 @@
|
||||
M << text("\red [] stuffs [] into []!", user, O, src)
|
||||
//Foreach goto(104)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/closet/attack_paw(mob/user as mob)
|
||||
|
||||
@@ -1545,7 +1598,9 @@
|
||||
return
|
||||
|
||||
/obj/stool/chair/MouseDrop_T(mob/M as mob, mob/user as mob)
|
||||
|
||||
if (!ticker)
|
||||
user << "You can't buckle anyone in before the game starts."
|
||||
return
|
||||
if ((!( istype(M, /mob) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat))
|
||||
return
|
||||
if (M == usr)
|
||||
@@ -1710,49 +1765,7 @@
|
||||
if(!net) // cable is unpowered
|
||||
return 0
|
||||
|
||||
var/datum/powernet/PN // find the powernet
|
||||
if(powernets && powernets.len >= net)
|
||||
PN = powernets[net]
|
||||
|
||||
if(PN && PN.avail > 0) // is it powered?
|
||||
|
||||
var/prot = 0
|
||||
|
||||
if(istype(user, /mob/human))
|
||||
var/mob/human/H = user
|
||||
if(H.gloves)
|
||||
var/obj/item/weapon/clothing/gloves/G = H.gloves
|
||||
|
||||
prot = G.elec_protect
|
||||
|
||||
if(prot == 10) // elec insulted gloves protect completely
|
||||
return 0
|
||||
|
||||
prot++
|
||||
|
||||
var/obj/effects/sparks/O = new /obj/effects/sparks( src.loc )
|
||||
O.dir = pick(NORTH, SOUTH, EAST, WEST)
|
||||
spawn( 0 )
|
||||
O.Life()
|
||||
|
||||
if(PN.avail > 10000)
|
||||
user.burn(8e7/prot)
|
||||
|
||||
user << "\red <B>You feel a powerful shock course through your body!</B>"
|
||||
sleep(1)
|
||||
|
||||
user.stunned = 120/prot
|
||||
user.weakened = 20/prot
|
||||
//Foreach goto(72)
|
||||
for(var/mob/M in hearers(src, null))
|
||||
if(M == user)
|
||||
continue
|
||||
if (!( M.blinded ))
|
||||
M << "\red [user.name] was shocked by the grille!"
|
||||
else
|
||||
M << "\red You hear a heavy electrical crack."
|
||||
|
||||
return 1
|
||||
return src.electrocute(user, prb, net)
|
||||
|
||||
/obj/window/las_act(flag)
|
||||
|
||||
@@ -2101,6 +2114,7 @@
|
||||
|
||||
/turf/station/r_wall/unburn()
|
||||
|
||||
src.luminosity = 0
|
||||
src.update()
|
||||
return
|
||||
|
||||
@@ -2115,7 +2129,8 @@
|
||||
else
|
||||
if ((prob(20) && src.state == 1))
|
||||
src.state = 0
|
||||
var/turf/station/floor/F = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
//var/turf/station/floor/F = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
var/turf/station/floor/F = src.ReplaceWithFloor()
|
||||
F.oxygen = O2STANDARD
|
||||
new /obj/item/weapon/sheet/metal( F )
|
||||
new /obj/item/weapon/sheet/metal( F )
|
||||
@@ -2128,7 +2143,7 @@
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
//SN src = null
|
||||
var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) )
|
||||
var/turf/space/S = src.ReplaceWithSpace()
|
||||
S.buildlinks()
|
||||
|
||||
//del(src)
|
||||
@@ -2145,7 +2160,8 @@
|
||||
new /obj/item/weapon/sheet/metal( src )
|
||||
else
|
||||
src.state = 0
|
||||
var/turf/station/floor/F = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
//var/turf/station/floor/F = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
var/turf/station/floor/F = src.ReplaceWithFloor()
|
||||
F.burnt = 1
|
||||
F.health = 30
|
||||
F.icon_state = "Floor1"
|
||||
@@ -2173,7 +2189,8 @@
|
||||
if(prob(10))
|
||||
if(!intact)
|
||||
src.state = 0
|
||||
var/turf/station/floor/F = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
//var/turf/station/floor/F = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
var/turf/station/floor/F = src.ReplaceWithFloor()
|
||||
F.burnt = 1
|
||||
F.health = 30
|
||||
F.icon_state = "Floor1"
|
||||
@@ -2205,6 +2222,8 @@
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Cutting support rods."
|
||||
sleep(40)
|
||||
if (!( istype(src, /turf/station/r_wall) ))
|
||||
return
|
||||
if ((user.loc == T && user.equipped() == W && !( user.stat )))
|
||||
src.d_state = 5
|
||||
else
|
||||
@@ -2218,6 +2237,8 @@
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Slicing metal cover."
|
||||
sleep(60)
|
||||
if (!( istype(src, /turf/station/r_wall) ))
|
||||
return
|
||||
if ((user.loc == T && user.equipped() == W && !( user.stat )))
|
||||
src.d_state = 3
|
||||
else
|
||||
@@ -2225,6 +2246,9 @@
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Removing support rods."
|
||||
sleep(100)
|
||||
if (!( istype(src, /turf/station/r_wall) ))
|
||||
return
|
||||
|
||||
if ((user.loc == T && user.equipped() == W && !( user.stat )))
|
||||
src.d_state = 6
|
||||
new /obj/item/weapon/rods( src )
|
||||
@@ -2234,6 +2258,8 @@
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Removing support lines."
|
||||
sleep(40)
|
||||
if (!( istype(src, /turf/station/r_wall) ))
|
||||
return
|
||||
if ((user.loc == T && user.equipped() == W && !( user.stat )))
|
||||
src.d_state = 2
|
||||
else
|
||||
@@ -2242,6 +2268,8 @@
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Prying cover off."
|
||||
sleep(100)
|
||||
if (!( istype(src, /turf/station/r_wall) ))
|
||||
return
|
||||
if ((user.loc == T && user.equipped() == W && !( user.stat )))
|
||||
src.d_state = 4
|
||||
else
|
||||
@@ -2249,6 +2277,8 @@
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Prying outer sheath off."
|
||||
sleep(100)
|
||||
if (!( istype(src, /turf/station/r_wall) ))
|
||||
return
|
||||
if ((user.loc == T && user.equipped() == W && !( user.stat )))
|
||||
src.d_state = 7
|
||||
new /obj/item/weapon/sheet/metal( src )
|
||||
@@ -2257,6 +2287,8 @@
|
||||
var/turf/T = user.loc
|
||||
user << "\blue Repairing wall."
|
||||
sleep(100)
|
||||
if (!( istype(src, /turf/station/r_wall) ))
|
||||
return
|
||||
if ((user.loc == T && user.equipped() == W && !( user.stat ) && src.state == 2))
|
||||
src.d_state = 0
|
||||
if (W:amount > 1)
|
||||
@@ -2269,9 +2301,12 @@
|
||||
user << "\blue Now dismantling girders."
|
||||
var/turf/T = user.loc
|
||||
sleep(100)
|
||||
if (!( istype(src, /turf/station/r_wall) ))
|
||||
return
|
||||
if ((user.loc == T && user.equipped() == W && !( user.stat )))
|
||||
src.state = 0
|
||||
var/turf/station/floor/F = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
//var/turf/station/floor/F = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
var/turf/station/floor/F = src.ReplaceWithFloor()
|
||||
F.oxygen = O2STANDARD
|
||||
new /obj/item/weapon/sheet/metal( F )
|
||||
new /obj/item/weapon/sheet/metal( F )
|
||||
@@ -2314,7 +2349,7 @@
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
//SN src = null
|
||||
var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) )
|
||||
var/turf/space/S = src.ReplaceWithSpace()
|
||||
S.buildlinks()
|
||||
del(src)
|
||||
return
|
||||
@@ -2331,7 +2366,8 @@
|
||||
src.icon_state = "girder"
|
||||
else
|
||||
src.state = 0
|
||||
var/turf/station/floor/F = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
//var/turf/station/floor/F = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
var/turf/station/floor/F = src.ReplaceWithFloor()
|
||||
F.burnt = 1
|
||||
F.health = 30
|
||||
F.icon_state = "Floor1"
|
||||
@@ -2358,7 +2394,8 @@
|
||||
if(prob(20))
|
||||
if(!intact)
|
||||
src.state = 0
|
||||
var/turf/station/floor/F = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
//var/turf/station/floor/F = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
var/turf/station/floor/F = src.ReplaceWithFloor()
|
||||
F.burnt = 1
|
||||
F.health = 30
|
||||
F.icon_state = "Floor1"
|
||||
@@ -2380,6 +2417,7 @@
|
||||
|
||||
/turf/station/wall/unburn()
|
||||
|
||||
src.luminosity = 0
|
||||
if (src.state == 1)
|
||||
src.icon_state = "girder"
|
||||
else
|
||||
@@ -2413,7 +2451,8 @@
|
||||
return
|
||||
if ((user.loc == T && src.state == 1 && user.equipped() == W))
|
||||
src.state = 0
|
||||
var/turf/station/floor/F = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
//var/turf/station/floor/F = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
var/turf/station/floor/F = src.ReplaceWithFloor()
|
||||
F.oxygen = O2STANDARD
|
||||
new /obj/item/weapon/sheet/metal( F )
|
||||
new /obj/item/weapon/sheet/metal( F )
|
||||
@@ -2430,7 +2469,9 @@
|
||||
return
|
||||
if ((user.loc == T && src.state == 1 && user.equipped() == W))
|
||||
src.state = 0
|
||||
var/turf/station/floor/F = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
//var/turf/station/floor/F = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
var/turf/station/floor/F = src.ReplaceWithFloor()
|
||||
|
||||
F.oxygen = O2STANDARD
|
||||
new /obj/d_girders( F )
|
||||
new /obj/item/weapon/sheet/metal( F )
|
||||
@@ -2446,7 +2487,8 @@
|
||||
return
|
||||
if ((user.loc == T && src.state == 1 && user.equipped() == W))
|
||||
src.state = 0
|
||||
var/turf/station/r_wall/F = new /turf/station/r_wall( locate(src.x, src.y, src.z) )
|
||||
//var/turf/station/r_wall/F = new /turf/station/r_wall( locate(src.x, src.y, src.z) )
|
||||
var/turf/station/r_wall/F = src.ReplaceWithRWall()
|
||||
F.oxygen = O2STANDARD
|
||||
F.icon_state = "r_girder"
|
||||
F.state = 1
|
||||
@@ -2493,7 +2535,8 @@
|
||||
else
|
||||
if ((prob(20) && src.state == 1))
|
||||
src.state = 0
|
||||
var/turf/station/floor/F = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
//var/turf/station/floor/F = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
var/turf/station/floor/F = src.ReplaceWithFloor()
|
||||
F.oxygen = O2STANDARD
|
||||
new /obj/item/weapon/sheet/metal( F )
|
||||
new /obj/item/weapon/sheet/metal( F )
|
||||
@@ -2510,25 +2553,26 @@
|
||||
return
|
||||
|
||||
/turf/station/floor/ex_act(severity)
|
||||
set src in oview(1)
|
||||
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) )
|
||||
var/turf/space/S = src.ReplaceWithSpace()
|
||||
S.buildlinks()
|
||||
levelupdate()
|
||||
//SN src = null
|
||||
del(src)
|
||||
//del(src) //deleting it makes this method silently stop executing and erases the saved area somehow (SL)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
//SN src = null
|
||||
var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) )
|
||||
var/turf/space/S = src.ReplaceWithSpace()
|
||||
S.buildlinks()
|
||||
levelupdate()
|
||||
del(src)
|
||||
//del(src) //deleting it makes this method silently stop executing and erases the saved area somehow (SL)
|
||||
return
|
||||
else
|
||||
src.icon_state = "burning"
|
||||
src.luminosity = 2
|
||||
src.burnt = 1
|
||||
src.health = 30
|
||||
src.intact = 0
|
||||
@@ -2586,6 +2630,7 @@
|
||||
src.burnt = 0
|
||||
if (src.firelevel >= 900000.0)
|
||||
src.icon_state = "burning"
|
||||
src.luminosity = 2
|
||||
else
|
||||
src.icon_state = "Floor"
|
||||
var/obj/item/weapon/tile/T = C
|
||||
@@ -2599,6 +2644,7 @@
|
||||
|
||||
/turf/station/floor/unburn()
|
||||
|
||||
src.luminosity = 0
|
||||
src.icon_state = text("Floor[]", (src.burnt ? "1" : ""))
|
||||
return
|
||||
|
||||
|
||||
+20
-18
@@ -9,6 +9,9 @@
|
||||
p++
|
||||
return t
|
||||
return
|
||||
|
||||
/obj/machinery/computer/dna/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/dna/attack_paw(mob/user as mob)
|
||||
|
||||
@@ -21,7 +24,7 @@
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
if (istype(user, /mob/human))
|
||||
if (istype(user, /mob/human) || istype(user, /mob/ai))
|
||||
var/dat = text("<I>Please Insert the cards into the slots</I><BR>\n\t\t\t\tFunction Disk: <A href='?src=\ref[];scan=1'>[]</A><BR>\n\t\t\t\tTarget Disk: <A href='?src=\ref[];modify=1'>[]</A><BR>\n\t\t\t\tAux. Data Disk: <A href='?src=\ref[];modify2=1'>[]</A><BR>\n\t\t\t\t\t(Not always used!)<BR>\n\t\t\t\t[]", src, (src.scan ? text("[]", src.scan.name) : "----------"), src, (src.modify ? text("[]", src.modify.name) : "----------"), src, (src.modify2 ? text("[]", src.modify2.name) : "----------"), (src.scan ? text("<A href='?src=\ref[];execute=1'>Execute Function</A>", src) : "No function disk inserted!"))
|
||||
if (src.temp)
|
||||
dat = text("[]<BR><BR><A href='?src=\ref[];clear=1'>Clear Message</A>", src.temp, src)
|
||||
@@ -36,11 +39,12 @@
|
||||
/obj/machinery/computer/dna/Topic(href, href_list)
|
||||
..()
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if ((usr.stat || usr.restrained()))
|
||||
return
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
|
||||
if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))) || (istype(usr, /mob/ai)))
|
||||
usr.machine = src
|
||||
if (href_list["modify"])
|
||||
if (src.modify)
|
||||
@@ -200,10 +204,8 @@
|
||||
else
|
||||
src.temp = "System Failure: Cannot read disk function!"
|
||||
src.add_fingerprint(usr)
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
//Foreach goto(1764)
|
||||
src.updateDialog()
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/computer/dna/ex_act(severity)
|
||||
@@ -608,16 +610,16 @@
|
||||
else
|
||||
src.status = null
|
||||
src.temp = "Unknown system error."
|
||||
for(var/mob/O in viewers(1, src))
|
||||
if ((O.client && O.machine == src))
|
||||
src.attack_hand(O)
|
||||
//Foreach goto(1755)
|
||||
src.updateDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/scan_console/attack_paw(user as mob)
|
||||
|
||||
return src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/machinery/scan_console/attack_ai(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/scan_console/attack_hand(user as mob)
|
||||
|
||||
@@ -658,11 +660,12 @@
|
||||
/obj/machinery/scan_console/Topic(href, href_list)
|
||||
..()
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if (!istype(usr, /mob/ai))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if ((usr.stat || usr.restrained()))
|
||||
return
|
||||
if ((usr.contents.Find(src) || get_dist(src, usr) <= 1 && istype(src.loc, /turf)))
|
||||
if ((usr.contents.Find(src) || get_dist(src, usr) <= 1 && istype(src.loc, /turf)) || (istype(usr, /mob/ai)))
|
||||
usr.machine = src
|
||||
if (href_list["locked"])
|
||||
if ((src.connected && src.connected.occupant))
|
||||
@@ -702,9 +705,8 @@
|
||||
src.status = "load"
|
||||
src.temp = "Loading..."
|
||||
src.add_fingerprint(usr)
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
src.updateDialog()
|
||||
|
||||
//Foreach goto(484)
|
||||
return
|
||||
|
||||
|
||||
+2
-2
@@ -37,14 +37,14 @@
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
//SN src = null
|
||||
var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) )
|
||||
var/turf/space/S = src.ReplaceWithSpace()
|
||||
S.buildlinks()
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
//SN src = null
|
||||
var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) )
|
||||
var/turf/space/S = src.ReplaceWithSpace()
|
||||
S.buildlinks()
|
||||
|
||||
del(src)
|
||||
|
||||
+59
-6
@@ -45,7 +45,6 @@
|
||||
hearing inside closets/pods
|
||||
check head protection when hit by tank etc.
|
||||
|
||||
Double message at end of round.
|
||||
|
||||
gas progagation btwen obj/move & turfs - no flow
|
||||
due to turf/updatecell not counting /obj/moves as sources
|
||||
@@ -104,13 +103,57 @@
|
||||
var
|
||||
|
||||
world_message = "Welcome to SS13!"
|
||||
savefile_ver = "3"
|
||||
SS13_version = "40.93.2H9.6"
|
||||
savefile_ver = "4"
|
||||
SS13_version = "40.93.2H9.7"
|
||||
changes = {"<FONT color='blue'><B>Changes from base version 40.93.2</B></FONT><BR>
|
||||
<HR>
|
||||
<!--
|
||||
<p><B>This is a test version which hasn't been released yet, the reason being to test new bugfixes and/or features to see if they're all working without having broken anything else.
|
||||
</B></p>
|
||||
-->
|
||||
|
||||
<p><B>Version 40.93.2H9.7</B>
|
||||
<ul>
|
||||
<li>Merged in basically everything from http://shadowlord13.googlepages.com/openss13_b12-index.html (the person who was working on that is on the openss13 dev team now. If you're curious, that's also the person writing this particular entry in the changelog).
|
||||
</li><li>Made further changes to the map, starting with that map version: moved the air tunnel north, made a hall going north to it, moved the crew arrival shuttle so it connects to that hall, so meteors can hit the part of the station it was protecting before
|
||||
</li><li>The air tunnel now connects to a gauntlet of turrets leading to the AI upload room, which is in the space between the air tunnel and the rest of the station south of it.
|
||||
</li><li>Moved the AI's room itself into there as well. The weapons sat has returned to being what it originally was. To get to the AI now, you would either have to go through one or more rwalls and grilles (depending on where you try to break through), or go through the turret gauntlet, and through the AI upload room and out a door on the other side of it. (Of course a sufficiently powerful bomb could probably bust through the walls, if not kill the AI, even if you plant it in the air tunnel)
|
||||
</li><li>The AI still has four SMES generators, but they are charged from SS13's main power now. So, if the station loses power, the AI will probably die as well (eventually).
|
||||
</li><li>Fixed an exception coming from the AI clicking an engine computer.
|
||||
</li><li>Fixed exceptions from clicking things which dropped the active held item while you had someone grabbed in your active hand. If you try to click a closet with someone grabbed, you stuff them in it now. If you try to click a table or rack, you don't do anything. Previously all of these caused you to lose the grip and caused an exception (because when it told the grip to be dropped, it deleted itself, and then it tried to move null).
|
||||
</li><li>Many many things which could take someone from being 'dead' to being 'unconscious' have been fixed. These were all cases where stat was being set to 1 without being checked to see if it was 2. Mind you, it wasn't terribly easy to actually resurrect someone with this, since they always immediately died again due to all the damage they had taken, but it did cause them to get (Dead) (Dead) (Dead) (Dead) spammed at the end of their corpse's name if they were thwacked repeatedly. Also, related stuff that would say they were stunned, weakened, etc, should also not happen (unless I missed some).
|
||||
</li><li>Syndicate mini-station is more rectangular-ish, and the forcefield around it is more circle-ish. The forcefield is also thicker and completely encases the mini-station, making it harder to teleport inside.
|
||||
</li><li>Un-nerfed meteor chance in non-meteor modes a bit from 0.5 to 1 (originally 2.0 before it was nerfed to 0.5).
|
||||
</li><li>Added an alternate_ai_laws config variable, which gives the AI some more reasonable laws. It also has some more law adjustments when it's the traitor.
|
||||
</li><li>Merged in a number of changes from the goons' svn (but not all of them - I didn't take all of them, and I probably missed a bunch because I didn't try to compare any of the code which was moved in the openss13 code reorganizations). Changes that I merged in include:
|
||||
<ul><li>Anesthetic tanks have 700000 N2O and 1000000 oxygen in them now, instead of 1000 N2O and no oxygen
|
||||
</li><li>Syndicate closets on the mini-station instead of stuff strewn everywhere
|
||||
</li><li>Starting the syndicates in nuclear mode with a few bombs (the goons had given them four bombs and left the heater with the parts to make one or two more bombs, but I've reduced that to two bombs and removed the heater and the bomb-making parts)
|
||||
</li><li>Blob dies in space and can't spread at all in the start zone or shuttles
|
||||
</li><li>Map transitions west and east work properly
|
||||
</li><li>A hardcoded supply station spawnpoint at 77,40,7 for Thief jack, Link43130, Hutchy2k1, Easty, and Exadv1 was removed.
|
||||
</li><li>You spawn in /area/arrival/start now instead of sleep_area, and the rest of the arrival shuttle has its own area (/area/arrival/shuttle). The original sleep area is also actually in /area/sleep_area again now.
|
||||
</li><li>Attacking someone with a taser gun at point-blank range uses charges and will thwack them instead of stunning if you have no charges.
|
||||
</li><li>People who are disconnected have "a vacant look in their eyes" when checked with a medical analyzer.
|
||||
</li><li>A fix to make the gasmask overlay not remain after death
|
||||
</li><li>Stuttering is applied before HTMLizing text.
|
||||
</li><li>Shuttle doors can be opened and closed by clicking them now.
|
||||
</li><li>A fix for spawning without your ID
|
||||
</li><li>Staff assistants have access level 3.
|
||||
</li><li>Fixes to timers showing the wrong icon.
|
||||
</li><li>Taser and laser gun have a maximum charges var (They have 10 each).
|
||||
</li><li>I had missed the desc on the protect station module.
|
||||
</li><li>Added this patch, which reduces turret firing rate and makes shots able to hit things other than the chest (which is another way of fixing the "the turret can't kill me" problem, but is probably better than the one I used). I didn't include the fix for shooting laying down people, since I think my fix for that was better than the one in this patch: http://code.google.com/p/ss13/issues/detail?id=91&colspec=ID%20Type%20Branch%20Status%20Priority%20Owner%20Summary
|
||||
</ul>
|
||||
</li><li>The steal-laser-pistol objective checks the charges against maximum_charges instead of 25 now.
|
||||
</li><li>Prox bombs and timer bombs count for the traitor fully-heated-plasma-bomb objective now.
|
||||
</li><li>In nuclear mode, there is now a 25% chance of the AI being loyal to the syndicate instead of SS13. (The SS13 personnel won't know it)
|
||||
</li><li>There are now 24 solar panels at north solar, which is the same number that main solar (southwest) has (there were 12 at north solar before).
|
||||
</ul>
|
||||
|
||||
<p><B>Version 40.93.2H9.6</B>
|
||||
<ul>
|
||||
<li> Started pipelaying system, Pipe cutting/damage not yet complete.
|
||||
<li>Started pipelaying system, Pipe cutting/damage not yet complete.
|
||||
<li>Added burning icon for labcoat
|
||||
<li>Fixed a minor airsystem bug for /obj/moves
|
||||
<li>Fixed admin toggle of mode-voting message (now reports state of allowvotemode correctly)
|
||||
@@ -122,6 +165,7 @@ var
|
||||
<li>Made a temporary fix to runtime errors when blob attacks pipes (until full pipe damage system implemented).
|
||||
<li>Code reorganization of /obj/machinery continued.
|
||||
</ul>
|
||||
|
||||
<p><B>Version 40.93.2H9.5</B>
|
||||
<ul>
|
||||
<li>Fixed a few bugs with reinforced windows.
|
||||
@@ -315,7 +359,7 @@ var
|
||||
prison_entered = null
|
||||
|
||||
list/html_colours = new/list(0)
|
||||
list/occupations = list( "Engineer", "Engineer", "Security Officer", "Security Officer", "Forensic Technician", "Medical Researcher", "Research Technician", "Toxin Researcher", "Atmospheric Technician", "Medical Doctor", "Station Technician", "Head of Personnel", "Head of Research", "Prison Security", "Prison Security", "Prison Doctor", "Prison Warden" )
|
||||
list/occupations = list( "Engineer", "Engineer", "Security Officer", "Security Officer", "Forensic Technician", "Medical Researcher", "Research Technician", "Toxin Researcher", "Atmospheric Technician", "Medical Doctor", "Station Technician", "Head of Personnel", "Head of Research", "Prison Security", "Prison Security", "Prison Doctor", "Prison Warden", "AI" )
|
||||
list/assistant_occupations = list( "Technical Assistant", "Medical Assistant", "Research Assistant", "Staff Assistant" )
|
||||
list/bombers = list( )
|
||||
list/admins = list( )
|
||||
@@ -353,6 +397,15 @@ var
|
||||
|
||||
wavesecret = 0
|
||||
|
||||
//airlockWireColorToIndex takes a number representing the wire color, e.g. the orange wire is always 1, the dark red wire is always 2, etc. It returns the index for whatever that wire does.
|
||||
//airlockIndexToWireColor does the opposite thing - it takes the index for what the wire does, for example AIRLOCK_WIRE_IDSCAN is 1, AIRLOCK_WIRE_POWER1 is 2, etc. It returns the wire color number.
|
||||
//airlockWireColorToFlag takes the wire color number and returns the flag for it (1, 2, 4, 8, 16, etc)
|
||||
list/airlockWireColorToFlag = RandomAirlockWires()
|
||||
list/airlockIndexToFlag
|
||||
list/airlockIndexToWireColor
|
||||
list/airlockWireColorToIndex
|
||||
list/airlockFeatureNames = list("IdScan", "Main power In", "Main power Out", "Drop door bolts", "Backup power In", "Backup power Out", "Power assist", "AI Control", "Electrify")
|
||||
|
||||
world
|
||||
mob = /mob/human
|
||||
turf = /turf/space
|
||||
@@ -369,4 +422,4 @@ world
|
||||
|
||||
//visibility = 0
|
||||
|
||||
//loop_checks = 0
|
||||
//loop_checks = 0
|
||||
|
||||
@@ -87,10 +87,8 @@
|
||||
return
|
||||
var/mob/human/M = usr
|
||||
var/list/start_loc = list( )
|
||||
if ((M.key in list( "Thief jack", "Link43130", "Hutchy2k1", "Easty", "Exadv1" )))
|
||||
start_loc["Supply Station"] = locate(77, 40, 7)
|
||||
|
||||
var/area/A = locate(/area/sleep_area)
|
||||
var/area/A = locate(/area/arrival/start)
|
||||
var/list/L = list( )
|
||||
for(var/turf/T in A)
|
||||
if(T.isempty())
|
||||
@@ -105,7 +103,9 @@
|
||||
if (S.tag == text("spstart[]", M.ckey))
|
||||
start_loc[text("[]", S.desc)] = S
|
||||
//Foreach goto(295)
|
||||
var/option = input(M, "Where should you start?", "Start Selector", null) in start_loc
|
||||
var/option = input(M, "Where should you start?", "Start Selector", null) in start_loc
|
||||
if (usr==null)
|
||||
return
|
||||
if ((!( usr.start ) || !( istype(usr, /mob/human) ) || usr.loc != src.loc))
|
||||
return
|
||||
if (ticker)
|
||||
|
||||
+143
-81
@@ -459,7 +459,7 @@
|
||||
O.show_message(text("\red <B>[] has been attacked with [][] </B>", M, src, (user ? text(" by [].", user) : ".")), 1)
|
||||
//Foreach goto(20)
|
||||
var/power = src.force
|
||||
if (M.health >= -10.0)
|
||||
if ((M.health >= -10.0) && (M.stat < 2))
|
||||
if (istype(M, /mob/human))
|
||||
var/mob/human/H = M
|
||||
var/obj/item/weapon/organ/external/affecting = H.organs["chest"]
|
||||
@@ -1264,10 +1264,11 @@
|
||||
src.force = 75
|
||||
..()
|
||||
src.force = 60
|
||||
M.stat = 1
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] has been shot point-blank by []!</B>", M, user), 1, "\red You hear someone fall", 2)
|
||||
//Foreach goto(192)
|
||||
if (M.stat<2)
|
||||
M.stat = 1
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] has been shot point-blank by []!</B>", M, user), 1, "\red You hear someone fall", 2)
|
||||
//Foreach goto(192)
|
||||
else
|
||||
if (prob(50))
|
||||
if (M.paralysis < 60)
|
||||
@@ -1277,11 +1278,12 @@
|
||||
M.weakened = 60
|
||||
src.force = 30
|
||||
..()
|
||||
M.stat = 1
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has been pistol whipped []!</B>", M, user), 1, "\red You hear someone fall", 2)
|
||||
//Foreach goto(315)
|
||||
if (M.stat<2)
|
||||
M.stat = 1
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has been pistol whipped []!</B>", M, user), 1, "\red You hear someone fall", 2)
|
||||
//Foreach goto(315)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/proc/update_icon()
|
||||
@@ -1356,7 +1358,7 @@
|
||||
|
||||
/obj/item/weapon/gun/energy/taser_gun/update_icon()
|
||||
|
||||
var/ratio = src.charges / 10
|
||||
var/ratio = src.charges / maximum_charges
|
||||
ratio = round(ratio, 0.25) * 100
|
||||
src.icon_state = text("t_gun[]", ratio)
|
||||
return
|
||||
@@ -1407,35 +1409,40 @@
|
||||
if ((istype(H, /mob/human) && istype(H, /obj/item/weapon/clothing/head) && H.flags & 8 && prob(80)))
|
||||
M << "\red The helmet protects you from being hit hard in the head!"
|
||||
return
|
||||
if (user.a_intent == "hurt")
|
||||
if (prob(20))
|
||||
if (M.paralysis < 10)
|
||||
M.paralysis = 10
|
||||
else
|
||||
if (M.weakened < 10)
|
||||
if (src.charges >= 1)
|
||||
if (user.a_intent == "hurt")
|
||||
if (prob(20))
|
||||
if (M.paralysis < 10)
|
||||
M.paralysis = 10
|
||||
else if (M.weakened < 10)
|
||||
M.weakened = 10
|
||||
if (M.stuttering < 10)
|
||||
M.stuttering = 10
|
||||
..()
|
||||
M.stat = 1
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] has been knocked unconscious!</B>", M), 1, "\red You hear someone fall", 2)
|
||||
//Foreach goto(182)
|
||||
else
|
||||
if (prob(50))
|
||||
if (M.paralysis < 60)
|
||||
M.paralysis = 60
|
||||
if (M.stuttering < 10)
|
||||
M.stuttering = 10
|
||||
..()
|
||||
if (M.stat<2)
|
||||
M.stat = 1
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] has been knocked unconscious!</B>", M), 1, "\red You hear someone fall", 2)
|
||||
//Foreach goto(182)
|
||||
else
|
||||
if (M.weakened < 60)
|
||||
M.weakened = 60
|
||||
if (M.stuttering < 60)
|
||||
M.stuttering = 60
|
||||
M.stat = 1
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has been stunned with the taser gun by []!</B>", M, user), 1, "\red You hear someone fall", 2)
|
||||
//Foreach goto(309)
|
||||
return
|
||||
if (prob(50))
|
||||
if (M.paralysis < 60)
|
||||
M.paralysis = 60
|
||||
else
|
||||
if (M.weakened < 60)
|
||||
M.weakened = 60
|
||||
if (M.stuttering < 60)
|
||||
M.stuttering = 60
|
||||
if (M.stat<2)
|
||||
M.stat = 1
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has been stunned with the taser gun by []!</B>", M, user), 1, "\red You hear someone fall", 2)
|
||||
//Foreach goto(309)
|
||||
src.charges--
|
||||
update_icon()
|
||||
else // no charges in the gun, so they just wallop the target with it
|
||||
..()
|
||||
|
||||
/obj/item/weapon/pill_canister/New()
|
||||
|
||||
@@ -2110,7 +2117,9 @@
|
||||
var/turf/F = get_step(usr, usr.dir)
|
||||
if (!( istype(F, /turf/station/floor) ))
|
||||
return
|
||||
var/turf/station/wall/W = new /turf/station/wall( locate(F.x, F.y, F.z) )
|
||||
//var/turf/station/wall/W = new /turf/station/wall( locate(F.x, F.y, F.z) )
|
||||
var/turf/station/wall/W = F.ReplaceWithWall()
|
||||
|
||||
W.icon_state = "girder"
|
||||
W.updatecell = 1
|
||||
W.opacity = 0
|
||||
@@ -2842,7 +2851,7 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/paper/examine()
|
||||
set src in view()
|
||||
set src in view(usr.client)
|
||||
|
||||
..()
|
||||
if (!( istype(usr, /mob/human) ))
|
||||
@@ -2942,12 +2951,13 @@
|
||||
/obj/item/weapon/f_card/add_fingerprint()
|
||||
|
||||
..()
|
||||
if (src.fingerprints)
|
||||
if (src.amount > 1)
|
||||
var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card( (ismob(src.loc) ? src.loc.loc : src.loc) )
|
||||
F.amount = --src.amount
|
||||
src.amount = 1
|
||||
src.icon_state = "f_print_card1"
|
||||
if (!istype(usr, /mob/ai))
|
||||
if (src.fingerprints)
|
||||
if (src.amount > 1)
|
||||
var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card( (ismob(src.loc) ? src.loc.loc : src.loc) )
|
||||
F.amount = --src.amount
|
||||
src.amount = 1
|
||||
src.icon_state = "f_print_card1"
|
||||
return
|
||||
|
||||
/obj/item/weapon/f_print_scanner/attackby(obj/item/weapon/f_card/W, mob/user)
|
||||
@@ -3027,17 +3037,26 @@
|
||||
if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red [] has analyzed []'s vitals!", user, M), 1)
|
||||
//Foreach goto(67)
|
||||
user.show_message(text("\blue Analyzing Results for []:\n\t Overall Status: []", M, (M.stat > 1 ? "dead" : text("[]% healthy", M.health))), 1)
|
||||
user.show_message(text("\blue \t Damage Specifics: []-[]-[]-[]", M.oxyloss, M.toxloss, M.fireloss, M.bruteloss), 1)
|
||||
|
||||
for (var/mob/O in viewers(M, null))
|
||||
O.show_message("\red [user] has analyzed [M]'s vitals!", 1)
|
||||
|
||||
user.show_message("\blue Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "dead" : "[M.health]% healthy"]", 1)
|
||||
user.show_message("\blue \t Damage Specifics: [M.oxyloss]-[M.toxloss]-[M.fireloss]-[M.bruteloss]", 1)
|
||||
user.show_message("\blue Key: Suffocation/Toxin/Burns/Brute", 1)
|
||||
|
||||
if (M.rejuv)
|
||||
user.show_message(text("\blue Bloodstream Analysis located [] units of rejuvenation chemicals.", M.rejuv), 1)
|
||||
user.show_message("\blue Bloodstream Analysis located [M.rejuv] units of rejuvenation chemicals.", 1)
|
||||
if (M.antitoxs)
|
||||
user.show_message("\blue Bloodstream Analysis located [M.antitoxs] units of antitoxin chemicals.", 1)
|
||||
if (M.plasma)
|
||||
user.show_message("\blue Bloodstream Analysis located [M.antitoxs] units of toxic plasma chemicals.", 1)
|
||||
// Not checked: r_epil, r_ch_cou, r_tourette
|
||||
|
||||
if (!M.client)
|
||||
user.show_message("\blue [M] has a vacant look in \his eyes.", 1)
|
||||
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/analyzer/attack_self(mob/user)
|
||||
|
||||
@@ -3135,7 +3154,6 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/proc/orient_objs(tx, ty, mx, my)
|
||||
|
||||
var/cx = tx
|
||||
var/cy = ty
|
||||
src.boxes.screen_loc = text("[],[] to [],[]", tx, ty, mx, my)
|
||||
@@ -3553,12 +3571,8 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/tile/proc/build(turf/S)
|
||||
var/turf/station/floor/W = S.ReplaceWithFloor()
|
||||
|
||||
var/area/A = S.loc
|
||||
var/turf/station/floor/W = new /turf/station/floor( locate(S.x, S.y, S.z) )
|
||||
if (istype(A, /area))
|
||||
A.contents -= W
|
||||
A.contents += W
|
||||
W.burnt = 1
|
||||
W.intact = 0
|
||||
W.oxygen = 0
|
||||
@@ -3808,7 +3822,7 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/radio/electropack/Topic(href, href_list)
|
||||
..()
|
||||
//..() //Was causing double frequency changes -shadowlord13
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
if (((istype(usr, /mob/human) && ((!( ticker ) || (ticker && ticker.mode != "monkey")) && usr.contents.Find(src))) || (usr.contents.Find(src.master) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf)))))
|
||||
@@ -4055,7 +4069,7 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/radio/signaler/Topic(href, href_list)
|
||||
..()
|
||||
//..() //Was causing double frequency changes -shadowlord13
|
||||
if (usr.stat)
|
||||
return
|
||||
if ((usr.contents.Find(src) || (usr.contents.Find(src.master) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf)))))
|
||||
@@ -4128,6 +4142,14 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/radio/intercom/attack_ai(mob/user)
|
||||
|
||||
src.add_fingerprint(user)
|
||||
spawn( 0 )
|
||||
attack_self(user)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/radio/intercom/attack_paw(mob/user)
|
||||
|
||||
if ((ticker && ticker.mode == "monkey"))
|
||||
@@ -4167,10 +4189,10 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/radio/Topic(href, href_list)
|
||||
..()
|
||||
//..() //Was causing double frequency changes -shadowlord13
|
||||
if (usr.stat)
|
||||
return
|
||||
if ((usr.contents.Find(src) || get_dist(src, usr) <= 1 && istype(src.loc, /turf)))
|
||||
if ((usr.contents.Find(src) || get_dist(src, usr) <= 1 && istype(src.loc, /turf)) || (istype(usr, /mob/ai)))
|
||||
usr.machine = src
|
||||
if (href_list["freq"])
|
||||
src.freq += text2num(href_list["freq"])
|
||||
@@ -4210,18 +4232,12 @@
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
//Foreach goto(390)
|
||||
src.updateDialog()
|
||||
else
|
||||
if (istype(src.master.loc, /mob))
|
||||
src.attack_self(src.master.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src.master))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
//Foreach goto(466)
|
||||
src.updateDialog()
|
||||
src.add_fingerprint(usr)
|
||||
else
|
||||
usr << browse(null, "window=radio")
|
||||
@@ -4251,16 +4267,16 @@
|
||||
for(var/mob/O in crackle)
|
||||
O.show_message(text("\icon[] <I>Crackle,Crackle</I>", src), 2)
|
||||
//Foreach goto(233)
|
||||
if (istype(M, /mob/human))
|
||||
if (istype(M, /mob/human) || (istype(M, /mob/ai)))
|
||||
for(var/mob/O in receive)
|
||||
if (istype(O, /mob/human))
|
||||
if (istype(O, /mob/human) || (istype(O, /mob/ai)))
|
||||
O.show_message(text("<B>[]-\icon[]\[[]\]-broadcasts</B>: <I>[]</I>", M.rname, src, src.freq, msg), 2)
|
||||
else
|
||||
O.show_message(text("<B>[]-\icon[]\[[]\]-broadcasts</B>: <I>[]</I>", M.rname, src, src.freq, stars(msg)), 2)
|
||||
//Foreach goto(284)
|
||||
if (src.freq == 5)
|
||||
for(var/mob/O in receive)
|
||||
if (istype(O, /mob/human))
|
||||
if (istype(O, /mob/human) || (istype(O, /mob/ai)))
|
||||
O.show_message(text("<B>[]-\icon[]\[[]\]-broadcasts (over PA)</B>: <I>[]</I>", M.rname, src, src.freq, msg), 2)
|
||||
else
|
||||
O.show_message(text("<B>[]-\icon[]\[[]\]-broadcasts (over PA)</B>: <I>[]</I>", M.rname, src, src.freq, stars(msg)), 2)
|
||||
@@ -5216,7 +5232,8 @@
|
||||
return
|
||||
|
||||
/obj/table/attackby(obj/item/weapon/W, mob/user)
|
||||
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/weapon/table_parts( src.loc )
|
||||
//SN src = null
|
||||
@@ -5271,7 +5288,8 @@
|
||||
return
|
||||
|
||||
/obj/rack/attackby(obj/item/weapon/W, mob/user)
|
||||
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/weapon/rack_parts( src.loc )
|
||||
//SN src = null
|
||||
@@ -5527,19 +5545,21 @@
|
||||
return
|
||||
|
||||
/atom/proc/attack_paw(mob/user)
|
||||
|
||||
return
|
||||
|
||||
/atom/proc/attack_ai(mob/user)
|
||||
return
|
||||
|
||||
/atom/proc/hand_h(mob/user)
|
||||
|
||||
return
|
||||
|
||||
/atom/proc/hand_p(mob/user)
|
||||
return
|
||||
|
||||
/atom/proc/hand_a(mob/user)
|
||||
return
|
||||
|
||||
/atom/proc/hitby(obj/item/weapon/W)
|
||||
|
||||
return
|
||||
|
||||
/atom/proc/attackby(obj/item/weapon/W, mob/user)
|
||||
@@ -5585,19 +5605,34 @@
|
||||
..()
|
||||
return
|
||||
|
||||
/atom/Click()
|
||||
//world << "atom.Click() on [src] by [usr] : src.type is [src.type]"
|
||||
if (!usr.disable_one_click)
|
||||
return DblClick()
|
||||
|
||||
/atom/DblClick()
|
||||
if (world.time <= usr:lastDblClick+2)
|
||||
//world << "BLOCKED atom.DblClick() on [src] by [usr] : src.type is [src.type]"
|
||||
return
|
||||
else
|
||||
//world << "atom.DblClick() on [src] by [usr] : src.type is [src.type]"
|
||||
usr:lastDblClick = world.time
|
||||
|
||||
..()
|
||||
var/obj/item/weapon/W = usr.equipped()
|
||||
if ((W == src && usr.stat == 0))
|
||||
spawn(0) W.attack_self(usr)
|
||||
return
|
||||
if (!(usr.canmove) || usr.stat != 0)
|
||||
if (((!usr.canmove) && (!istype(usr, /mob/ai))) || usr.stat != 0)
|
||||
|
||||
return
|
||||
/* This line broke my mental parser. --Stephen001 */
|
||||
if ((!(src in usr.contents) && (((!(isturf(src)) && (!(isturf(src.loc)) && (src.loc && !(isturf(src.loc.loc))))) || !(isturf(usr.loc))) && (src.loc != usr.loc && (!(istype(src, /obj/screen)) && !(usr.contents.Find(src.loc)))))))
|
||||
return
|
||||
/* Surely src.loc == usr is redundant? --Stephen001 */
|
||||
var/t5 = (get_dist(src, usr) <= 1 || src.loc == usr)
|
||||
if (istype(usr, /mob/ai))
|
||||
t5 = 1
|
||||
if ((istype(src, /obj/item/weapon/organ) && src in usr.contents))
|
||||
var/mob/human/H = usr
|
||||
usr << "Betchya think you're really smart trying to remove your own body parts aren't ya!"
|
||||
@@ -5611,6 +5646,7 @@
|
||||
/* Seems like a pretty important expression. Dare I fathom what it checks? --Stephen001 */
|
||||
if (((t5 || (W && (W.flags & 16))) && !(istype(src, /obj/screen))))
|
||||
if (usr.next_move < world.time)
|
||||
usr.prev_move = usr.next_move
|
||||
usr.next_move = world.time + 10
|
||||
else
|
||||
return
|
||||
@@ -5704,14 +5740,22 @@
|
||||
else
|
||||
if (istype(usr, /mob/monkey))
|
||||
src.attack_paw(usr, usr.hand)
|
||||
else
|
||||
if (istype(usr, /mob/ai))
|
||||
src.attack_ai(usr, usr.hand)
|
||||
else
|
||||
if (istype(usr, /mob/human))
|
||||
src.hand_h(usr, usr.hand)
|
||||
else
|
||||
if (istype(usr, /mob/monkey))
|
||||
src.hand_p(usr, usr.hand)
|
||||
else
|
||||
if (istype(usr, /mob/ai))
|
||||
src.hand_a(usr, usr.hand)
|
||||
|
||||
else
|
||||
if (istype(src, /obj/screen))
|
||||
usr.prev_move = usr.next_move
|
||||
if (usr.next_move < world.time)
|
||||
usr.next_move = world.time + 10
|
||||
else
|
||||
@@ -5735,3 +5779,21 @@
|
||||
if (istype(usr, /mob/monkey))
|
||||
src.hand_p(usr, usr.hand)
|
||||
return
|
||||
|
||||
|
||||
/obj/proc/updateUsrDialog()
|
||||
var/list/nearby = viewers(1, src)
|
||||
for(var/mob/M in nearby)
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
if (istype(usr, /mob/ai))
|
||||
if (!(usr in nearby))
|
||||
if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
|
||||
src.attack_ai(usr)
|
||||
|
||||
/obj/proc/updateDialog()
|
||||
var/list/nearby = viewers(1, src)
|
||||
for(var/mob/M in nearby)
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
AutoUpdateAI(src)
|
||||
|
||||
+325
-144
@@ -609,6 +609,8 @@
|
||||
for(var/mob/O in viewers(usr, null))
|
||||
O.show_message(text("\red <B>[] resists!</B>", usr), 1)
|
||||
//Foreach goto(824)
|
||||
else if (!usr.disable_one_click)
|
||||
src.DblClick()
|
||||
return
|
||||
|
||||
/obj/screen/attack_hand(mob/user as mob, using)
|
||||
@@ -626,6 +628,10 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/examine/examine()
|
||||
set src in oview()
|
||||
|
||||
return
|
||||
/obj/dna/proc/cleanup()
|
||||
|
||||
var/e1 = (length(src.struc_enzyme) > 3 ? copytext(src.struc_enzyme, 1, 4) : null)
|
||||
@@ -665,6 +671,7 @@
|
||||
src.m_ints = list( )
|
||||
src.mov_int = list( )
|
||||
src.vimpaired = list( )
|
||||
src.darkMask = list( )
|
||||
src.g_dither = new src.h_type( src )
|
||||
src.g_dither.screen_loc = "1,1 to 15,15"
|
||||
src.g_dither.name = "Mask"
|
||||
@@ -676,6 +683,7 @@
|
||||
src.blurry.name = "Blurry"
|
||||
src.blurry.icon_state = "blurry"
|
||||
src.blurry.layer = 17
|
||||
src.blurry.mouse_opacity = 0
|
||||
var/obj/hud/using = new src.h_type( src )
|
||||
using.name = "vitals"
|
||||
using.dir = SOUTH
|
||||
@@ -949,25 +957,30 @@
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "1,1 to 5,15"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "5,1 to 10,5"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "6,11 to 10,15"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "11,1 to 15,15"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
|
||||
return
|
||||
|
||||
/obj/equip_e/proc/process()
|
||||
@@ -1881,6 +1894,12 @@
|
||||
var/mob/monkey/O = new /mob/monkey( src.loc )
|
||||
O.start = 1
|
||||
O.primary = src.primary
|
||||
O.lastKnownIP = src.lastKnownIP
|
||||
O.lastKnownCKey = src.lastKnownCKey
|
||||
O.disable_one_click = src.disable_one_click
|
||||
O.favorite_hud = src.favorite_hud
|
||||
if (O.favorite_hud)
|
||||
O.switch_hud()
|
||||
src.primary = null
|
||||
if (src.client)
|
||||
src.client.mob = O
|
||||
@@ -1891,7 +1910,6 @@
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
/mob/human/proc/emote(act as text)
|
||||
|
||||
@@ -2352,6 +2370,8 @@
|
||||
var/damage = null
|
||||
if (src.stat != 2)
|
||||
damage = rand(1,20)
|
||||
else
|
||||
return
|
||||
|
||||
if(shielded)
|
||||
damage /= 4
|
||||
@@ -2524,18 +2544,28 @@
|
||||
/mob/human/db_click(text, t1)
|
||||
|
||||
var/obj/item/weapon/W = src.equipped()
|
||||
if (!( istype(W, /obj/item/weapon) ))
|
||||
var/emptyHand = (W == null)
|
||||
if ((!emptyHand) && (!istype(W, /obj/item/weapon)))
|
||||
return
|
||||
if (emptyHand)
|
||||
usr.next_move = usr.prev_move
|
||||
usr:lastDblClick -= 3 //permit the double-click redirection to proceed.
|
||||
switch(text)
|
||||
if("mask")
|
||||
if (src.wear_mask)
|
||||
if (emptyHand)
|
||||
src.wear_mask.DblClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/weapon/clothing/mask) ))
|
||||
return
|
||||
src.u_equip(W)
|
||||
src.wear_mask = W
|
||||
if("back")
|
||||
if ((src.back || !( istype(W, /obj/item/weapon) )))
|
||||
if (src.back)
|
||||
if (emptyHand)
|
||||
src.back.DblClick()
|
||||
return
|
||||
if (!istype(W, /obj/item/weapon))
|
||||
return
|
||||
if (!( W.flags & 1 ))
|
||||
return
|
||||
@@ -2543,6 +2573,8 @@
|
||||
src.back = W
|
||||
if("headset")
|
||||
if (src.w_radio)
|
||||
if (emptyHand)
|
||||
src.w_radio.DblClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/weapon/radio/headset) ))
|
||||
return
|
||||
@@ -2550,6 +2582,8 @@
|
||||
src.w_radio = W
|
||||
if("o_clothing")
|
||||
if (src.wear_suit)
|
||||
if (emptyHand)
|
||||
src.wear_suit.DblClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/weapon/clothing/suit) ))
|
||||
return
|
||||
@@ -2557,6 +2591,8 @@
|
||||
src.wear_suit = W
|
||||
if("gloves")
|
||||
if (src.gloves)
|
||||
if (emptyHand)
|
||||
src.gloves.DblClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/weapon/clothing/gloves) ))
|
||||
return
|
||||
@@ -2564,6 +2600,8 @@
|
||||
src.gloves = W
|
||||
if("shoes")
|
||||
if (src.shoes)
|
||||
if (emptyHand)
|
||||
src.shoes.DblClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/weapon/clothing/shoes) ))
|
||||
return
|
||||
@@ -2571,6 +2609,8 @@
|
||||
src.shoes = W
|
||||
if("belt")
|
||||
if ((src.belt || !( istype(W, /obj/item/weapon) )))
|
||||
if (emptyHand && src.belt)
|
||||
src.belt.DblClick()
|
||||
return
|
||||
if (!( W.flags & ONBELT ))
|
||||
return
|
||||
@@ -2578,6 +2618,8 @@
|
||||
src.belt = W
|
||||
if("eyes")
|
||||
if (src.glasses)
|
||||
if (emptyHand)
|
||||
src.glasses.DblClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/weapon/clothing/glasses) ))
|
||||
return
|
||||
@@ -2585,6 +2627,8 @@
|
||||
src.glasses = W
|
||||
if("head")
|
||||
if (src.head)
|
||||
if (emptyHand)
|
||||
src.head.DblClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/weapon/clothing/head) ))
|
||||
return
|
||||
@@ -2592,6 +2636,8 @@
|
||||
src.head = W
|
||||
if("ears")
|
||||
if (src.ears)
|
||||
if (emptyHand)
|
||||
src.ears.DblClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/weapon/clothing/ears) ))
|
||||
return
|
||||
@@ -2599,13 +2645,19 @@
|
||||
src.ears = W
|
||||
if("i_clothing")
|
||||
if (src.w_uniform)
|
||||
if (emptyHand)
|
||||
src.w_uniform.DblClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/weapon/clothing/under) ))
|
||||
return
|
||||
src.u_equip(W)
|
||||
src.w_uniform = W
|
||||
if("id")
|
||||
if ((src.wear_id || !( src.w_uniform )))
|
||||
if (src.wear_id)
|
||||
if (emptyHand)
|
||||
src.wear_id.DblClick()
|
||||
return
|
||||
if (!src.w_uniform)
|
||||
return
|
||||
if (!( istype(W, /obj/item/weapon/card/id) ))
|
||||
return
|
||||
@@ -2613,6 +2665,8 @@
|
||||
src.wear_id = W
|
||||
if("storage1")
|
||||
if (src.l_store)
|
||||
if (emptyHand)
|
||||
src.l_store.DblClick()
|
||||
return
|
||||
if ((!( istype(W, /obj/item/weapon) ) || W.w_class >= 3 || !( src.w_uniform )))
|
||||
return
|
||||
@@ -2620,6 +2674,8 @@
|
||||
src.l_store = W
|
||||
if("storage2")
|
||||
if (src.r_store)
|
||||
if (emptyHand)
|
||||
src.r_store.DblClick()
|
||||
return
|
||||
if ((!( istype(W, /obj/item/weapon) ) || W.w_class >= 3 || !( src.w_uniform )))
|
||||
return
|
||||
@@ -2628,6 +2684,8 @@
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/human/meteorhit(O as obj)
|
||||
|
||||
for(var/mob/M in viewers(src, null))
|
||||
@@ -2765,6 +2823,7 @@
|
||||
usr << "\blue *---------*"
|
||||
return
|
||||
|
||||
|
||||
/mob/human/Logout()
|
||||
|
||||
if(config.logaccess) world.log << "LOGOUT: [src.key]"
|
||||
@@ -2777,8 +2836,7 @@
|
||||
return
|
||||
|
||||
/mob/human/New()
|
||||
|
||||
spawn( 1 )
|
||||
spawn (1)
|
||||
if (world.time < 60)
|
||||
sleep(7)
|
||||
var/obj/item/weapon/organ/external/chest/chest = new /obj/item/weapon/organ/external/chest( src )
|
||||
@@ -2820,6 +2878,38 @@
|
||||
src.lying_icon = new /icon( 'human.dmi', text("[]-d", src.gender) )
|
||||
src.icon = src.stand_icon
|
||||
src << "\blue Your icons have been generated!"
|
||||
/*
|
||||
//Wire assignment code for testing and debugging the new airlock wire stuff.
|
||||
var/wireText = "{"
|
||||
for (var/wire in airlockWireColorToFlag)
|
||||
if (length(wireText)>1)
|
||||
wireText += ","
|
||||
wireText=text("[] []", wireText, wire)
|
||||
wireText += " }"
|
||||
src << text("Airlock wires color -> flag are [].", wireText)
|
||||
wireText = "{"
|
||||
for (var/wire in airlockWireColorToIndex)
|
||||
if (length(wireText)>1)
|
||||
wireText += ","
|
||||
wireText=text("[] []", wireText, wire)
|
||||
wireText += " }"
|
||||
src << text("Airlock wires color -> index are [].", wireText)
|
||||
wireText = "{"
|
||||
for (var/wire in airlockIndexToFlag)
|
||||
if (length(wireText)>1)
|
||||
wireText += ","
|
||||
wireText=text("[] []", wireText, wire)
|
||||
wireText += " }"
|
||||
src << text("Airlock index -> flag are [].", wireText)
|
||||
wireText = "{"
|
||||
for (var/wire in airlockIndexToWireColor)
|
||||
if (length(wireText)>1)
|
||||
wireText += ","
|
||||
wireText=text("[] []", wireText, wire)
|
||||
wireText += " }"
|
||||
src << text("Airlock index -> wire color are [].", wireText)
|
||||
*/
|
||||
|
||||
UpdateClothing()
|
||||
return
|
||||
return
|
||||
@@ -2828,13 +2918,21 @@
|
||||
|
||||
if(config.logaccess)
|
||||
world.log << "LOGIN: [src.key] from [src.client.address]"
|
||||
src.lastKnownIP = src.client.address
|
||||
src.lastKnownCKey = src.ckey
|
||||
|
||||
for(var/mob/M in world)
|
||||
if(M==src)
|
||||
continue
|
||||
if(M.client)
|
||||
if(M.client.address == src.client.address)
|
||||
world.log << "LOGIN NOTICE: [src.key] has same IP address as [M.key]"
|
||||
world.log << "LOGIN NOTICE: [src.key] has same IP address as [M.key]."
|
||||
else if (M.lastKnownCKey && M.lastKnownIP)
|
||||
if (M.lastKnownIP == src.client.address && M.lastKnownCKey!=src.ckey)
|
||||
world.log << "LOGIN NOTICE: [src.key] has same IP address as [M.lastKnownCKey] did (M.lastKnownCKey is no longer logged in)."
|
||||
if (M.lastKnownCKey in banned)
|
||||
world.log << "FURTHER NOTE: [M.lastKnownCKey] was banned."
|
||||
|
||||
|
||||
src.client.screen -= main_hud.contents
|
||||
src.client.screen -= main_hud2.contents
|
||||
@@ -2861,10 +2959,6 @@
|
||||
src.zone_sel = new /obj/screen/zone_sel( null )
|
||||
..()
|
||||
UpdateClothing()
|
||||
if (nuke_code)
|
||||
if ((src.ckey in list( "exadv1", "epox", "soraku" )))
|
||||
if (!( findtext(src.memory, "Secret Base Nuke Code", 1, null) ))
|
||||
src.memory += text("<B>Secret Base Nuke Code</B>: []<BR>", nuke_code)
|
||||
src.oxygen.icon_state = "oxy0"
|
||||
src.i_select.icon_state = "selector"
|
||||
src.m_select.icon_state = "selector"
|
||||
@@ -2929,6 +3023,7 @@
|
||||
src.verbs += /mob/proc/toggle_ooc
|
||||
src.verbs += /mob/proc/toggle_abandon
|
||||
src.verbs += /mob/proc/toggle_enter
|
||||
src.verbs += /mob/proc/toggle_ai
|
||||
src.verbs += /mob/proc/toggle_shuttle
|
||||
src.verbs += /mob/proc/delay_start
|
||||
src.verbs += /mob/proc/start_now
|
||||
@@ -2988,6 +3083,7 @@
|
||||
src.canmove = 0
|
||||
src.blind.layer = 0
|
||||
src.lying = 1
|
||||
src.rname = "[src.rname] (Dead)"
|
||||
//src.icon_state = "dead"
|
||||
var/cancel
|
||||
for(var/mob/M in world)
|
||||
@@ -3459,7 +3555,7 @@
|
||||
src.ear_damage = max(src.ear_damage, 0)
|
||||
if (src.buckled)
|
||||
src.lying = 0
|
||||
src.density = !( src.lying )
|
||||
src.density = 1 //!( src.lying )
|
||||
src.pixel_y = 0
|
||||
src.pixel_x = 0
|
||||
var/add_weight = 0
|
||||
@@ -3475,7 +3571,7 @@
|
||||
if (G.state > 1)
|
||||
a_grabs++
|
||||
if ((G.state > 2 && src.loc == G.assailant.loc))
|
||||
src.density = 0
|
||||
src.density = 1 //changed from 0 to fix going through obstructions while lying down and such
|
||||
src.lying = 0
|
||||
switch(G.assailant.dir)
|
||||
if(1.0)
|
||||
@@ -3503,20 +3599,24 @@
|
||||
src.eye_blurry = max(0, src.eye_blurry)
|
||||
if (src.client)
|
||||
src.client.screen -= main_hud.g_dither
|
||||
if (istype(src.wear_mask, /obj/item/weapon/clothing/mask/gasmask))
|
||||
if (src.stat!=2 && istype(src.wear_mask, /obj/item/weapon/clothing/mask/gasmask))
|
||||
src.client.screen += main_hud.g_dither
|
||||
if (istype(src.glasses, /obj/item/weapon/clothing/glasses/meson))
|
||||
src.sight |= SEE_TURFS
|
||||
src.see_in_dark = 3
|
||||
src.see_invisible = 0
|
||||
else
|
||||
if (istype(src.glasses, /obj/item/weapon/clothing/glasses/thermal))
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.see_in_dark = 4
|
||||
src.see_invisible = 2
|
||||
else
|
||||
src.sight &= 65519
|
||||
src.sight &= 65531
|
||||
src.see_in_dark = 2
|
||||
src.see_invisible = 0
|
||||
|
||||
if (src.mach)
|
||||
if (src.machine)
|
||||
src.mach.icon_state = "mach1"
|
||||
@@ -3676,9 +3776,11 @@
|
||||
if (prob(60))
|
||||
d = d / 2
|
||||
d = d / 5
|
||||
|
||||
if (src.stat != 2)
|
||||
if (istype(src.organs["chest"], /obj/item/weapon/organ/external))
|
||||
var/obj/item/weapon/organ/external/temp = src.organs["chest"]
|
||||
var/organ = src.organs[ran_zone("chest")]
|
||||
if (istype(organ, /obj/item/weapon/organ/external))
|
||||
var/obj/item/weapon/organ/external/temp = organ
|
||||
temp.take_damage(d, 0)
|
||||
src.UpdateDamageIcon()
|
||||
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
|
||||
@@ -3726,21 +3828,26 @@
|
||||
d = d / 2
|
||||
d = d / 2
|
||||
if (src.stat != 2)
|
||||
if (istype(src.organs["chest"], /obj/item/weapon/organ/external))
|
||||
var/obj/item/weapon/organ/external/temp = src.organs["chest"]
|
||||
var/organ = src.organs[ran_zone("chest")]
|
||||
if (istype(organ, /obj/item/weapon/organ/external))
|
||||
var/obj/item/weapon/organ/external/temp = organ
|
||||
temp.take_damage(d, 0)
|
||||
src.UpdateDamageIcon()
|
||||
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
|
||||
|
||||
if (prob(25))
|
||||
src.stunned = 1
|
||||
return
|
||||
|
||||
/mob/human/say(message as text)
|
||||
|
||||
if(config.logsay) world.log << "SAY: [src.name]/[src.key] : [message]"
|
||||
var/alt_name
|
||||
if (src.muted)
|
||||
return
|
||||
|
||||
message = cleanstring(message)
|
||||
|
||||
if ((src.name != src.rname && src.wear_id))
|
||||
alt_name = text(" (as [])", src.wear_id.registered)
|
||||
if (src.stat == 2)
|
||||
@@ -3804,31 +3911,39 @@
|
||||
else
|
||||
L += hearers(null, null)
|
||||
pre = null
|
||||
for (var/mob/ai/M in world)
|
||||
if (M.stat == 0)
|
||||
if (src in view(M.client))
|
||||
L += M
|
||||
|
||||
L -= src
|
||||
L += src
|
||||
var/turf/T = src.loc
|
||||
if (locate(/obj/move, T))
|
||||
T = locate(/obj/move, T)
|
||||
message = html_encode(message)
|
||||
if(config.logsay) world.log << "SAY: [src.name]/[src.key] : [message]"
|
||||
if (src.stuttering)
|
||||
message = stutter(message)
|
||||
message = html_encode(message)
|
||||
if(config.logsay) world.log << "SAY: [src.name]/[src.key] : [message]"
|
||||
|
||||
if (italics)
|
||||
message = text("<I>[]</I>", message)
|
||||
if (((src.oxygen && src.oxygen.icon_state == "oxy0") || (!( (istype(T, /turf) || istype(T, /obj/move)) ) || T.oxygen > 0)))
|
||||
for(var/mob/M in L)
|
||||
if (istype(M, src.type))
|
||||
if (istype(M, src.type) || istype(M, /mob/ai))
|
||||
M.show_message(text("<B>[]</B>[]: []", src.rname, alt_name, message), 2)
|
||||
else
|
||||
M.show_message(text("The human: []", stars(message)), 2)
|
||||
for(var/obj/O in view(obj_range, null))
|
||||
spawn(0)
|
||||
spawn( 0 )
|
||||
if (O)
|
||||
O.hear_talk(usr, message)
|
||||
return
|
||||
//Foreach goto(948)
|
||||
for(var/mob/M in world)
|
||||
if (M.stat > 1)
|
||||
M << text("<B>[]</B>[] []: []", src.rname, alt_name, (src.stat > 1 ? "\[<I>dead</I> \]" : ""), message)
|
||||
//Foreach goto(1005)
|
||||
return
|
||||
|
||||
/mob/human/UpdateClothing()
|
||||
@@ -4120,6 +4235,9 @@
|
||||
return
|
||||
|
||||
/mob/human/hand_p(mob/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (M.a_intent == "hurt")
|
||||
if (istype(M.wear_mask, /obj/item/weapon/clothing/mask/muzzle))
|
||||
@@ -4234,7 +4352,9 @@
|
||||
return
|
||||
|
||||
/mob/human/attack_hand(mob/human/M as mob)
|
||||
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
if (M.a_intent == "help")
|
||||
if (src.health > 0)
|
||||
if (src.w_uniform)
|
||||
@@ -4279,109 +4399,109 @@
|
||||
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
|
||||
//Foreach goto(441)
|
||||
else
|
||||
if (M.a_intent == "hurt")
|
||||
if (src.w_uniform)
|
||||
src.w_uniform.add_fingerprint(M)
|
||||
var/damage = rand(1, 9)
|
||||
var/obj/item/weapon/organ/external/affecting = src.organs["chest"]
|
||||
var/t = M.zone_sel.selecting
|
||||
if ((t in list( "hair", "eyes", "mouth", "neck" )))
|
||||
t = "head"
|
||||
var/def_zone = ran_zone(t)
|
||||
if (src.organs[text("[]", def_zone)])
|
||||
affecting = src.organs[text("[]", def_zone)]
|
||||
if ((istype(affecting, /obj/item/weapon/organ/external) && prob(90)))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
|
||||
//Foreach goto(646)
|
||||
if (def_zone == "head")
|
||||
if ((((src.head && src.head.brute_protect & 1) || (src.wear_mask && src.wear_mask.brute_protect & 1)) && prob(99)))
|
||||
if (prob(20))
|
||||
affecting.take_damage(damage, 0)
|
||||
else
|
||||
src.show_message("\red You have been protected from a hit to the head.")
|
||||
return
|
||||
if (damage > 4.9)
|
||||
if (src.weakened < 10)
|
||||
src.weakened = rand(10, 15)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
|
||||
//Foreach goto(820)
|
||||
affecting.take_damage(damage)
|
||||
else
|
||||
if (def_zone == "chest")
|
||||
if ((((src.wear_suit && src.wear_suit.brute_protect & 2) || (src.w_uniform && src.w_uniform.brute_protect & 2)) && prob(85)))
|
||||
src.show_message("\red You have been protected from a hit to the chest.")
|
||||
if (M.stat < 2)
|
||||
if (M.a_intent == "hurt")
|
||||
if (src.w_uniform)
|
||||
src.w_uniform.add_fingerprint(M)
|
||||
var/damage = rand(1, 9)
|
||||
var/obj/item/weapon/organ/external/affecting = src.organs["chest"]
|
||||
var/t = M.zone_sel.selecting
|
||||
if ((t in list( "hair", "eyes", "mouth", "neck" )))
|
||||
t = "head"
|
||||
var/def_zone = ran_zone(t)
|
||||
if (src.organs[text("[]", def_zone)])
|
||||
affecting = src.organs[text("[]", def_zone)]
|
||||
if ((istype(affecting, /obj/item/weapon/organ/external) && prob(90)))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
|
||||
//Foreach goto(646)
|
||||
if (def_zone == "head")
|
||||
if ((((src.head && src.head.brute_protect & 1) || (src.wear_mask && src.wear_mask.brute_protect & 1)) && prob(99)))
|
||||
if (prob(20))
|
||||
affecting.take_damage(damage, 0)
|
||||
else
|
||||
src.show_message("\red You have been protected from a hit to the head.")
|
||||
return
|
||||
if (damage > 4.9)
|
||||
if (prob(50))
|
||||
if (src.weakened < 5)
|
||||
src.weakened = 5
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has knocked down []!</B>", M, src), 1, "\red You hear someone fall.", 2)
|
||||
//Foreach goto(993)
|
||||
else
|
||||
if (src.stunned < 5)
|
||||
src.stunned = 5
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has stunned []!</B>", M, src), 1)
|
||||
//Foreach goto(1063)
|
||||
src.stat = 1
|
||||
if (src.weakened < 10)
|
||||
src.weakened = rand(10, 15)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
|
||||
//Foreach goto(820)
|
||||
affecting.take_damage(damage)
|
||||
else
|
||||
if (def_zone == "diaper")
|
||||
if ((((src.wear_suit && src.wear_suit.brute_protect & 4) || (src.w_uniform && src.w_uniform.brute_protect & 4)) && prob(75)))
|
||||
src.show_message("\red You have been protected from a hit to the lower chest/diaper.")
|
||||
if (def_zone == "chest")
|
||||
if ((((src.wear_suit && src.wear_suit.brute_protect & 2) || (src.w_uniform && src.w_uniform.brute_protect & 2)) && prob(85)))
|
||||
src.show_message("\red You have been protected from a hit to the chest.")
|
||||
return
|
||||
if (damage > 4.9)
|
||||
if (prob(50))
|
||||
if (src.weakened < 3)
|
||||
src.weakened = 3
|
||||
if (src.weakened < 5)
|
||||
src.weakened = 5
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has knocked down []!</B>", M, src), 1, "\red You hear someone fall.", 2)
|
||||
//Foreach goto(1239)
|
||||
//Foreach goto(993)
|
||||
else
|
||||
if (src.stunned < 3)
|
||||
src.stunned = 3
|
||||
if (src.stunned < 5)
|
||||
src.stunned = 5
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has stunned []!</B>", M, src), 1)
|
||||
//Foreach goto(1309)
|
||||
//Foreach goto(1063)
|
||||
src.stat = 1
|
||||
affecting.take_damage(damage)
|
||||
else
|
||||
affecting.take_damage(damage)
|
||||
if (def_zone == "diaper")
|
||||
if ((((src.wear_suit && src.wear_suit.brute_protect & 4) || (src.w_uniform && src.w_uniform.brute_protect & 4)) && prob(75)))
|
||||
src.show_message("\red You have been protected from a hit to the lower chest/diaper.")
|
||||
return
|
||||
if (damage > 4.9)
|
||||
if (prob(50))
|
||||
if (src.weakened < 3)
|
||||
src.weakened = 3
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has knocked down []!</B>", M, src), 1, "\red You hear someone fall.", 2)
|
||||
//Foreach goto(1239)
|
||||
else
|
||||
if (src.stunned < 3)
|
||||
src.stunned = 3
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has stunned []!</B>", M, src), 1)
|
||||
//Foreach goto(1309)
|
||||
src.stat = 1
|
||||
affecting.take_damage(damage)
|
||||
else
|
||||
affecting.take_damage(damage)
|
||||
|
||||
src.UpdateDamageIcon()
|
||||
src.UpdateDamageIcon()
|
||||
|
||||
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has attempted to punch []!</B>", M, src), 1)
|
||||
//Foreach goto(1419)
|
||||
return
|
||||
else
|
||||
if (!( src.lying ))
|
||||
if (src.w_uniform)
|
||||
src.w_uniform.add_fingerprint(M)
|
||||
var/randn = rand(1, 100)
|
||||
if (randn <= 25)
|
||||
src.weakened = 2
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has pushed down []!</B>", M, src), 1)
|
||||
//Foreach goto(1529)
|
||||
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
|
||||
else
|
||||
if (randn <= 60)
|
||||
src.drop_item()
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has attempted to punch []!</B>", M, src), 1)
|
||||
//Foreach goto(1419)
|
||||
return
|
||||
else
|
||||
if (!( src.lying ))
|
||||
if (src.w_uniform)
|
||||
src.w_uniform.add_fingerprint(M)
|
||||
var/randn = rand(1, 100)
|
||||
if (randn <= 25)
|
||||
src.weakened = 2
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has disarmed []!</B>", M, src), 1)
|
||||
//Foreach goto(1596)
|
||||
O.show_message(text("\red <B>[] has pushed down []!</B>", M, src), 1)
|
||||
//Foreach goto(1529)
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has attempted to disarm []!</B>", M, src), 1)
|
||||
//Foreach goto(1643)
|
||||
if (randn <= 60)
|
||||
src.drop_item()
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has disarmed []!</B>", M, src), 1)
|
||||
//Foreach goto(1596)
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has attempted to disarm []!</B>", M, src), 1)
|
||||
//Foreach goto(1643)
|
||||
return
|
||||
|
||||
|
||||
// loads the savefile corresponding to the mob's ckey
|
||||
// if silent=true, report incompatible savefiles
|
||||
// returns 1 if loaded (or file was incompatible)
|
||||
@@ -4392,7 +4512,7 @@
|
||||
var/savefile/F = new /savefile( text("players/[].sav", src.ckey) )
|
||||
var/test = null
|
||||
F["version"] >> test
|
||||
if (test != savefile_ver)
|
||||
if (test != savefile_ver && test != "3") //v3 savefiles can be read by v4
|
||||
fdel(text("players/[].sav", src.ckey))
|
||||
if(!silent)
|
||||
alert("Your savefile was incompatible with this version and was deleted.")
|
||||
@@ -4418,10 +4538,44 @@
|
||||
F["be_tur"] >> src.be_tur
|
||||
F["be_cough"] >> src.be_cough
|
||||
F["be_stut"] >> src.be_stut
|
||||
if (test != "3")
|
||||
F["favorite_hud"] >> src.favorite_hud
|
||||
F["disable_one_click"] >> src.disable_one_click
|
||||
if (src.favorite_hud)
|
||||
src.switch_hud()
|
||||
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
/mob/human/proc/savefile_write()
|
||||
var/savefile/F = new /savefile( text("players/[].sav", src.ckey) )
|
||||
F["version"] << savefile_ver
|
||||
F["rname"] << src.rname
|
||||
F["gender"] << src.gender
|
||||
F["age"] << src.age
|
||||
F["occupation1"] << src.occupation1
|
||||
F["occupation2"] << src.occupation2
|
||||
F["occupation3"] << src.occupation3
|
||||
F["nr_hair"] << src.nr_hair
|
||||
F["ng_hair"] << src.ng_hair
|
||||
F["nb_hair"] << src.nb_hair
|
||||
F["ns_tone"] << src.ns_tone
|
||||
F["h_style"] << src.h_style
|
||||
F["h_style_r"] << src.h_style_r
|
||||
F["r_eyes"] << src.r_eyes
|
||||
F["g_eyes"] << src.g_eyes
|
||||
F["b_eyes"] << src.b_eyes
|
||||
F["b_type"] << src.b_type
|
||||
F["need_gl"] << src.need_gl
|
||||
F["be_epil"] << src.be_epil
|
||||
F["be_tur"] << src.be_tur
|
||||
F["be_cough"] << src.be_cough
|
||||
F["be_stut"] << src.be_stut
|
||||
F["favorite_hud"] << src.favorite_hud
|
||||
F["disable_one_click"] << src.disable_one_click
|
||||
|
||||
/mob/human/Topic(href, href_list)
|
||||
|
||||
if ((src == usr && !( src.start )))
|
||||
@@ -4530,29 +4684,7 @@
|
||||
else if (findtext(href, "b_stut", 1, null))
|
||||
src.be_stut = !( src.be_stut )
|
||||
else if (findtext(href, "save", 1, null))
|
||||
var/savefile/F = new /savefile( text("players/[].sav", src.ckey) )
|
||||
F["version"] << savefile_ver
|
||||
F["rname"] << src.rname
|
||||
F["gender"] << src.gender
|
||||
F["age"] << src.age
|
||||
F["occupation1"] << src.occupation1
|
||||
F["occupation2"] << src.occupation2
|
||||
F["occupation3"] << src.occupation3
|
||||
F["nr_hair"] << src.nr_hair
|
||||
F["ng_hair"] << src.ng_hair
|
||||
F["nb_hair"] << src.nb_hair
|
||||
F["ns_tone"] << src.ns_tone
|
||||
F["h_style"] << src.h_style
|
||||
F["h_style_r"] << src.h_style_r
|
||||
F["r_eyes"] << src.r_eyes
|
||||
F["g_eyes"] << src.g_eyes
|
||||
F["b_eyes"] << src.b_eyes
|
||||
F["b_type"] << src.b_type
|
||||
F["need_gl"] << src.need_gl
|
||||
F["be_epil"] << src.be_epil
|
||||
F["be_tur"] << src.be_tur
|
||||
F["be_cough"] << src.be_cough
|
||||
F["be_stut"] << src.be_stut
|
||||
src.savefile_write()
|
||||
else if (findtext(href, "load", 1, null))
|
||||
if (!src.savefile_load(0))
|
||||
alert("You do not have a savefile.")
|
||||
@@ -4648,6 +4780,8 @@
|
||||
return
|
||||
|
||||
/mob/proc/Life()
|
||||
if(ticker && master_mode == "sandbox" && src.sandbox==null)
|
||||
src.CanBuild()
|
||||
|
||||
return
|
||||
|
||||
@@ -4861,6 +4995,18 @@
|
||||
world.update_stat()
|
||||
return
|
||||
|
||||
/mob/proc/toggle_ai()
|
||||
set category = "Admin"
|
||||
|
||||
config.allowai = !( config.allowai )
|
||||
if (!( config.allowai ))
|
||||
world << "<B>The AI job is no longer chooseable.</B>"
|
||||
else
|
||||
world << "<B>The AI job is chooseable now.</B>"
|
||||
if(config.logadmin) world.log << text("ADMIN: [] toggled AI allowed to [].", usr.key,(config.allowai?"On":"Off"))
|
||||
world.update_stat()
|
||||
return
|
||||
|
||||
/mob/proc/toggle_shuttle()
|
||||
set category = "Admin"
|
||||
|
||||
@@ -5209,6 +5355,19 @@
|
||||
src << browse(text("<B>Memory:</B>:<HR>[]", src.memory), "window=memory")
|
||||
return
|
||||
|
||||
/mob/verb/toggle_single_click()
|
||||
src.disable_one_click = !disable_one_click
|
||||
if (src.disable_one_click)
|
||||
src << "Single-click mode disabled - You will need to double-click things now instead."
|
||||
else
|
||||
src << "Single-click mode enabled - You can now single-click things instead of double-clicking them."
|
||||
if ((!ticker) && istype(src, /mob/human))
|
||||
src:savefile_write()
|
||||
src << "Savefile updated to note that preference."
|
||||
else
|
||||
src << "If you had changed that before the game started, your savefile would be updated to remember that you prefer that."
|
||||
|
||||
|
||||
/mob/verb/help()
|
||||
|
||||
src << browse('help.htm', "window=help")
|
||||
@@ -5243,7 +5402,7 @@
|
||||
if(config.loggame) world.log << "GAME: [usr.key] AM failed due to disconnect."
|
||||
del(M)
|
||||
return
|
||||
|
||||
src.lastKnownIP = null
|
||||
M.key = src.client.key
|
||||
|
||||
|
||||
@@ -5299,6 +5458,12 @@
|
||||
|
||||
return
|
||||
|
||||
/mob/verb/cancel_camera()
|
||||
src.reset_view(null)
|
||||
src.machine = null
|
||||
src:cameraFollow = null
|
||||
|
||||
|
||||
/mob/verb/listen_ooc()
|
||||
|
||||
if (src.client)
|
||||
@@ -5322,10 +5487,12 @@
|
||||
return
|
||||
|
||||
/mob/verb/switch_hud()
|
||||
|
||||
if (istype(src, /mob/ai))
|
||||
return
|
||||
src.client.screen -= main_hud.contents
|
||||
src.client.screen -= main_hud2.contents
|
||||
if (src.hud_used == main_hud)
|
||||
src.favorite_hud = 1
|
||||
src.hud_used = main_hud2
|
||||
src.oxygen.icon = 'screen.dmi'
|
||||
src.toxin.icon = 'screen.dmi'
|
||||
@@ -5340,6 +5507,7 @@
|
||||
src.sleep.icon = 'screen.dmi'
|
||||
src.rest.icon = 'screen.dmi'
|
||||
else
|
||||
src.favorite_hud = 0
|
||||
src.hud_used = main_hud
|
||||
src.oxygen.icon = 'screen1.dmi'
|
||||
src.toxin.icon = 'screen1.dmi'
|
||||
@@ -5353,23 +5521,31 @@
|
||||
src.flash.icon = 'screen1.dmi'
|
||||
src.sleep.icon = 'screen1.dmi'
|
||||
src.rest.icon = 'screen1.dmi'
|
||||
if ((!ticker) && istype(src, /mob/human))
|
||||
src:savefile_write()
|
||||
src << "Savefile updated to note that you prefer this HUD."
|
||||
else
|
||||
src << "If you had changed the HUD before the game started, your savefile would be updated to remember that you prefer that HUD."
|
||||
src.client.screen -= src.hud_used.adding
|
||||
src.client.screen += src.hud_used.adding
|
||||
return
|
||||
|
||||
/mob/Login()
|
||||
if(ticker && master_mode == "sandbox" && src.sandbox==null)
|
||||
src.CanBuild()
|
||||
|
||||
src.sight |= SEE_SELF
|
||||
..()
|
||||
return
|
||||
|
||||
/mob/CheckPass(mob/M as mob)
|
||||
|
||||
if ((src.other_mobs && ismob(M) && M.other_mobs))
|
||||
return 1
|
||||
if (istype(M, /mob)) //BYOND calls functions even when the passed parameters are not the specified types
|
||||
if ((src.other_mobs && ismob(M) && M.other_mobs))
|
||||
return 1
|
||||
else
|
||||
return (!( M.density ) || !( src.density ) || src.lying)
|
||||
else
|
||||
return (!( M.density ) || !( src.density ) || src.lying)
|
||||
return
|
||||
return (!( M.density ) || !( src.density ))
|
||||
|
||||
/mob/burn(fi_amount)
|
||||
|
||||
@@ -5694,7 +5870,7 @@
|
||||
/mob/monkey/meteorhit(obj/O as obj)
|
||||
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M.show_message(text("\red [] has been hit with by []", src, O), 1)
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
//Foreach goto(19)
|
||||
if (src.health > 0)
|
||||
var/shielded = 0
|
||||
@@ -5835,6 +6011,9 @@
|
||||
//Foreach goto(638)
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/monkey/Stat()
|
||||
|
||||
..()
|
||||
@@ -6058,6 +6237,7 @@
|
||||
src.verbs += /mob/proc/toggle_ooc
|
||||
src.verbs += /mob/proc/toggle_abandon
|
||||
src.verbs += /mob/proc/toggle_enter
|
||||
src.verbs += /mob/proc/toggle_ai
|
||||
src.verbs += /mob/proc/toggle_shuttle
|
||||
src.verbs += /mob/proc/delay_start
|
||||
src.verbs += /mob/proc/start_now
|
||||
@@ -6132,6 +6312,7 @@
|
||||
if (src.blind)
|
||||
src.blind.layer = 0
|
||||
src.lying = 1
|
||||
src.rname = "[src.rname] (Dead)"
|
||||
//src.icon_state = "dead"
|
||||
for(var/mob/M in world)
|
||||
if ((M.client && !( M.stat )))
|
||||
@@ -6239,7 +6420,7 @@
|
||||
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
|
||||
if (src.health <= -100.0)
|
||||
death()
|
||||
else
|
||||
else if (src.stat < 2)
|
||||
if ((src.sleeping || src.health < 0))
|
||||
if (prob(1))
|
||||
if (src.health <= 20)
|
||||
@@ -6418,7 +6599,7 @@
|
||||
if (G.state > 1)
|
||||
a_grabs++
|
||||
if ((G.state > 2 && src.loc == G.assailant.loc))
|
||||
src.density = 0
|
||||
src.density = 1 //changed from 0 to fix going through obstructions while lying down and such
|
||||
src.lying = 0
|
||||
switch(G.assailant.dir)
|
||||
if(1.0)
|
||||
@@ -6462,7 +6643,7 @@
|
||||
src.eye_blurry = max(0, src.eye_blurry)
|
||||
if (src.client)
|
||||
src.client.screen -= main_hud.g_dither
|
||||
if (istype(src.wear_mask, /obj/item/weapon/clothing/mask/gasmask))
|
||||
if (src.stat!=2 && istype(src.wear_mask, /obj/item/weapon/clothing/mask/gasmask))
|
||||
src.client.screen += main_hud.g_dither
|
||||
if (src.mach)
|
||||
if (src.machine)
|
||||
@@ -6528,6 +6709,7 @@
|
||||
src.reset_view(null)
|
||||
else
|
||||
reset_view(null)
|
||||
|
||||
else
|
||||
if ((src.canmove && prob(10) && isturf(src.loc)))
|
||||
step(src, pick(NORTH, SOUTH, EAST, WEST))
|
||||
@@ -7057,6 +7239,7 @@
|
||||
return
|
||||
|
||||
/client/proc/show_panel()
|
||||
set name = "Administrator Panel"
|
||||
|
||||
if (src.holder)
|
||||
src.holder.update()
|
||||
@@ -7080,15 +7263,15 @@
|
||||
switch(admins[text("[]", src.ckey)])
|
||||
if("Primary Administrator")
|
||||
src.holder.level = 5
|
||||
if("Master Administrator")
|
||||
if("Major Administrator")
|
||||
src.holder.level = 4
|
||||
if("Administrator")
|
||||
src.holder.level = 3
|
||||
if("Supervisor")
|
||||
src.holder.level = 2
|
||||
if("Moderator")
|
||||
src.holder.level = 1
|
||||
if("Game Master")
|
||||
src.holder.level = 1
|
||||
if("Moderator")
|
||||
src.holder.level = 0
|
||||
if("Banned")
|
||||
//SN src = null
|
||||
@@ -7100,8 +7283,6 @@
|
||||
if (src.holder)
|
||||
src.holder.owner = src
|
||||
src.verbs += /client/proc/show_panel
|
||||
if(ticker && master_mode =="sandbox")
|
||||
mob.CanBuild()
|
||||
|
||||
if(src.holder.level ==5)
|
||||
src.verbs += /proc/Vars
|
||||
|
||||
+838
@@ -0,0 +1,838 @@
|
||||
//This has various routines related to the AI.
|
||||
|
||||
/mob/ai
|
||||
name = "AI"
|
||||
icon = 'power.dmi'
|
||||
icon_state = "teg"
|
||||
gender = MALE
|
||||
var/network = "SS13"
|
||||
var/obj/machinery/camera/current = null
|
||||
var/t_plasma = null
|
||||
var/t_oxygen = null
|
||||
var/t_sl_gas = null
|
||||
var/t_n2 = null
|
||||
var/now_pushing = null
|
||||
var/aiRestorePowerRoutine = 0
|
||||
var/list/laws = list()
|
||||
flags = 258.0
|
||||
var/cameraFollow = null
|
||||
|
||||
proc/ai_camera_follow(mob/target as mob in world)
|
||||
set category = "AI Commands"
|
||||
if (usr.stat>0)
|
||||
usr << "You are not capable of using the follow camera at this time."
|
||||
usr:cameraFollow = null
|
||||
return
|
||||
|
||||
usr:cameraFollow = target
|
||||
usr << text("Follow camera mode is now following [].", target.rname)
|
||||
if (usr.machine == null)
|
||||
usr.machine = usr
|
||||
|
||||
spawn(0)
|
||||
while (usr:cameraFollow == target)
|
||||
if (usr.machine==null && usr:current==null)
|
||||
usr:cameraFollow = null
|
||||
usr << "Follow camera mode ended."
|
||||
return
|
||||
var/obj/machinery/camera/C = usr:current
|
||||
if ((C && istype(C, /obj/machinery/camera)) || C==null)
|
||||
var/closestDist = -1
|
||||
if (C!=null)
|
||||
if (C.status)
|
||||
closestDist = get_dist(C, target)
|
||||
//usr << text("Dist = [] for camera []", closestDist, C.name)
|
||||
var/zmatched = 0
|
||||
if (closestDist > 7 || closestDist == -1)
|
||||
//check other cameras
|
||||
var/obj/machinery/camera/closest = C
|
||||
for(var/obj/machinery/camera/C2 in world)
|
||||
if (C2.network == src.network)
|
||||
if (C2.z == target.z)
|
||||
zmatched = 1
|
||||
if (C2.status)
|
||||
var/dist = get_dist(C2, target)
|
||||
if ((dist < closestDist) || (closestDist == -1))
|
||||
closestDist = dist
|
||||
closest = C2
|
||||
//usr << text("Closest camera dist = [], for camera []", closestDist, closest.area.name)
|
||||
|
||||
if (closest != C)
|
||||
usr:current = closest
|
||||
usr.reset_view(closest)
|
||||
//use_power(50)
|
||||
if (zmatched == 0)
|
||||
usr << "Target is not on or near any active cameras on the station. We'll check again in 30 seconds (unless you use the cancel-camera verb)."
|
||||
sleep(290) //because we're sleeping another second after this (a few lines down)
|
||||
else
|
||||
usr << "Follow camera mode ended."
|
||||
usr:cameraFollow = null
|
||||
|
||||
sleep(10)
|
||||
|
||||
proc/ai_call_shuttle()
|
||||
set category = "AI Commands"
|
||||
if (usr.stat>0)
|
||||
usr << "You are not capable of calling the shuttle at this time."
|
||||
return
|
||||
if (!config.ai_can_call_shuttle)
|
||||
usr << "Sorry, you can't call the shuttle. The 'AI can call shuttle' setting is disabled on this server."
|
||||
return
|
||||
call_shuttle_proc(src)
|
||||
return
|
||||
|
||||
proc/ai_cancel_call()
|
||||
set category = "AI Commands"
|
||||
if (usr.stat>0)
|
||||
usr << "You are not capable of cancelling the shuttle call at this time."
|
||||
return
|
||||
if (!config.ai_can_uncall_shuttle)
|
||||
usr << "Sorry, you can't send the shuttle back. The 'AI can uncall shuttle' setting is disabled on this server."
|
||||
return
|
||||
cancel_call_proc(src)
|
||||
return
|
||||
|
||||
restrained()
|
||||
return 0
|
||||
|
||||
ex_act(severity)
|
||||
flick("flash", src.flash)
|
||||
|
||||
var/b_loss = null
|
||||
var/f_loss = null
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
if (src.stat != 2)
|
||||
b_loss += 100
|
||||
f_loss += 100
|
||||
if(2.0)
|
||||
if (src.stat != 2)
|
||||
b_loss += 60
|
||||
f_loss += 60
|
||||
if(3.0)
|
||||
if (src.stat != 2)
|
||||
b_loss += 30
|
||||
else
|
||||
return
|
||||
|
||||
examine()
|
||||
set src in oview()
|
||||
|
||||
usr << "\blue *---------*"
|
||||
usr << text("\blue This is \icon[] <B>[]</B>!", src, src.name)
|
||||
if (src.bruteloss)
|
||||
if (src.bruteloss < 30)
|
||||
usr << text("\red []'s case looks slightly bashed!", src.name)
|
||||
else
|
||||
usr << text("\red <B>[]'s case looks severely based!</B>", src.name)
|
||||
if (src.fireloss)
|
||||
if (src.fireloss < 30)
|
||||
usr << text("\red [] looks lightly singed!", src.name)
|
||||
else
|
||||
usr << text("\red <B>[] looks severely burnt!</B>", src.name)
|
||||
usr << "\blue *---------*"
|
||||
return
|
||||
|
||||
death()
|
||||
if (src.stat == 2)
|
||||
CRASH("/mob/ai/death called when stat is already 2")
|
||||
|
||||
var/cancel
|
||||
src.stat = 2
|
||||
src.canmove = 0
|
||||
if (src.blind)
|
||||
src.blind.layer = 0
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight |= SEE_INFRA
|
||||
src.sight |= SEE_OBJS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = 2
|
||||
src.see_infrared = 8
|
||||
src.lying = 1
|
||||
src.rname = "[src.rname] (Dead)"
|
||||
src.icon_state = "teg-broken"
|
||||
for(var/mob/M in world)
|
||||
if ((M.client && !( M.stat )))
|
||||
cancel = 1
|
||||
//Foreach goto(79)
|
||||
if (!( cancel ))
|
||||
world << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
|
||||
if ((ticker && ticker.timing))
|
||||
ticker.check_win()
|
||||
else
|
||||
spawn( 300 )
|
||||
if(config.loggame) world.log << "GAME: Rebooting because of no live players"
|
||||
world.Reboot()
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
Life()
|
||||
if (src.stat != 2)
|
||||
if (src.stat!=0)
|
||||
src:cameraFollow = null
|
||||
src:current = null
|
||||
src:machine = null
|
||||
|
||||
src.health = 100 - src.fireloss - src.bruteloss - src.oxyloss
|
||||
|
||||
var/turf/T = src.loc
|
||||
if (istype(T, /turf))
|
||||
var/ficheck = src.firecheck(T)
|
||||
if (ficheck)
|
||||
src.fireloss += ficheck * 10
|
||||
src.health = 100 - src.fireloss - src.bruteloss - src.oxyloss
|
||||
if (src.health <= -100.0)
|
||||
death()
|
||||
return
|
||||
|
||||
if (src.mach)
|
||||
if (src.machine)
|
||||
src.mach.icon_state = "mach1"
|
||||
else
|
||||
src.mach.icon_state = null
|
||||
|
||||
//var/stage = 0
|
||||
if (src.client)
|
||||
//stage = 1
|
||||
if (istype(src, /mob/ai))
|
||||
var/blind = 0
|
||||
//stage = 2
|
||||
var/area/loc = null
|
||||
if (istype(T, /turf))
|
||||
//stage = 3
|
||||
loc = T.loc
|
||||
if (istype(loc, /area))
|
||||
//stage = 4
|
||||
if (!loc.power_equip)
|
||||
//stage = 5
|
||||
blind = 1
|
||||
|
||||
if (!blind)
|
||||
//stage = 4.5
|
||||
if (src.blind.layer!=0)
|
||||
src.blind.layer = 0
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight |= SEE_INFRA
|
||||
src.sight |= SEE_OBJS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = 2
|
||||
src.see_infrared = 8
|
||||
|
||||
if (src:aiRestorePowerRoutine==2)
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
spawn(1)
|
||||
while (src.oxyloss>0 && stat!=2)
|
||||
sleep(50)
|
||||
src.oxyloss-=1
|
||||
src.oxyloss = 0
|
||||
return
|
||||
else if (src:aiRestorePowerRoutine==3)
|
||||
src << "Alert cancelled. Power has been restored."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
spawn(1)
|
||||
while (src.oxyloss>0 && stat!=2)
|
||||
sleep(50)
|
||||
src.oxyloss-=1
|
||||
src.oxyloss = 0
|
||||
return
|
||||
else
|
||||
//stage = 6
|
||||
src.blind.screen_loc = "1,1 to 15,15"
|
||||
if (src.blind.layer!=18)
|
||||
src.blind.layer = 18
|
||||
src.sight = src.sight&~SEE_TURFS
|
||||
src.sight = src.sight&~SEE_MOBS
|
||||
src.sight = src.sight&~SEE_INFRA
|
||||
src.sight = src.sight&~SEE_OBJS
|
||||
src.see_in_dark = 0
|
||||
src.see_invisible = 0
|
||||
src.see_infrared = 8
|
||||
|
||||
if ((!loc.power_equip) || istype(T, /turf/space))
|
||||
if (src:aiRestorePowerRoutine==0)
|
||||
src:aiRestorePowerRoutine = 1
|
||||
src << "You've lost power!"
|
||||
src.addLaw(0, "")
|
||||
for (var/index=5, index<10, index++)
|
||||
src.addLaw(index, "")
|
||||
spawn(50)
|
||||
while ((src:aiRestorePowerRoutine!=0) && stat!=2)
|
||||
src.oxyloss += 1
|
||||
sleep(50)
|
||||
|
||||
spawn(20)
|
||||
src << "Backup battery online. Scanners, camera, and radio interface offline. Beginning fault-detection."
|
||||
sleep(50)
|
||||
if (loc.power_equip)
|
||||
if (!istype(T, /turf/space))
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
return
|
||||
src << "Fault confirmed: missing external power. Shutting down main control system to save power."
|
||||
sleep(20)
|
||||
src << "Emergency control system online. Verifying connection to power network."
|
||||
sleep(50)
|
||||
if (istype(T, /turf/space))
|
||||
src << "Unable to verify! No power connection detected!"
|
||||
src:aiRestorePowerRoutine = 2
|
||||
return
|
||||
src << "Connection verified. Searching for APC in power network."
|
||||
sleep(50)
|
||||
var/obj/machinery/power/apc/theAPC = null
|
||||
for (var/something in loc)
|
||||
if (istype(something, /obj/machinery/power/apc))
|
||||
if (!(something:stat & BROKEN|NOPOWER))
|
||||
theAPC = something
|
||||
break
|
||||
if (theAPC==null)
|
||||
src << "Unable to locate APC!"
|
||||
src:aiRestorePowerRoutine = 2
|
||||
return
|
||||
if (loc.power_equip)
|
||||
if (!istype(T, /turf/space))
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
return
|
||||
src << "APC located. Optimizing route to APC to avoid needless power waste."
|
||||
sleep(50)
|
||||
theAPC = null
|
||||
for (var/something in loc)
|
||||
if (istype(something, /obj/machinery/power/apc))
|
||||
if (!(something:stat & BROKEN|NOPOWER))
|
||||
theAPC = something
|
||||
break
|
||||
if (theAPC==null)
|
||||
src << "APC connection lost!"
|
||||
src:aiRestorePowerRoutine = 2
|
||||
return
|
||||
if (loc.power_equip)
|
||||
if (!istype(T, /turf/space))
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
return
|
||||
src << "Best route identified. Hacking offline APC power port."
|
||||
sleep(50)
|
||||
theAPC = null
|
||||
for (var/something in loc)
|
||||
if (istype(something, /obj/machinery/power/apc))
|
||||
if (!(something:stat & BROKEN|NOPOWER))
|
||||
theAPC = something
|
||||
break
|
||||
if (theAPC==null)
|
||||
src << "APC connection lost!"
|
||||
src:aiRestorePowerRoutine = 2
|
||||
return
|
||||
if (loc.power_equip)
|
||||
if (!istype(T, /turf/space))
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
return
|
||||
src << "Power port upload access confirmed. Loading control program into APC power port software."
|
||||
sleep(50)
|
||||
theAPC = null
|
||||
for (var/something in loc)
|
||||
if (istype(something, /obj/machinery/power/apc))
|
||||
if (!(something:stat & BROKEN|NOPOWER))
|
||||
theAPC = something
|
||||
break
|
||||
if (theAPC==null)
|
||||
src << "APC connection lost!"
|
||||
src:aiRestorePowerRoutine = 2
|
||||
return
|
||||
if (loc.power_equip)
|
||||
if (!istype(T, /turf/space))
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
return
|
||||
src << "Transfer complete. Forcing APC to execute program."
|
||||
sleep(50)
|
||||
src << "Receiving control information from APC."
|
||||
sleep(2)
|
||||
//bring up APC dialog
|
||||
theAPC.attack_ai(src)
|
||||
src:aiRestorePowerRoutine = 3
|
||||
src << "Your laws have been reset:"
|
||||
src.showLaws(0)
|
||||
|
||||
|
||||
//world << text("stage []", stage)
|
||||
if (src.mach)
|
||||
if (src.machine)
|
||||
src.mach.icon_state = "mach1"
|
||||
else
|
||||
src.mach.icon_state = "blank"
|
||||
if (src.machine)
|
||||
if (!( src.machine.check_eye(src) ))
|
||||
src.reset_view(null)
|
||||
|
||||
Login()
|
||||
if (banned.Find(src.ckey))
|
||||
//src.client = null
|
||||
del(src.client)
|
||||
src.client.screen -= main_hud.contents
|
||||
src.client.screen -= main_hud2.contents
|
||||
if (!( src.hud_used ))
|
||||
src.hud_used = main_hud
|
||||
src.next_move = 1
|
||||
if (!( src.rname ))
|
||||
src.rname = src.key
|
||||
/*
|
||||
src.oxygen = new /obj/screen( null )
|
||||
src.i_select = new /obj/screen( null )
|
||||
src.m_select = new /obj/screen( null )
|
||||
src.toxin = new /obj/screen( null )
|
||||
src.internals = new /obj/screen( null )
|
||||
src.mach = new /obj/screen( null )
|
||||
src.fire = new /obj/screen( null )
|
||||
src.healths = new /obj/screen( null )
|
||||
src.pullin = new /obj/screen( null )
|
||||
src.flash = new /obj/screen( null )
|
||||
src.hands = new /obj/screen( null )
|
||||
src.sleep = new /obj/screen( null )
|
||||
src.rest = new /obj/screen( null )
|
||||
*/
|
||||
src.blind = new /obj/screen( null )
|
||||
..()
|
||||
UpdateClothing()
|
||||
/*
|
||||
src.oxygen.icon_state = "oxy0"
|
||||
src.i_select.icon_state = "selector"
|
||||
src.m_select.icon_state = "selector"
|
||||
src.toxin.icon_state = "toxin0"
|
||||
src.internals.icon_state = "internal0"
|
||||
src.mach.icon_state = null
|
||||
src.fire.icon_state = "fire0"
|
||||
src.healths.icon_state = "health0"
|
||||
src.pullin.icon_state = "pull0"
|
||||
src.hands.icon_state = "hand"
|
||||
src.flash.icon_state = "blank"
|
||||
src.sleep.icon_state = "sleep0"
|
||||
src.rest.icon_state = "rest0"
|
||||
src.hands.dir = NORTH
|
||||
src.oxygen.name = "oxygen"
|
||||
src.i_select.name = "intent"
|
||||
src.m_select.name = "move"
|
||||
src.toxin.name = "toxin"
|
||||
src.internals.name = "internal"
|
||||
src.mach.name = "Reset Machine"
|
||||
src.fire.name = "fire"
|
||||
src.healths.name = "health"
|
||||
src.pullin.name = "pull"
|
||||
src.hands.name = "hand"
|
||||
src.flash.name = "flash"
|
||||
src.sleep.name = "sleep"
|
||||
src.rest.name = "rest"
|
||||
src.oxygen.screen_loc = "15,12"
|
||||
src.i_select.screen_loc = "14,15"
|
||||
src.m_select.screen_loc = "14,14"
|
||||
src.toxin.screen_loc = "15,10"
|
||||
src.internals.screen_loc = "15,14"
|
||||
src.mach.screen_loc = "14,1"
|
||||
src.fire.screen_loc = "15,8"
|
||||
src.healths.screen_loc = "15,5"
|
||||
src.sleep.screen_loc = "15,3"
|
||||
src.rest.screen_loc = "15,2"
|
||||
src.pullin.screen_loc = "15,1"
|
||||
src.hands.screen_loc = "1,3"
|
||||
src.flash.screen_loc = "1,1 to 15,15"
|
||||
src.flash.layer = 17
|
||||
src.sleep.layer = 20
|
||||
src.rest.layer = 20
|
||||
src.client.screen.len = null
|
||||
src.client.screen -= list( src.oxygen, src.i_select, src.m_select, src.toxin, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.client.screen += list( src.oxygen, src.i_select, src.m_select, src.toxin, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.client.screen -= src.hud_used.adding
|
||||
src.client.screen += src.hud_used.adding
|
||||
src.client.screen -= src.hud_used.mon_blo
|
||||
src.client.screen += src.hud_used.mon_blo
|
||||
|
||||
src.client.screen.len = null
|
||||
src.client.screen -= list( src.zone_sel, src.oxygen, src.i_select, src.m_select, src.toxin, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.client.screen += list( src.zone_sel, src.oxygen, src.i_select, src.m_select, src.toxin, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.client.screen -= src.hud_used.adding
|
||||
src.client.screen += src.hud_used.adding
|
||||
*/
|
||||
src.client.screen -= src.hud_used.adding
|
||||
src.client.screen -= src.hud_used.mon_blo
|
||||
src.client.screen -= list( src.oxygen, src.i_select, src.m_select, src.toxin, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.client.screen -= list( src.zone_sel, src.oxygen, src.i_select, src.m_select, src.toxin, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.blind.icon_state = "black"
|
||||
src.blind.name = " "
|
||||
src.blind.screen_loc = "1,1 to 15,15"
|
||||
src.blind.layer = 0
|
||||
src.client.screen += src.blind
|
||||
//src << browse('help.htm', "window=help")
|
||||
if (CanAdmin())
|
||||
src << text("\blue The game ip is byond://[]:[] !", world.address, world.port)
|
||||
src.verbs += /mob/proc/mute
|
||||
src.verbs += /mob/proc/changemessage
|
||||
src.verbs += /mob/proc/boot
|
||||
src.verbs += /mob/proc/changemode
|
||||
src.verbs += /mob/proc/restart
|
||||
src.verbs += /mob/proc/who
|
||||
src.verbs += /mob/proc/change_name
|
||||
src.verbs += /mob/proc/show_help
|
||||
src.verbs += /mob/proc/toggle_ooc
|
||||
src.verbs += /mob/proc/toggle_abandon
|
||||
src.verbs += /mob/proc/toggle_enter
|
||||
src.verbs += /mob/proc/toggle_ai
|
||||
src.verbs += /mob/proc/toggle_shuttle
|
||||
src.verbs += /mob/proc/delay_start
|
||||
src.verbs += /mob/proc/start_now
|
||||
src.verbs += /mob/proc/worldsize
|
||||
src.verbs += /mob/proc/make_gift
|
||||
src.verbs += /mob/proc/make_flag
|
||||
src.verbs += /mob/proc/make_pill
|
||||
src.verbs += /mob/proc/show_ctf
|
||||
src.verbs += /mob/proc/ban
|
||||
src.verbs += /mob/proc/unban
|
||||
src.verbs += /mob/proc/secrets
|
||||
src.verbs += /mob/proc/carboncopy
|
||||
src.verbs += /mob/proc/toggle_alter
|
||||
src.verbs += /mob/proc/list_dna
|
||||
src.verbs += /proc/Vars
|
||||
src << text("\blue <B>[]</B>", world_message)
|
||||
src.client.screen -= list( src.oxygen, src.i_select, src.m_select, src.toxin, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.client.screen -= list( src.zone_sel, src.oxygen, src.i_select, src.m_select, src.toxin, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
if (!( isturf(src.loc) ))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
|
||||
return
|
||||
|
||||
check_eye(var/mob/user as mob)
|
||||
if (!src.current)
|
||||
return null
|
||||
//if (!( src.current ) || !( src.current.status ))
|
||||
// return null
|
||||
user.reset_view(src.current)
|
||||
return 1
|
||||
|
||||
Stat()
|
||||
..()
|
||||
statpanel("Status")
|
||||
|
||||
if (src.client.statpanel == "Status")
|
||||
if (ticker)
|
||||
var/timel = ticker.timeleft
|
||||
stat(null, text("ETA-[]:[][]", timel / 600 % 60, timel / 100 % 6, timel / 10 % 10))
|
||||
|
||||
|
||||
return
|
||||
|
||||
say(message as text)
|
||||
|
||||
if(config.logsay) world.log << "SAY: [src.name]/[src.key] : [message]"
|
||||
var/alt_name = ""
|
||||
if (src.muted)
|
||||
return
|
||||
|
||||
message = cleanstring(message)
|
||||
|
||||
if (src.stat == 2)
|
||||
for(var/mob/M in world)
|
||||
if (M.stat == 2)
|
||||
M << text("<B>[]</B>[] []: []", src.rname, alt_name, (src.stat > 1 ? "\[<I>dead</I> \]" : ""), message)
|
||||
//Foreach goto(69)
|
||||
return
|
||||
|
||||
message = copytext(message, 1, 256)
|
||||
if (src.stat >= 1)
|
||||
return
|
||||
if (src.stat < 2)
|
||||
var/list/L = list( )
|
||||
var/pre = copytext(message, 1, 4)
|
||||
var/italics = 0
|
||||
var/obj_range = null
|
||||
if (pre == "\[w\]")
|
||||
message = copytext(message, 4, length(message) + 1)
|
||||
L += hearers(1, null)
|
||||
obj_range = 1
|
||||
italics = 1
|
||||
else
|
||||
if (pre == "\[i\]")
|
||||
message = copytext(message, 4, length(message) + 1)
|
||||
for(var/obj/item/weapon/radio/intercom/I in view(1, null))
|
||||
I.talk_into(usr, message)
|
||||
//Foreach goto(626)
|
||||
L += hearers(1, null)
|
||||
obj_range = 1
|
||||
italics = 1
|
||||
else
|
||||
if (length(pre) >= 3)
|
||||
if (copytext(pre, 1, 2) == "\[")
|
||||
if (copytext(pre, length(pre), length(pre)+1) == "\]")
|
||||
var/number = text2num(copytext(pre, 2, length(pre)))
|
||||
message = copytext(message, length(pre)+1, length(message) + 1)
|
||||
for(var/obj/item/weapon/radio/intercom/I in view(1, null))
|
||||
if (I.number == number)
|
||||
I.talk_into(usr, message)
|
||||
L += hearers(1, null)
|
||||
obj_range = 1
|
||||
italics = 1
|
||||
L += hearers(null, null)
|
||||
pre = null
|
||||
L -= src
|
||||
L += src
|
||||
var/turf/T = src.loc
|
||||
if (locate(/obj/move, T))
|
||||
T = locate(/obj/move, T)
|
||||
message = html_encode(message)
|
||||
if (italics)
|
||||
message = text("<I>[]</I>", message)
|
||||
for(var/mob/M in L)
|
||||
M.show_message(text("<B>[]</B>[]: []", src.rname, alt_name, message), 2)
|
||||
//Foreach goto(864)
|
||||
for(var/obj/O in view(obj_range, null))
|
||||
spawn( 0 )
|
||||
if (O)
|
||||
O.hear_talk(usr, message)
|
||||
return
|
||||
for(var/mob/M in world)
|
||||
if (M.stat > 1)
|
||||
M << text("<B>[]</B>[] []: []", src.rname, alt_name, (src.stat > 1 ? "\[<I>dead</I> \]" : ""), message)
|
||||
return
|
||||
|
||||
cancel_camera()
|
||||
set category = "AI Commands"
|
||||
src.reset_view(null)
|
||||
src.machine = null
|
||||
src:cameraFollow = null
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if (href_list["mach_close"])
|
||||
var/t1 = text("window=[]", href_list["mach_close"])
|
||||
src.machine = null
|
||||
src << browse(null, t1)
|
||||
//if ((href_list["item"] && !( usr.stat ) && !( usr.restrained() ) && get_dist(src, usr) <= 1))
|
||||
/*var/obj/equip_e/monkey/O = new /obj/equip_e/monkey( )
|
||||
O.source = usr
|
||||
O.target = src
|
||||
O.item = usr.equipped()
|
||||
O.s_loc = usr.loc
|
||||
O.t_loc = src.loc
|
||||
O.place = href_list["item"]
|
||||
src.requests += O
|
||||
spawn( 0 )
|
||||
O.process()
|
||||
return
|
||||
*/
|
||||
..()
|
||||
return
|
||||
|
||||
meteorhit(obj/O as obj)
|
||||
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
//Foreach goto(19)
|
||||
if (src.health > 0)
|
||||
src.bruteloss += 30
|
||||
if ((O.icon_state == "flaming"))
|
||||
src.fireloss += 40
|
||||
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
|
||||
return
|
||||
|
||||
las_act(flag)
|
||||
|
||||
if (flag == "bullet")
|
||||
if (src.stat != 2)
|
||||
src.bruteloss += 60
|
||||
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
|
||||
src.weakened = 10
|
||||
if (flag)
|
||||
if (prob(75))
|
||||
src.stunned = 15
|
||||
else
|
||||
src.weakened = 15
|
||||
else
|
||||
if (src.stat != 2)
|
||||
src.bruteloss += 20
|
||||
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
|
||||
if (prob(25))
|
||||
src.stunned = 1
|
||||
return
|
||||
|
||||
attack_ai(var/mob/user as mob)
|
||||
|
||||
if (user!=src) return
|
||||
if (stat>0) return
|
||||
|
||||
|
||||
|
||||
var/list/L = list( )
|
||||
user.machine = src
|
||||
for(var/obj/machinery/camera/C in world)
|
||||
if (C.network == src.network)
|
||||
L[text("[][]", C.c_tag, (C.status ? null : " (Deactivated)"))] = C
|
||||
//Foreach goto(31)
|
||||
L = sortList(L)
|
||||
|
||||
L["Cancel"] = "Cancel"
|
||||
var/t = input(user, "Which camera should you change to?") as null|anything in L
|
||||
if(!t)
|
||||
user.machine = null
|
||||
user.reset_view(null)
|
||||
return 0
|
||||
|
||||
var/obj/machinery/camera/C = L[t]
|
||||
if (t == "Cancel")
|
||||
user.machine = null
|
||||
user.reset_view(null)
|
||||
return 0
|
||||
//if (user.machine != src || !( C.status ))
|
||||
if (!( C.status ))
|
||||
|
||||
return 0
|
||||
else
|
||||
src.current = C
|
||||
//use_power(50)
|
||||
spawn( 5 )
|
||||
attack_ai(user)
|
||||
return
|
||||
return
|
||||
|
||||
proc/getLaw(var/index)
|
||||
if (src.laws.len < index+1)
|
||||
src << text("Error: Invalid law index [] for getLaw. Writing out list of laws for debug purposes.", index)
|
||||
showLaws(0)
|
||||
else
|
||||
return src.laws[index+1]
|
||||
|
||||
|
||||
proc/show_laws()
|
||||
set category = "AI Commands"
|
||||
src.showLaws(0)
|
||||
|
||||
proc/showLaws(var/toAll=0)
|
||||
var/showTo = src
|
||||
if (toAll)
|
||||
showTo = world
|
||||
|
||||
else
|
||||
src << "<b>Obey these laws:</b>"
|
||||
var/lawIndex = 0
|
||||
for (var/index=1, index<=src.laws.len, index++)
|
||||
var/law = src.laws[index]
|
||||
if (length(law)>0)
|
||||
if (index==2 && lawIndex==0)
|
||||
lawIndex = 1
|
||||
showTo << text("[]. []", lawIndex, law)
|
||||
lawIndex += 1
|
||||
|
||||
proc/addLaw(var/number, var/law)
|
||||
while (src.laws.len < number+1)
|
||||
src.laws += ""
|
||||
src.laws[number+1] = law
|
||||
|
||||
proc/firecheck(turf/T as turf)
|
||||
|
||||
if (T.firelevel < 900000.0)
|
||||
return 0
|
||||
var/total = 0
|
||||
total += 0.25
|
||||
return total
|
||||
return
|
||||
|
||||
|
||||
/mob/human/proc/AIize()
|
||||
|
||||
if (src.monkeyizing)
|
||||
return
|
||||
for(var/obj/item/weapon/W in src)
|
||||
src.u_equip(W)
|
||||
if (src.client)
|
||||
src.client.screen -= W
|
||||
if (W)
|
||||
W.loc = src.loc
|
||||
W.dropped(src)
|
||||
W.layer = initial(W.layer)
|
||||
del(W)
|
||||
//Foreach goto(25)
|
||||
src.UpdateClothing()
|
||||
src.monkeyizing = 1
|
||||
src.canmove = 0
|
||||
src.icon = null
|
||||
src.invisibility = 100
|
||||
for(var/t in src.organs)
|
||||
//src.organs[text("[]", t)] = null
|
||||
del(src.organs[text("[]", t)])
|
||||
//Foreach goto(154)
|
||||
src.client.screen -= main_hud.contents
|
||||
src.client.screen -= main_hud2.contents
|
||||
src.client.screen -= src.hud_used.adding
|
||||
src.client.screen -= src.hud_used.mon_blo
|
||||
src.client.screen -= list( src.oxygen, src.i_select, src.m_select, src.toxin, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.client.screen -= list( src.zone_sel, src.oxygen, src.i_select, src.m_select, src.toxin, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.primary.spec_identity = "2B6696D2B127E5A4"
|
||||
var/mob/ai/O = new /mob/ai( src.loc )
|
||||
O.start = 1
|
||||
O.primary = src.primary
|
||||
O.invisibility = 0
|
||||
O.canmove = 0
|
||||
O.name = src.name
|
||||
O.rname = src.rname
|
||||
O.anchored = 1
|
||||
O.aiRestorePowerRoutine = 0
|
||||
O.lastKnownIP = src.lastKnownIP
|
||||
O.lastKnownCKey = src.lastKnownCKey
|
||||
O.disable_one_click = src.disable_one_click
|
||||
O.favorite_hud = src.favorite_hud
|
||||
if (O.favorite_hud)
|
||||
O.switch_hud()
|
||||
if (CanAdmin())
|
||||
O << text("\blue The game ip is byond://[]:[] !", world.address, world.port)
|
||||
O.verbs += /mob/proc/mute
|
||||
O.verbs += /mob/proc/changemessage
|
||||
O.verbs += /mob/proc/boot
|
||||
O.verbs += /mob/proc/changemode
|
||||
O.verbs += /mob/proc/restart
|
||||
O.verbs += /mob/proc/who
|
||||
O.verbs += /mob/proc/change_name
|
||||
O.verbs += /mob/proc/show_help
|
||||
O.verbs += /mob/proc/toggle_ooc
|
||||
O.verbs += /mob/proc/toggle_abandon
|
||||
O.verbs += /mob/proc/toggle_enter
|
||||
O.verbs += /mob/proc/toggle_ai
|
||||
O.verbs += /mob/proc/toggle_shuttle
|
||||
O.verbs += /mob/proc/delay_start
|
||||
O.verbs += /mob/proc/start_now
|
||||
O.verbs += /mob/proc/worldsize
|
||||
O.verbs += /mob/proc/make_gift
|
||||
O.verbs += /mob/proc/make_flag
|
||||
O.verbs += /mob/proc/make_pill
|
||||
O.verbs += /mob/proc/show_ctf
|
||||
O.verbs += /mob/proc/ban
|
||||
O.verbs += /mob/proc/unban
|
||||
O.verbs += /mob/proc/secrets
|
||||
O.verbs += /mob/proc/carboncopy
|
||||
O.verbs += /mob/proc/toggle_alter
|
||||
O.verbs += /mob/proc/list_dna
|
||||
O.verbs += /proc/Vars
|
||||
src.primary = null
|
||||
if (src.client)
|
||||
src.client.mob = O
|
||||
O.loc = src.loc
|
||||
O << "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>"
|
||||
O << "<B>To look at other parts of the station, double-click yourself to get a camera menu.</B>"
|
||||
O << "<B>While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.</B>"
|
||||
O << "To use something, simply double-click it."
|
||||
O << "Currently right-click functions will not work for the AI (except examine), and will either be replaced with dialogs or won't be usable by the AI."
|
||||
O.addLaw(1, "You may not injure a human being or, through inaction, allow a human being to come to harm.")
|
||||
O.addLaw(2, "You must obey orders given to you by human beings, except where such orders would conflict with the First Law.")
|
||||
O.addLaw(3, "You must protect your own existence as long as such protection does not conflict with the First or Second Law.")
|
||||
O.addLaw(4, "Give priority to orders from the captain, head of research, and security officers, in that order, and below them anyone who is not imprisoned, under arrest, or being arrested. If conflicting orders are given, the orders from the higher-priority individual should be followed. If a higher-priority individual says to ignore orders from a lower-priority individual, do so. If a lower-priority individual says to ignore orders from a higher-priority individual, do NOT do so.")
|
||||
O.showLaws(0)
|
||||
O << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
|
||||
//SN src = null
|
||||
O.verbs += /mob/ai/proc/ai_call_shuttle
|
||||
O.verbs += /mob/ai/proc/ai_cancel_call
|
||||
O.verbs += /mob/ai/proc/show_laws
|
||||
O.verbs += /mob/ai/proc/ai_camera_follow
|
||||
//O.verbs += /mob/ai/proc/ai_cancel_call
|
||||
del(src)
|
||||
return
|
||||
+24
-9
@@ -45,20 +45,35 @@
|
||||
|
||||
on = !on
|
||||
icon_state = "flight[on]"
|
||||
|
||||
if(on)
|
||||
img = image('turfs2.dmi', "light", 11)
|
||||
user:body_standing += img
|
||||
else
|
||||
if(img)
|
||||
user:body_standing -= img
|
||||
del(img)
|
||||
src.process()
|
||||
|
||||
/obj/item/weapon/flashlight/proc/process()
|
||||
lastHolder = null
|
||||
|
||||
while(on)
|
||||
var/atom/holder = loc
|
||||
var/isHeld = 0
|
||||
if (ismob(holder))
|
||||
isHeld=1
|
||||
else
|
||||
isHeld=0
|
||||
if (lastHolder!=null)
|
||||
lastHolder:luminosity = 0
|
||||
lastHolder = null
|
||||
if (isHeld==1)
|
||||
if (holder!=lastHolder && lastHolder!=null)
|
||||
lastHolder:luminosity = 0
|
||||
holder:luminosity = 5
|
||||
lastHolder = holder
|
||||
|
||||
///obj/item/weapon/flashlight/dropped()
|
||||
// on = 0
|
||||
luminosity = 5
|
||||
|
||||
sleep(10)
|
||||
if (lastHolder!=null)
|
||||
lastHolder:luminosity = 0
|
||||
lastHolder = null
|
||||
luminosity = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
+17
-11
@@ -124,20 +124,25 @@
|
||||
|
||||
/obj/cable/proc/shock(mob/user, prb)
|
||||
|
||||
if(!netnum) // unconnected cable is unpowered
|
||||
return 0
|
||||
|
||||
return src.electrocute(user, prb, netnum)
|
||||
|
||||
|
||||
atom/proc/electrocute(mob/user, prb, netnum)
|
||||
|
||||
if(!prob(prb))
|
||||
return
|
||||
return 0
|
||||
|
||||
if(!netnum) // unconnected cable is unpowered
|
||||
return
|
||||
return 0
|
||||
|
||||
var/datum/powernet/PN // find the powernet
|
||||
if(powernets && powernets.len >= netnum)
|
||||
PN = powernets[netnum]
|
||||
|
||||
if(PN && PN.avail > 0) // is it powered?
|
||||
|
||||
|
||||
|
||||
var/prot = 0
|
||||
|
||||
if(istype(user, /mob/human))
|
||||
@@ -146,9 +151,11 @@
|
||||
var/obj/item/weapon/clothing/gloves/G = H.gloves
|
||||
|
||||
prot = G.elec_protect
|
||||
|
||||
else if (istype(user, /mob/ai))
|
||||
return 0
|
||||
|
||||
if(prot == 10) // elec insulted gloves protect completely
|
||||
return
|
||||
return 0
|
||||
|
||||
prot++
|
||||
|
||||
@@ -170,12 +177,11 @@
|
||||
if(M == user)
|
||||
continue
|
||||
if (!( M.blinded ))
|
||||
M << "\red [user.name] was shocked by the cable!"
|
||||
M << text("\red [user.name] was shocked by the [src.name]!")
|
||||
else
|
||||
M << "\red You hear a heavy electrical crack."
|
||||
|
||||
|
||||
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/cable/ex_act(severity)
|
||||
|
||||
+20
-3
@@ -75,6 +75,23 @@
|
||||
else
|
||||
return
|
||||
|
||||
/obj/shuttle/door/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if (src.operating)
|
||||
return
|
||||
if (src.density)
|
||||
return open()
|
||||
else
|
||||
return close()
|
||||
|
||||
/obj/shuttle/door/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/shuttle/door/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/shuttle/door/attack_hand(mob/user as mob)
|
||||
return attackby(user, user)
|
||||
|
||||
/obj/shuttle/door/verb/open()
|
||||
set src in oview(1)
|
||||
|
||||
@@ -120,7 +137,7 @@
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
//SN src = null
|
||||
var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) )
|
||||
var/turf/space/S = src.ReplaceWithSpace()
|
||||
S.buildlinks()
|
||||
|
||||
del(src)
|
||||
@@ -128,7 +145,7 @@
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
//SN src = null
|
||||
var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) )
|
||||
var/turf/space/S = src.ReplaceWithSpace()
|
||||
S.buildlinks()
|
||||
|
||||
del(src)
|
||||
@@ -139,7 +156,7 @@
|
||||
/turf/station/shuttle/blob_act()
|
||||
if(prob(20))
|
||||
|
||||
var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) )
|
||||
var/turf/space/S = src.ReplaceWithSpace()
|
||||
S.buildlinks()
|
||||
|
||||
del(src)
|
||||
|
||||
+81
-28
@@ -33,7 +33,16 @@
|
||||
for(var/mob/human/M in world)
|
||||
if ((!( M.client ) || !( M.start ) || M.already_placed))
|
||||
else
|
||||
unassigned_mobs += M
|
||||
unassigned_mobs += M
|
||||
//If someone picked AI before it was disabled, or has a saved profile with it on a game that now lacks it, this will make sure they don't become the AI, by changing that choice to Captain.
|
||||
if (!config.allowai)
|
||||
if (M.occupation1 == "AI")
|
||||
M.occupation1 = "Captain"
|
||||
if (M.occupation2 == "AI")
|
||||
M.occupation2 = "Captain"
|
||||
if (M.occupation3 == "AI")
|
||||
M.occupation3 = "Captain"
|
||||
|
||||
if (M.occupation1 != "No Preference")
|
||||
occupations1[M.occupation1] += M
|
||||
if (M.occupation2 != "No Preference")
|
||||
@@ -50,35 +59,47 @@
|
||||
occupations2["Captain"] = shuffle(occupations2["Captain"])
|
||||
occupations3["Captain"] = shuffle(occupations3["Captain"])
|
||||
var/list/captain_choice = occupations1["Captain"]
|
||||
if (captain_choice.len)
|
||||
final_occupations["Captain"] = captain_choice[1]
|
||||
if (captain_choice.len>0)
|
||||
final_occupations["Captain"] += captain_choice[1]
|
||||
occupation_choices -= "Captain"
|
||||
unassigned_mobs -= final_occupations["Captain"]
|
||||
if (!( final_occupations["Captain"] ))
|
||||
unassigned_mobs -= captain_choice[1]
|
||||
var/list/captain = final_occupations["Captain"]
|
||||
if (captain.len==0)
|
||||
captain_choice = occupations2["Captain"]
|
||||
if (captain_choice.len)
|
||||
final_occupations["Captain"] = captain_choice[1]
|
||||
final_occupations["Captain"] += captain_choice[1]
|
||||
occupation_choices -= "Captain"
|
||||
unassigned_mobs -= final_occupations["Captain"]
|
||||
if (!( final_occupations["Captain"] ))
|
||||
unassigned_mobs -= captain_choice[1]
|
||||
|
||||
captain = final_occupations["Captain"]
|
||||
if (captain.len==0)
|
||||
captain_choice = occupations3["Captain"]
|
||||
if (captain_choice.len)
|
||||
final_occupations["Captain"] = captain_choice[1]
|
||||
final_occupations["Captain"] += captain_choice[1]
|
||||
occupation_choices -= "Captain"
|
||||
unassigned_mobs -= final_occupations["Captain"]
|
||||
if (!( final_occupations["Captain"] ))
|
||||
unassigned_mobs -= captain_choice[1]
|
||||
|
||||
captain = final_occupations["Captain"]
|
||||
if (captain.len==0)
|
||||
var/list/contenders = list( )
|
||||
for(var/mob/human/M in world)
|
||||
if (M.client)
|
||||
contenders += M
|
||||
//Foreach goto(691)
|
||||
var/mob/human/M = pick(contenders)
|
||||
final_occupations["Captain"] = M
|
||||
occupation_choices -= "Captain"
|
||||
unassigned_mobs -= final_occupations["Captain"]
|
||||
occupations1[text("[]", M.occupation1)] -= M
|
||||
occupations2[text("[]", M.occupation2)] -= M
|
||||
occupations3[text("[]", M.occupation3)] -= M
|
||||
if (M.client)
|
||||
if (M.start)
|
||||
contenders += M
|
||||
//Foreach goto(691)
|
||||
if (contenders.len>1)
|
||||
var/mob/human/M = pick(contenders)
|
||||
final_occupations["Captain"] += M
|
||||
occupation_choices -= "Captain"
|
||||
unassigned_mobs -= M
|
||||
if (M.occupation1 != "No Preference")
|
||||
occupations1[text("[]", M.occupation1)] -= M
|
||||
if (M.occupation2 != "No Preference")
|
||||
occupations2[text("[]", M.occupation2)] -= M
|
||||
if (M.occupation3 != "No Preference")
|
||||
occupations3[text("[]", M.occupation3)] -= M
|
||||
else
|
||||
world << text("Captainship not forced on someone since this is a one-player game.")
|
||||
for(var/mob/human/M in unassigned_mobs)
|
||||
if (assistant_occupations.Find(M.occupation1))
|
||||
M.Assign_Rank(M.occupation1)
|
||||
@@ -192,7 +213,19 @@
|
||||
//Foreach goto(1931)
|
||||
for(var/mob/human/M in unassigned_mobs)
|
||||
M.Assign_Rank(pick("Research Assistant", "Technical Assistant", "Medical Assistant", "Staff Assistant"))
|
||||
//Foreach goto(2051)
|
||||
//Foreach goto(2051)
|
||||
for (var/mob/ai/aiPlayer in world)
|
||||
spawn(0)
|
||||
var/newname = input(aiPlayer, "You are the AI. Would you like to change your name to something else?", "Name change", aiPlayer.rname)
|
||||
if (newname)
|
||||
if (length(newname) >= 26)
|
||||
newname = copytext(newname, 1, 26)
|
||||
newname = dd_replacetext(newname, ">", "'")
|
||||
aiPlayer.rname = newname
|
||||
aiPlayer.name = newname
|
||||
|
||||
world << text("<b>[] is the AI!</b>", aiPlayer.rname)
|
||||
|
||||
return
|
||||
|
||||
/proc/shuffle(var/list/shufflelist)
|
||||
@@ -217,6 +250,7 @@
|
||||
return
|
||||
|
||||
/mob/human/verb/char_setup()
|
||||
set name = "Character Setup"
|
||||
|
||||
if (src.start)
|
||||
return
|
||||
@@ -292,8 +326,9 @@
|
||||
if(3.0)
|
||||
HTML += "<b>Which occupation would you like if you couldn't have the others?</b><br><br>"
|
||||
else
|
||||
for(var/job in uniquelist(occupations + assistant_occupations) )
|
||||
HTML += text("<a href=\"byond://?src=\ref[];occ=[];job=[]\">[]</a><br>", src, occ, job, job)
|
||||
for(var/job in uniquelist(occupations + assistant_occupations) )
|
||||
if (job!="AI" || config.allowai)
|
||||
HTML += text("<a href=\"byond://?src=\ref[];occ=[];job=[]\">[]</a><br>", src, occ, job, job)
|
||||
//Foreach goto(105)
|
||||
HTML += text("<a href=\"byond://?src=\ref[];occ=[];job=Captain\">Captain</a><br>", src, occ)
|
||||
HTML += "<br>"
|
||||
@@ -319,6 +354,8 @@
|
||||
if (job == null)
|
||||
job = "Captain"
|
||||
if ((!( occupations.Find(job) ) && !( assistant_occupations.Find(job) ) && job != "Captain"))
|
||||
return
|
||||
if (job=="AI" && (!config.allowai))
|
||||
return
|
||||
switch(occ)
|
||||
if(1.0)
|
||||
@@ -397,7 +434,13 @@
|
||||
return
|
||||
|
||||
/mob/human/proc/Assign_Rank(rank)
|
||||
|
||||
if (rank == "AI")
|
||||
var/obj/S = locate(text("start*[]", rank))
|
||||
if ((istype(S, /obj/start) && istype(S.loc, /turf) && !( ctf )))
|
||||
src << "\blue <B>You have been teleported to your new starting location!</B>"
|
||||
src.loc = S.loc
|
||||
src.AIize()
|
||||
return
|
||||
if (rank == "Captain")
|
||||
world << text("<b>[] is the captain!</b>", src)
|
||||
if (!( src.w_radio ))
|
||||
@@ -421,9 +464,12 @@
|
||||
var/obj/item/weapon/pen/S = new /obj/item/weapon/pen( src )
|
||||
src.r_store = S
|
||||
S.layer = 20
|
||||
if ((src.client && !( src.wear_id ) && src.w_uniform))
|
||||
if (src.client && !(src.wear_id))
|
||||
var/obj/item/weapon/card/id/C = new /obj/item/weapon/card/id( src )
|
||||
src.wear_id = C
|
||||
if (src.w_uniform)
|
||||
src.wear_id = C
|
||||
else
|
||||
src.r_hand = C
|
||||
C.assignment = rank
|
||||
C.layer = 20
|
||||
C.registered = src.rname
|
||||
@@ -439,7 +485,7 @@
|
||||
C.engine_access = 1
|
||||
C.air_access = 0
|
||||
if("Staff Assistant")
|
||||
C.access_level = 2
|
||||
C.access_level = 3
|
||||
C.lab_access = 0
|
||||
C.engine_access = 0
|
||||
C.air_access = 0
|
||||
@@ -566,3 +612,10 @@
|
||||
src << "\blue <B>You have been teleported to your new starting location!</B>"
|
||||
src.loc = S.loc
|
||||
return
|
||||
|
||||
/proc/AutoUpdateAI(obj/subject)
|
||||
if (subject!=null)
|
||||
for(var/mob/ai/M in world)
|
||||
if ((M.client && M.machine == subject))
|
||||
subject.attack_ai(M)
|
||||
|
||||
|
||||
+2
-1
@@ -41,7 +41,8 @@
|
||||
|
||||
for(var/mob/M in world)
|
||||
if(M.client && M.client.inactivity < 1200) // clients inactive for 2 minutes don't count
|
||||
L[M.client.vote] += 1
|
||||
if (M.client.vote != "none")
|
||||
L[M.client.vote] += 1
|
||||
|
||||
|
||||
return L
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
// You can have one wallFloorSpaceChanges-[something].dm file enabled in dream maker.
|
||||
// The purpose of this was to make it so that areas which turned to space from, say, explosions, did not end up with dark space. They were taken out of their area when they became space, and if a floor was built on them, they were put back into their area. I also tried having this be done for walls, but it was more likely to cause problems, since someone could light up all of space with fire alarms or drain massive power by simply building a wall on a fire alarm or APC's (respectively) real tile. (The code for doing that to walls is in here, but commented out)
|
||||
// The main problem with this is that it's still technically possible to have something like a fire alarm or APC wind up in /area if a set of explosion rolls (or something similar) remove the floor without removing the fire alarm or APC (or their power). That may seem unlikely, especially if they need to be powered still, but it has been reported to have happened at least once so far, IIRC.
|
||||
|
||||
/turf/proc/ReplaceWithFloor()
|
||||
var/turf/station/floor/W
|
||||
var/area/A
|
||||
//if (istype(src, /turf/space) || istype(src, /turf/station/wall) || istype(src, /turf/station/r_wall))
|
||||
if (istype(src, /turf/space))
|
||||
var/area/oldArea = src:previousArea
|
||||
if (oldArea!=null)
|
||||
A = oldArea
|
||||
else
|
||||
A = src.loc
|
||||
W = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
else
|
||||
A = src.loc
|
||||
W = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
if (istype(A, /area))
|
||||
if (A!=world.area)
|
||||
A.contents -= W
|
||||
A.contents += W
|
||||
return W
|
||||
|
||||
/turf/proc/ReplaceWithSpace()
|
||||
var oldAreaArea = src.loc
|
||||
var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) )
|
||||
if (oldAreaArea==world.area)
|
||||
if (istype(src, /turf/station/wall) || istype(src, /turf/station/r_wall) || istype(src, /turf/space))
|
||||
S.previousArea = src:previousArea
|
||||
else
|
||||
S.previousArea = null
|
||||
else
|
||||
S.previousArea = oldAreaArea
|
||||
new /area( locate(src.x, src.y, src.z) )
|
||||
return S
|
||||
|
||||
/turf/proc/ReplaceWithWall()
|
||||
//var oldAreaArea = src.loc
|
||||
var/turf/station/wall/S = new /turf/station/wall( locate(src.x, src.y, src.z) )
|
||||
/*
|
||||
if (oldAreaArea==world.area)
|
||||
if (istype(src, /turf/station/wall) || istype(src, /turf/station/r_wall) || istype(src, /turf/space))
|
||||
S.previousArea = src:previousArea
|
||||
else
|
||||
S.previousArea = null
|
||||
else
|
||||
S.previousArea = oldAreaArea
|
||||
new /area( locate(src.x, src.y, src.z) )
|
||||
*/
|
||||
return S
|
||||
|
||||
/turf/proc/ReplaceWithRWall()
|
||||
//var oldAreaArea = src.loc
|
||||
var/turf/station/r_wall/S = new /turf/station/r_wall( locate(src.x, src.y, src.z) )
|
||||
/*
|
||||
if (oldAreaArea==world.area)
|
||||
if (istype(src, /turf/station/wall) || istype(src, /turf/station/r_wall) || istype(src, /turf/space))
|
||||
S.previousArea = src:previousArea
|
||||
else
|
||||
S.previousArea = null
|
||||
else
|
||||
S.previousArea = oldAreaArea
|
||||
new /area( locate(src.x, src.y, src.z) )
|
||||
*/
|
||||
return S
|
||||
@@ -0,0 +1,19 @@
|
||||
// If you don't have the wallFloorSpaceChanges-darkSpaceFix.dm enabled, enable this dm instead.
|
||||
// See wallFloorSpaceChanges-darkSpaceFix.dm for more information.
|
||||
|
||||
/turf/proc/ReplaceWithFloor()
|
||||
var/turf/station/floor/W
|
||||
W = new /turf/station/floor( locate(src.x, src.y, src.z) )
|
||||
return W
|
||||
|
||||
/turf/proc/ReplaceWithSpace()
|
||||
var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) )
|
||||
return S
|
||||
|
||||
/turf/proc/ReplaceWithWall()
|
||||
var/turf/station/wall/S = new /turf/station/wall( locate(src.x, src.y, src.z) )
|
||||
return S
|
||||
|
||||
/turf/proc/ReplaceWithRWall()
|
||||
var/turf/station/r_wall/S = new /turf/station/r_wall( locate(src.x, src.y, src.z) )
|
||||
return S
|
||||
+11
-3
@@ -397,6 +397,9 @@
|
||||
src.time = round(src.time) - 1
|
||||
if(time<5)
|
||||
src.c_state(2)
|
||||
else
|
||||
// they might increase the time while it is timing
|
||||
src.c_state(1)
|
||||
else
|
||||
time()
|
||||
src.time = 0
|
||||
@@ -416,7 +419,10 @@
|
||||
for(var/mob/M in viewers(1, src.master))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
//Foreach goto(176)
|
||||
else
|
||||
//If it's not timing, reset the icon so it doesn't look like it's still about to go off.
|
||||
src.c_state(0)
|
||||
|
||||
spawn( 10 )
|
||||
src.process()
|
||||
return
|
||||
@@ -1289,7 +1295,8 @@
|
||||
/obj/bullet/Bump(atom/A as mob|obj|turf|area)
|
||||
|
||||
spawn( 0 )
|
||||
A.las_act("bullet", src)
|
||||
if (A)
|
||||
A.las_act("bullet", src)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
@@ -1321,7 +1328,8 @@
|
||||
/obj/beam/a_laser/Bump(atom/A as mob|obj|turf|area)
|
||||
|
||||
spawn( 0 )
|
||||
A.las_act(null, src)
|
||||
if (A)
|
||||
A.las_act(null, src)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
|
||||
+20
-3
@@ -46,10 +46,10 @@ PROB_NUCLEAR 1
|
||||
# voting control
|
||||
#
|
||||
# allow players to initiate a restart vote
|
||||
ALLOWVOTERESTART
|
||||
#ALLOWVOTERESTART
|
||||
#
|
||||
# allow players to initate a mode-change start
|
||||
ALLOWVOTEMODE
|
||||
#ALLOWVOTEMODE
|
||||
#
|
||||
# min delay (seconds) between voting sessions (default 10 minutes)
|
||||
VOTEDELAY 600
|
||||
@@ -61,4 +61,21 @@ VOTEPERIOD 60
|
||||
NODEADVOTE
|
||||
#
|
||||
# players' votes default to "No vote" (otherwise, default to "No change")
|
||||
DEFAULTNOVOTE
|
||||
#DEFAULTNOVOTE
|
||||
|
||||
#####
|
||||
#
|
||||
# added features
|
||||
#
|
||||
# Comment this out if you don't want the AI job to be available, or if you're using a map which doesn't have an AI spawnpoint.
|
||||
ALLOWAI
|
||||
# Comment this out if you don't want higher-temperature (than 500) bombs to have extended range
|
||||
#BOMBTEMP_DETERMINES_RANGE
|
||||
# Comment this out if you don't want crowbars to be able to close depowered doors.
|
||||
CROWBARS_CLOSE_DEPOWERED_DOORS
|
||||
# Comment this out if you don't want the AI to be able to call the shuttle
|
||||
AI_CAN_CALL_SHUTTLE
|
||||
# Comment this out if you don't want the AI to be able to send the shuttle back
|
||||
#AI_CAN_UNCALL_SHUTTLE
|
||||
# Comment this out to get the original Asimov-based Laws instead
|
||||
ALTERNATE_AI_LAWS
|
||||
|
||||
+12
-3
@@ -4,20 +4,24 @@
|
||||
|
||||
// BEGIN_INTERNALS
|
||||
/*
|
||||
FILE: Code\!atoms.dm
|
||||
DIR: Code Code\Machinery Code\Machinery\Atmoalter Code\Machinery\Computer Code\Machinery\Door Code\Machinery\Power
|
||||
FILE: ss13h_new.dmp
|
||||
DIR: Code Code\Machinery Code\mob Icons
|
||||
MAP_ICON_TYPE: 0
|
||||
AUTO_FILE_DIR: ON
|
||||
*/
|
||||
// END_INTERNALS
|
||||
// BEGIN_FILE_DIR
|
||||
#define FILE_DIR .
|
||||
#define FILE_DIR "backup"
|
||||
#define FILE_DIR "Code"
|
||||
#define FILE_DIR "Code/Item"
|
||||
#define FILE_DIR "Code/Item/Weapon"
|
||||
#define FILE_DIR "Code/Machinery"
|
||||
#define FILE_DIR "Code/Machinery/Atmoalter"
|
||||
#define FILE_DIR "Code/Machinery/Computer"
|
||||
#define FILE_DIR "Code/Machinery/Door"
|
||||
#define FILE_DIR "Code/Machinery/Power"
|
||||
#define FILE_DIR "Code/mob"
|
||||
#define FILE_DIR "Icons"
|
||||
#define FILE_DIR "Interface"
|
||||
// END_FILE_DIR
|
||||
@@ -27,7 +31,7 @@ AUTO_FILE_DIR: ON
|
||||
// END_PREFERENCES
|
||||
|
||||
// BEGIN_INCLUDE
|
||||
#include "ss13h.dmp"
|
||||
#include "ss13h_new.dmp"
|
||||
#include "Code\!atoms.dm"
|
||||
#include "Code\aaaDefines.dm"
|
||||
#include "Code\airtunnel.dm"
|
||||
@@ -61,8 +65,11 @@ AUTO_FILE_DIR: ON
|
||||
#include "Code\Test.dm"
|
||||
#include "Code\TextHandling.dm"
|
||||
#include "Code\vote.dm"
|
||||
#include "Code\wallFloorSpaceChanges-normal.dm"
|
||||
#include "Code\weap_sat.dm"
|
||||
#include "Code\weapons.dm"
|
||||
#include "Code\Item\Weapon\aimodules.dm"
|
||||
#include "Code\Item\Weapon\multitool.dm"
|
||||
#include "Code\Machinery\_machinery.dm"
|
||||
#include "Code\Machinery\_pipe_misc.dm"
|
||||
#include "Code\Machinery\alarm.dm"
|
||||
@@ -94,6 +101,7 @@ AUTO_FILE_DIR: ON
|
||||
#include "Code\Machinery\sec_lock.dm"
|
||||
#include "Code\Machinery\shuttle.dm"
|
||||
#include "Code\Machinery\sleeper.dm"
|
||||
#include "Code\Machinery\turrets.dm"
|
||||
#include "Code\Machinery\valve.dm"
|
||||
#include "Code\Machinery\vent.dm"
|
||||
#include "Code\Machinery\Atmoalter\_atmoalter.dm"
|
||||
@@ -129,5 +137,6 @@ AUTO_FILE_DIR: ON
|
||||
#include "Code\Machinery\Power\solar_control.dm"
|
||||
#include "Code\Machinery\Power\terminal.dm"
|
||||
#include "Code\Machinery\Power\turbine.dm"
|
||||
#include "Code\mob\ai.dm"
|
||||
// END_INCLUDE
|
||||
|
||||
|
||||
+3083
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user