-Killed the updateDialog lag. I added a check to see if there were any mobs to update, if not it will stop checking until a user uses the machine again. I had to replace all the machine = src and machine = null with procs to help make it manageable. I believe this is one of the culprits causing the server to lag as the round goes on, as more players will interact with machines.

-Atmos delay is now based on active players, to help fight lag for massive player rounds.

-Changed some for(blah in world) loops to use the correct lists.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4958 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2012-10-25 19:15:51 +00:00
parent 2063c3715d
commit 6a2d78bc94
156 changed files with 403 additions and 367 deletions

View File

@@ -138,7 +138,7 @@ obj/machinery/atmospherics/binary/passive_gate
if(!src.allowed(user))
user << "\red Access denied."
return
usr.machine = src
usr.set_machine(src)
interact(user)
return
@@ -149,7 +149,7 @@ obj/machinery/atmospherics/binary/passive_gate
if(href_list["set_press"])
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
src.target_pressure = max(0, min(4500, new_pressure))
usr.machine = src
usr.set_machine(src)
src.update_icon()
src.updateUsrDialog()
return

View File

@@ -150,7 +150,7 @@ obj/machinery/atmospherics/binary/pump
if(!src.allowed(user))
user << "\red Access denied."
return
usr.machine = src
usr.set_machine(src)
interact(user)
return
@@ -161,7 +161,7 @@ obj/machinery/atmospherics/binary/pump
if(href_list["set_press"])
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
src.target_pressure = max(0, min(4500, new_pressure))
usr.machine = src
usr.set_machine(src)
src.update_icon()
src.updateUsrDialog()
return

View File

@@ -147,7 +147,7 @@ obj/machinery/atmospherics/binary/volume_pump
if(!src.allowed(user))
user << "\red Access denied."
return
usr.machine = src
usr.set_machine(src)
interact(user)
return
@@ -158,7 +158,7 @@ obj/machinery/atmospherics/binary/volume_pump
if(href_list["set_transfer_rate"])
var/new_transfer_rate = input(usr,"Enter new output volume (0-200l/s)","Flow control",src.transfer_rate) as num
src.transfer_rate = max(0, min(200, new_transfer_rate))
usr.machine = src
usr.set_machine(src)
src.update_icon()
src.updateUsrDialog()
return

View File

@@ -211,7 +211,7 @@ obj/machinery/atmospherics/trinary/filter/attack_hand(user as mob) // -- TLE
obj/machinery/atmospherics/trinary/filter/Topic(href, href_list) // -- TLE
if(..())
return
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["filterset"])
src.filter_type = text2num(href_list["filterset"])

View File

@@ -112,7 +112,7 @@ obj/machinery/atmospherics/trinary/mixer
if(!src.allowed(user))
user << "\red Access denied."
return
usr.machine = src
usr.set_machine(src)
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
<b>Desirable output pressure: </b>
[target_pressure]kPa | <a href='?src=\ref[src];set_press=1'>Change</a>

View File

@@ -90,7 +90,8 @@ datum/air_group
if (next_check > 0)
next_check--
return 1
next_check += check_delay + rand(max(check_delay, 1)/2,check_delay)
var/player_count = max(player_list.len, 3) / 3
next_check += check_delay + rand(player_count, player_count * 1.5)
check_delay++
var/turf/simulated/list/border_individual = list()

View File

@@ -304,7 +304,8 @@ turf
if (next_check > 0)
next_check--
return 1
next_check += check_delay + rand(max(check_delay, 1)/2,check_delay)
var/player_count = max(player_list.len, 3) / 3
next_check += check_delay + rand(player_count, player_count * 1.5)
check_delay++
var/turf/simulated/list/possible_fire_spreads = list()

View File

@@ -587,7 +587,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
// so just reset the user mob's machine var
if(src && src.mob)
//world << "[src] was [src.mob.machine], setting to null"
src.mob.machine = null
src.mob.unset_machine()
return
//Will return the location of the turf an atom is ultimatly sitting on

View File

@@ -91,15 +91,15 @@ Des: Removes all infection images from aliens and places an infection image on a
----------------------------------------*/
/datum/disease/alien_embryo/proc/RefreshInfectionImage()
spawn(0)
for (var/mob/living/carbon/alien/alien in world)
for (var/mob/living/carbon/alien/alien in player_list)
if (alien.client)
for(var/image/I in alien.client.images)
if(I.icon_state == "infected")
del(I)
for (var/mob/living/carbon/alien/alien in world)
for (var/mob/living/carbon/alien/alien in player_list)
if (alien.client)
for (var/mob/living/carbon/C in world)
for (var/mob/living/carbon/C in mob_list)
if(C)
if (C.status_flags & XENO_HOST)
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected")
@@ -112,7 +112,7 @@ Des: Checks if the passed mob (C) is infected with the alien egg, then gives eac
----------------------------------------*/
/datum/disease/alien_embryo/proc/AddInfectionImages(var/mob/living/carbon/C)
if (C)
for (var/mob/living/carbon/alien/alien in world)
for (var/mob/living/carbon/alien/alien in player_list)
if (alien.client)
if (C.status_flags & XENO_HOST)
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected")
@@ -126,7 +126,7 @@ Des: Removes the alien infection image from all aliens in the world located in p
/datum/disease/alien_embryo/proc/RemoveInfectionImages(var/mob/living/carbon/C)
if (C)
for (var/mob/living/carbon/alien/alien in world)
for (var/mob/living/carbon/alien/alien in player_list)
if (alien.client)
for(var/image/I in alien.client.images)
if(I.loc == C)

View File

@@ -907,7 +907,7 @@
if(!src || !src.connected)
return
if ((usr.contents.Find(src) || in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))
usr.machine = src
usr.set_machine(src)
if (href_list["locked"])
if ((src.connected && src.connected.occupant))
src.connected.locked = !( src.connected.locked )

View File

@@ -46,7 +46,7 @@
/obj/machinery/nuclearbomb/attack_hand(mob/user as mob)
if (src.extended)
user.machine = src
user.set_machine(src)
var/dat = text("<TT><B>Nuclear Fission Explosive</B><BR>\nAuth. Disk: <A href='?src=\ref[];auth=1'>[]</A><HR>", src, (src.auth ? "++++++++++" : "----------"))
if (src.auth)
if (src.yes_code)
@@ -91,7 +91,7 @@
usr << "\red You don't have the dexterity to do this!"
return 1
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
usr.machine = src
usr.set_machine(src)
if (href_list["auth"])
if (src.auth)
src.auth.loc = src.loc

View File

@@ -267,7 +267,7 @@
. = ..()
/obj/item/weapon/pinpointer/attack_self(mob/user as mob)
user.machine = src
user.set_machine(src)
var/dat
if (src.temp)
dat = "[src.temp]<BR><BR><A href='byond://?src=\ref[src];temp=1'>Clear</A>"
@@ -298,7 +298,7 @@
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
usr.machine = src
usr.set_machine(src)
if (href_list["refresh"])
src.temp = "<B>Nuclear Disk Pinpointer</B><HR>"
var/turf/sr = get_turf(src)

View File

@@ -39,7 +39,7 @@
attack_self(mob/user)
if (!in_range(src, user))
return
user.machine = src
user.set_machine(src)
var/dat = "<TT><B>Soul Stone</B><BR>"
for(var/mob/living/simple_animal/shade/A in src)
dat += "Captured Soul: [A.name]<br>"
@@ -57,16 +57,16 @@
var/mob/U = usr
if (!in_range(src, U)||U.machine!=src)
U << browse(null, "window=aicard")
U.machine = null
U.unset_machine()
return
add_fingerprint(U)
U.machine = src
U.set_machine(src)
switch(href_list["choice"])//Now we switch based on choice.
if ("Close")
U << browse(null, "window=aicard")
U.machine = null
U.unset_machine()
return
if ("Summon")

View File

@@ -2,7 +2,7 @@
//SPELL BOOK PROCS
/obj/item/weapon/spellbook/attack_self(mob/user as mob)
user.machine = src
user.set_machine(src)
var/dat
if (src.temp)
dat = "[src.temp]<BR><BR><A href='byond://?src=\ref[src];temp=1'>Clear</A>"
@@ -53,7 +53,7 @@
if (!( istype(H, /mob/living/carbon/human)))
return 1
if ((usr.contents.Find(src) || (in_range(src,usr) && istype(src.loc, /turf))))
usr.machine = src
usr.set_machine(src)
if(href_list["spell_choice"])
if(src.uses >= 1 && src.max_uses >=1 && text2num(href_list["spell_choice"]) < 18)
src.uses--

View File

@@ -42,7 +42,7 @@
return src.attack_hand(user)
attack_hand(mob/user as mob)
user.machine = src
user.set_machine(src)
var/temp_text = ""
if(air_contents.temperature > (T0C - 20))
temp_text = "<FONT color=red>[air_contents.temperature]</FONT>"
@@ -63,7 +63,7 @@
Topic(href, href_list)
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
usr.machine = src
usr.set_machine(src)
if (href_list["start"])
src.on = !src.on
update_icon()
@@ -128,7 +128,7 @@
return src.attack_hand(user)
attack_hand(mob/user as mob)
user.machine = src
user.set_machine(src)
var/temp_text = ""
if(air_contents.temperature > (T20C+40))
temp_text = "<FONT color=red>[air_contents.temperature]</FONT>"
@@ -147,7 +147,7 @@
Topic(href, href_list)
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
usr.machine = src
usr.set_machine(src)
if (href_list["start"])
src.on = !src.on
update_icon()

View File

@@ -84,7 +84,7 @@
if(..())
return
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
usr.machine = src
usr.set_machine(src)
if (src.connected)
if (src.connected.occupant)
if(src.connected.occupant.health > 0)

View File

@@ -39,7 +39,7 @@
user << "You [ locked ? "lock" : "unlock"] the device."
if (locked)
if (user.machine==src)
user.machine = null
user.unset_machine()
user << browse(null, "window=ai_slipper")
else
if (user.machine==src)
@@ -58,11 +58,11 @@
if ( (get_dist(src, user) > 1 ))
if (!istype(user, /mob/living/silicon))
user << text("Too far away.")
user.machine = null
user.unset_machine()
user << browse(null, "window=ai_slipper")
return
user.machine = src
user.set_machine(src)
var/loc = src.loc
if (istype(loc, /turf))
loc = loc:loc

View File

@@ -176,11 +176,11 @@
. = ..()
if (.)
return
user.machine = src
user.set_machine(src)
if ( (get_dist(src, user) > 1 ))
if (!istype(user, /mob/living/silicon))
user.machine = null
user.unset_machine()
user << browse(null, "window=air_alarm")
user << browse(null, "window=AAlarmwires")
return
@@ -715,11 +715,11 @@ table tr:first-child th:first-child { border: none;}
if(..())
return
src.add_fingerprint(usr)
usr.machine = src
usr.set_machine(src)
if ( (get_dist(src, usr) > 1 ))
if (!istype(usr, /mob/living/silicon))
usr.machine = null
usr.unset_machine()
usr << browse(null, "window=air_alarm")
usr << browse(null, "window=AAlarmwires")
return
@@ -1079,7 +1079,7 @@ table tr:first-child th:first-child { border: none;}
if(user.stat || stat & (NOPOWER|BROKEN))
return
user.machine = src
user.set_machine(src)
var/area/A = src.loc
var/d1
var/d2
@@ -1121,7 +1121,7 @@ table tr:first-child th:first-child { border: none;}
if (usr.stat || stat & (BROKEN|NOPOWER))
return
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
usr.set_machine(src)
if (href_list["reset"])
src.reset()
else
@@ -1174,7 +1174,7 @@ table tr:first-child th:first-child { border: none;}
if(user.stat || stat & (NOPOWER|BROKEN))
return
user.machine = src
user.set_machine(src)
var/area/A = src.loc
var/d1
var/d2
@@ -1236,7 +1236,7 @@ table tr:first-child th:first-child { border: none;}
if (usr.stat || stat & (BROKEN|NOPOWER))
return
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
usr.machine = src
usr.set_machine(src)
if (href_list["reset"])
src.reset()
else

View File

@@ -88,7 +88,7 @@ obj/machinery/computer/general_air_control
attack_hand(mob/user)
user << browse(return_text(),"window=computer")
user.machine = src
user.set_machine(src)
onclose(user, "computer")
process()

View File

@@ -87,7 +87,7 @@
Topic(href, href_list)
if(..())
return
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)

View File

@@ -202,7 +202,7 @@
if (src.destroyed)
return
user.machine = src
user.set_machine(src)
var/holding_text
if(holding)
holding_text = {"<BR><B>Tank Pressure</B>: [holding.air_contents.return_pressure()] KPa<BR>
@@ -232,7 +232,7 @@ Release Pressure: <A href='?src=\ref[src];pressure_adj=-1000'>-</A> <A href='?sr
return
if (((get_dist(src, usr) <= 1) && istype(src.loc, /turf)))
usr.machine = src
usr.set_machine(src)
if(href_list["toggle"])
if (valve_open)

View File

@@ -82,7 +82,7 @@
/obj/machinery/portable_atmospherics/pump/attack_hand(var/mob/user as mob)
user.machine = src
user.set_machine(src)
var/holding_text
if(holding)
@@ -112,7 +112,7 @@ Target Pressure: <A href='?src=\ref[src];pressure_adj=-1000'>-</A> <A href='?src
return
if (((get_dist(src, usr) <= 1) && istype(src.loc, /turf)))
usr.machine = src
usr.set_machine(src)
if(href_list["power"])
on = !on

View File

@@ -143,7 +143,7 @@
/obj/machinery/portable_atmospherics/scrubber/attack_hand(var/mob/user as mob)
user.machine = src
user.set_machine(src)
var/holding_text
if(holding)
@@ -172,7 +172,7 @@ Power regulator: <A href='?src=\ref[src];volume_adj=-1000'>-</A> <A href='?src=\
return
if (((get_dist(src, usr) <= 1) && istype(src.loc, /turf)))
usr.machine = src
usr.set_machine(src)
if(href_list["power"])
on = !on

View File

@@ -164,7 +164,7 @@ var/global/list/autolathe_recipes_hidden = list( \
del(src)
return 1
else
user.machine = src
user.set_machine(src)
interact(user)
return 1
@@ -218,14 +218,14 @@ var/global/list/autolathe_recipes_hidden = list( \
return src.attack_hand(user)
attack_hand(mob/user as mob)
user.machine = src
user.set_machine(src)
interact(user)
Topic(href, href_list)
if(..())
return
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)
if (!busy)
if(href_list["make"])

View File

@@ -77,7 +77,7 @@
/obj/machinery/biogenerator/proc/interact(mob/user as mob)
if(stat & BROKEN)
return
user.machine = src
user.set_machine(src)
var/dat = "<TITLE>Biogenerator</TITLE>Biogenerator:<BR>"
if (processing)
dat += "<FONT COLOR=red>Biogenerator is processing! Please wait...</FONT>"
@@ -206,7 +206,7 @@
if(usr.stat || usr.restrained()) return
if(!in_range(src, usr)) return
usr.machine = src
usr.set_machine(src)
switch(href_list["action"])
if("activate")

View File

@@ -76,7 +76,7 @@
. = ..()
if (.)
return
usr.machine = src
usr.set_machine(src)
interact(user)
/obj/machinery/bot/cleanbot/proc/interact(mob/user as mob)
@@ -105,7 +105,7 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
/obj/machinery/bot/cleanbot/Topic(href, href_list)
if(..())
return
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)
switch(href_list["operation"])
if("start")

View File

@@ -150,7 +150,7 @@ Auto Patrol: []"},
/obj/machinery/bot/ed209/Topic(href, href_list)
if (..())
return
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)
if(lasercolor && (istype(usr,/mob/living/carbon/human)))
var/mob/living/carbon/human/H = usr

View File

@@ -72,7 +72,7 @@
. = ..()
if (.)
return
usr.machine = src
usr.set_machine(src)
interact(user)
/obj/machinery/bot/floorbot/proc/interact(mob/user as mob)
@@ -131,7 +131,7 @@
/obj/machinery/bot/floorbot/Topic(href, href_list)
if(..())
return
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)
switch(href_list["operation"])
if("start")

View File

@@ -135,7 +135,7 @@
/obj/machinery/bot/medbot/Topic(href, href_list)
if(..())
return
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)
if ((href_list["power"]) && (src.allowed(usr)))
if (src.on)

View File

@@ -192,14 +192,14 @@
/obj/machinery/bot/mulebot/attack_ai(var/mob/user)
user.machine = src
user.set_machine(src)
interact(user, 1)
/obj/machinery/bot/mulebot/attack_hand(var/mob/user)
. = ..()
if (.)
return
user.machine = src
user.set_machine(src)
interact(user, 0)
/obj/machinery/bot/mulebot/proc/interact(var/mob/user, var/ai=0)
@@ -290,7 +290,7 @@
if (usr.stat)
return
if ((in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))
usr.machine = src
usr.set_machine(src)
switch(href_list["op"])
if("lock", "unlock")
@@ -390,7 +390,7 @@
auto_pickup = !auto_pickup
if("close")
usr.machine = null
usr.unset_machine()
usr << browse(null,"window=mulebot")
@@ -429,7 +429,7 @@
//src.updateUsrDialog()
else
usr << browse(null, "window=mulebot")
usr.machine = null
usr.unset_machine()
return

View File

@@ -99,7 +99,7 @@
. = ..()
if(.)
return
usr.machine = src
usr.set_machine(src)
interact(user)
/obj/machinery/bot/secbot/proc/interact(mob/user as mob)
@@ -131,7 +131,7 @@ Auto Patrol: []"},
return
/obj/machinery/bot/secbot/Topic(href, href_list)
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)
if((href_list["power"]) && (src.allowed(usr)))
if(src.on)

View File

@@ -66,7 +66,7 @@
if (istype(O.machine, /obj/machinery/computer/security))
var/obj/machinery/computer/security/S = O.machine
if (S.current == src)
O.machine = null
O.unset_machine()
O.reset_view(null)
O << "The screen bursts into static."
..()
@@ -194,7 +194,7 @@
if (istype(O.machine, /obj/machinery/computer/security))
var/obj/machinery/computer/security/S = O.machine
if (S.current == src)
O.machine = null
O.unset_machine()
O.reset_view(null)
O << "The screen bursts into static."

View File

@@ -102,7 +102,7 @@
if(!panel_open)
return
user.machine = src
user.set_machine(src)
var/t1 = text("<B>Access Panel</B><br>\n")
var/list/wires = list(
"Orange" = 1,
@@ -136,7 +136,7 @@
/obj/machinery/camera/Topic(href, href_list)
..()
if (in_range(src, usr) && istype(src.loc, /turf))
usr.machine = src
usr.set_machine(src)
if (href_list["wires"])
var/t1 = text2num(href_list["wires"])
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
@@ -158,7 +158,7 @@
src.pulse(t1)
else if (href_list["close2"])
usr << browse(null, "window=wires")
usr.machine = null
usr.unset_machine()
return

View File

@@ -20,7 +20,7 @@
if(..())
return
user.machine = src
user.set_machine(src)
var/dat
@@ -63,7 +63,7 @@
if(..())
return
if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
usr.set_machine(src)
if(href_list["emptycourt"])
target = locate(/area/holodeck/source_emptycourt)

View File

@@ -33,11 +33,11 @@
/obj/machinery/computer/operating/proc/interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
user.unset_machine()
user << browse(null, "window=op")
return
user.machine = src
user.set_machine(src)
var/dat = "<HEAD><TITLE>Operating Computer</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
dat += "<A HREF='?src=\ref[user];mach_close=op'>Close</A><br><br>" //| <A HREF='?src=\ref[user];update=1'>Update</A>"
if(src.table && (src.table.check_victim()))
@@ -71,7 +71,7 @@
if(..())
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
usr.set_machine(src)
return

View File

@@ -68,7 +68,7 @@
user << "\red <b>ERROR</b>: \black Remote access channel disabled."
return
user.machine = src
user.set_machine(src)
var/dat = "<h3>AI System Integrity Restorer</h3><br><br>"
if (src.occupant)

View File

@@ -61,7 +61,7 @@
/obj/machinery/computer/arcade/attack_hand(mob/user as mob)
if(..())
return
user.machine = src
user.set_machine(src)
var/dat = "<a href='byond://?src=\ref[src];close=1'>Close</a>"
dat += "<center><h4>[src.enemy_name]</h4></center>"
@@ -126,7 +126,7 @@
src.arcade_action()
if (href_list["close"])
usr.machine = null
usr.unset_machine()
usr << browse(null, "window=arcade")
else if (href_list["newgame"]) //Reset everything

View File

@@ -41,7 +41,7 @@
attack_hand(mob/user)
user << browse(return_text(),"window=computer")
user.machine = src
user.set_machine(src)
onclose(user, "computer")
process()

View File

@@ -34,7 +34,7 @@
if(stat & (NOPOWER|BROKEN)) return
if(!isAI(user))
user.machine = src
user.set_machine(src)
var/list/L = list()
for (var/obj/machinery/camera/C in cameranet.cameras)
@@ -50,13 +50,13 @@
var/t = input(user, "Which camera should you change to?") as null|anything in D
if(!t)
user.machine = null
user.unset_machine()
return 0
var/obj/machinery/camera/C = D[t]
if(t == "Cancel")
user.machine = null
user.unset_machine()
return 0
if(C)

View File

@@ -46,7 +46,7 @@
if(..())
return
user.machine = src
user.set_machine(src)
var/dat
if (!( ticker ))
return
@@ -171,7 +171,7 @@
/obj/machinery/computer/card/Topic(href, href_list)
if(..())
return
usr.machine = src
usr.set_machine(src)
switch(href_list["choice"])
if ("modify")
if (modify)

View File

@@ -155,7 +155,7 @@
return attack_hand(user)
/obj/machinery/computer/cloning/attack_hand(mob/user as mob)
user.machine = src
user.set_machine(src)
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))

View File

@@ -46,7 +46,7 @@
if (src.z > 6)
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
usr.machine = src
usr.set_machine(src)
if(!href_list["operation"])
return
@@ -281,7 +281,7 @@
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
user.machine = src
user.set_machine(src)
var/dat = "<head><title>Communications Console</title></head><body>"
if (emergency_shuttle.online && emergency_shuttle.location==0)
var/timeleft = emergency_shuttle.timeleft()

View File

@@ -46,7 +46,7 @@
return
if( href_list["close"] )
usr << browse(null, "window=crewcomp")
usr.machine = null
usr.unset_machine()
return
if(href_list["update"])
src.updateDialog()
@@ -57,10 +57,10 @@
interact(mob/user)
if( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if(!istype(user, /mob/living/silicon))
user.machine = null
user.unset_machine()
user << browse(null, "window=powcomp")
return
user.machine = src
user.set_machine(src)
src.scan()
var/t = "<TT><B>Crew Monitoring</B><HR>"
t += "<BR><A href='?src=\ref[src];update=1'>Refresh</A> "

View File

@@ -46,7 +46,7 @@
/obj/machinery/computer/hologram_comp/proc/show_console(var/mob/user as mob)
var/dat
user.machine = src
user.set_machine(src)
if (src.temp)
dat = text("[]<BR><BR><A href='?src=\ref[];temp=1'>Clear</A>", src.temp, src)
else

View File

@@ -111,7 +111,7 @@
if (!( data_core.medical.Find(src.active2) ))
src.active2 = null
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
usr.set_machine(src)
if (href_list["temp"])
src.temp = null
if (href_list["scan"])

View File

@@ -118,7 +118,7 @@
return
var/dat = "<HTML><BODY><TT><B>[title]</B>"
user.machine = src
user.set_machine(src)
if(connected)
var/d2
if(timing) //door controls do not need timers.
@@ -162,7 +162,7 @@
if(..())
return
if((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
usr.set_machine(src)
if(href_list["power"])
var/t = text2num(href_list["power"])
t = min(max(0.25, t), 16)

View File

@@ -72,12 +72,12 @@
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
user.unset_machine()
user << browse(null, "window=powcomp")
return
user.machine = src
user.set_machine(src)
var/t = "<TT><B>Power Monitoring</B><HR>"
t += "<BR><HR><A href='?src=\ref[src];update=1'>Refresh</A>"
@@ -119,7 +119,7 @@
..()
if( href_list["close"] )
usr << browse(null, "window=powcomp")
usr.machine = null
usr.unset_machine()
return
if( href_list["update"] )
src.updateDialog()

View File

@@ -25,7 +25,7 @@
attack_hand(var/mob/user as mob)
if(..())
return
user.machine = src
user.set_machine(src)
var/dat
dat += "<B>Prisoner Implant Manager System</B><BR>"
if(screen == 0)
@@ -74,7 +74,7 @@
if(..())
return
if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
usr.set_machine(src)
if(href_list["inject1"])
var/obj/item/weapon/implant/I = locate(href_list["inject1"])

View File

@@ -72,7 +72,7 @@ var/prison_shuttle_timeleft = 0
return
if(..())
return
user.machine = src
user.set_machine(src)
post_signal("prison")
var/dat
if (src.temp)
@@ -93,7 +93,7 @@ var/prison_shuttle_timeleft = 0
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
usr.set_machine(src)
if (href_list["sendtodock"])
if (!prison_can_move())

View File

@@ -31,7 +31,7 @@
if (src.z > 6)
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
user.machine = src
user.set_machine(src)
var/dat
if (src.temp)
dat = "<TT>[src.temp]</TT><BR><BR><A href='?src=\ref[src];temp=1'>Clear Screen</A>"
@@ -104,7 +104,7 @@
if(..())
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
usr.set_machine(src)
if (href_list["eject"])
src.temp = {"Destroy Robots?<BR>

View File

@@ -187,7 +187,7 @@ What a mess.*/
if (!( data_core.security.Find(active2) ))
active2 = null
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
usr.set_machine(src)
switch(href_list["choice"])
// SORTING!
if("Sorting")

View File

@@ -186,7 +186,7 @@ var/specops_shuttle_timeleft = 0
if(..())
return
user.machine = src
user.set_machine(src)
var/dat
if (temp)
dat = temp
@@ -205,7 +205,7 @@ var/specops_shuttle_timeleft = 0
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
usr.set_machine(src)
if (href_list["sendtodock"])
if(!specops_shuttle_at_station|| specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return

View File

@@ -24,7 +24,7 @@
proc/interact(mob/user)
usr.machine = src
usr.set_machine(src)
var/dat = "<HEAD><TITLE>Current Station Alerts</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
dat += "<A HREF='?src=\ref[user];mach_close=alerts'>Close</A><br><br>"
for (var/cat in src.alarms)

View File

@@ -153,7 +153,7 @@ var/bomb_set = 1
if(..())
return
user.machine = src
user.set_machine(src)
var/dat
if (src.temp)
dat = src.temp
@@ -172,7 +172,7 @@ var/bomb_set = 1
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
usr.set_machine(src)
if (href_list["sendtospace"])
if(!syndicate_station_at_station|| syndicate_station_moving_to_station || syndicate_station_moving_to_space) return

View File

@@ -199,7 +199,7 @@ var/syndicate_elite_shuttle_timeleft = 0
if(..())
return
user.machine = src
user.set_machine(src)
var/dat
if (temp)
dat = temp
@@ -218,7 +218,7 @@ var/syndicate_elite_shuttle_timeleft = 0
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
usr.set_machine(src)
if (href_list["sendtodock"])
if(!syndicate_elite_shuttle_at_station|| syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return

View File

@@ -63,7 +63,7 @@
return
/obj/machinery/atmospherics/unary/cryo_cell/attack_hand(mob/user as mob)
user.machine = src
user.set_machine(src)
var/beaker_text = ""
var/health_text = ""
var/temp_text = ""
@@ -90,7 +90,7 @@
[beaker_text]<BR><BR>
<B>Current occupant:</B> [occupant ? "<BR>Name: [occupant]<BR>Health: [health_text]<BR>Oxygen deprivation: [round(occupant.getOxyLoss(),0.1)]<BR>Brute damage: [round(occupant.getBruteLoss(),0.1)]<BR>Fire damage: [round(occupant.getFireLoss(),0.1)]<BR>Toxin damage: [round(occupant.getToxLoss(),0.1)]<BR>Body temperature: [occupant.bodytemperature]" : "<FONT color=red>None</FONT>"]<BR>
"}
user.machine = src
user.set_machine(src)
user << browse(dat, "window=cryo")
onclose(user, "cryo")

View File

@@ -680,7 +680,7 @@ About the new airlock wires panel:
user << "Airlock AI control has been blocked with a firewall. Unable to hack."
//Separate interface for the AI.
user.machine = src
user.set_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)))
@@ -855,7 +855,7 @@ About the new airlock wires panel:
return
if(src.p_open)
user.machine = src
user.set_machine(src)
var/t1 = text("<B>Access Panel</B><br>\n")
//t1 += text("[]: ", airlockFeatureNames[airlockWireColorToIndex[9]])
@@ -908,11 +908,11 @@ About the new airlock wires panel:
if(href_list["close"])
usr << browse(null, "window=airlock")
if(usr.machine==src)
usr.machine = null
usr.unset_machine()
return
if((in_range(src, usr) && istype(src.loc, /turf)) && src.p_open)
usr.machine = src
usr.set_machine(src)
if(href_list["wires"])
var/t1 = text2num(href_list["wires"])
if(!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))

View File

@@ -132,7 +132,7 @@
return
var/second = round(timeleft() % 60)
var/minute = round((timeleft() - second) / 60)
user.machine = src
user.set_machine(src)
var/dat = "<HTML><BODY><TT>"
dat += "<HR>Timer System:</hr>"
dat += "<b>Door [src.id] controls</b><br/>"
@@ -169,7 +169,7 @@
if(!src.allowed(usr))
return
usr.machine = src
usr.set_machine(src)
if(href_list["timing"])
src.timing = text2num(href_list["timing"])
else

View File

@@ -29,7 +29,7 @@ obj/machinery/embedded_controller
attack_hand(mob/user)
user << browse(return_text(), "window=computer")
user.machine = src
user.set_machine(src)
onclose(user, "computer")
update_icon()
@@ -53,7 +53,7 @@ obj/machinery/embedded_controller
program.receive_user_command(href_list["command"])
spawn(5) program.process()
usr.machine = src
usr.set_machine(src)
spawn(5) src.updateDialog()
process()

View File

@@ -59,7 +59,7 @@
return 0
/obj/machinery/juicer/attack_hand(mob/user as mob)
user.machine = src
user.set_machine(src)
interact(user)
/obj/machinery/juicer/proc/interact(mob/user as mob) // The microwave Menu
@@ -105,7 +105,7 @@
/obj/machinery/juicer/Topic(href, href_list)
if(..())
return
usr.machine = src
usr.set_machine(src)
switch(href_list["action"])
if ("juice")
juice()

View File

@@ -139,7 +139,7 @@
return 0
/obj/machinery/microwave/attack_hand(mob/user as mob)
user.machine = src
user.set_machine(src)
interact(user)
/*******************
@@ -357,7 +357,7 @@
if(..())
return
usr.machine = src
usr.set_machine(src)
if(src.operating)
src.updateUsrDialog()
return

View File

@@ -82,7 +82,7 @@
return 0
/obj/machinery/smartfridge/attack_hand(mob/user as mob)
user.machine = src
user.set_machine(src)
interact(user)
/*******************
@@ -115,7 +115,7 @@
if(..())
return
usr.machine = src
usr.set_machine(src)
var/N = href_list["vend"]

View File

@@ -249,7 +249,7 @@
attack_hand(mob/user as mob)
if(stat & (BROKEN|NOPOWER))
return
user.machine = src
user.set_machine(src)
var/dat = "<B>Magnetic Control Console</B><BR><BR>"
if(!autolink)
dat += {"
@@ -277,7 +277,7 @@
Topic(href, href_list)
if(stat & (BROKEN|NOPOWER))
return
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["radio-op"])

View File

@@ -186,7 +186,7 @@ Transponder Codes:<UL>"}
return
if ((in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))
if(open && !locked)
usr.machine = src
usr.set_machine(src)
if (href_list["freq"])
freq = sanitize_frequency(freq + text2num(href_list["freq"]))

View File

@@ -414,7 +414,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if(..())
return
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
usr.set_machine(src)
if(href_list["set_channel_name"])
src.channel_name = strip_html_simple(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
while (findtext(src.channel_name," ") == 1)
@@ -810,7 +810,7 @@ obj/item/weapon/newspaper/Topic(href, href_list)
var/mob/living/U = usr
..()
if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ))
U.machine = src
U.set_machine(src)
if(href_list["next_page"])
if(curr_page==src.pages+1)
return //Don't need that at all, but anyway.

View File

@@ -4,7 +4,7 @@
set name = ".map"
set category = "Object"
set src in view(1)
usr.machine = src
usr.set_machine(src)
if(!mapping) return
log_game("[usr]([usr.key]) used station map L[z] in [src.loc.loc]")
@@ -356,5 +356,5 @@ proc/getb(col)
del(O)
mapobjs = null
src.machine = null
src.unset_machine()

View File

@@ -50,7 +50,7 @@
if(unwrenched || !usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
usr << browse(null, "window=pipedispenser")
return
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["make"])
if(!wait)
@@ -160,7 +160,7 @@ Nah
/obj/machinery/pipedispenser/disposal/Topic(href, href_list)
if(..())
return
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["dmake"])
if(unwrenched || !usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))

View File

@@ -234,7 +234,7 @@ Status: []<BR>"},
/obj/machinery/porta_turret/Topic(href, href_list)
if (..())
return
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)
if ((href_list["power"]) && (src.allowed(usr)))
if(anchored) // you can't turn a turret on/off if it's not anchored/secured
@@ -987,7 +987,7 @@ Status: []<BR>"},
/obj/machinery/porta_turret_cover/Topic(href, href_list)
if (..())
return
usr.machine = src
usr.set_machine(src)
Parent_Turret.add_fingerprint(usr)
src.add_fingerprint(usr)
if ((href_list["power"]) && (Parent_Turret.allowed(usr)))

View File

@@ -197,7 +197,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
/obj/machinery/requests_console/Topic(href, href_list)
if(..()) return
usr.machine = src
usr.set_machine(src)
add_fingerprint(usr)
if(reject_bad_text(href_list["write"]))

View File

@@ -75,7 +75,7 @@ Please wait until completion...</TT><BR>
if (..())
return
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)
if (href_list["make"])

View File

@@ -69,7 +69,7 @@
update_icon()
if(!open && user.machine == src)
user << browse(null, "window=spaceheater")
user.machine = null
user.unset_machine()
else
..()
return
@@ -94,7 +94,7 @@
dat += " [set_temperature]&deg;C "
dat += "<A href='?src=\ref[src];op=temp;val=5'>+</A><BR>"
user.machine = src
user.set_machine(src)
user << browse("<HEAD><TITLE>Space Heater Control Panel</TITLE></HEAD><TT>[dat]</TT>", "window=spaceheater")
onclose(user, "spaceheater")
@@ -112,7 +112,7 @@
if (usr.stat)
return
if ((in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))
usr.machine = src
usr.set_machine(src)
switch(href_list["op"])
@@ -145,7 +145,7 @@
updateDialog()
else
usr << browse(null, "window=spaceheater")
usr.machine = null
usr.unset_machine()
return

View File

@@ -155,7 +155,7 @@
if(..())
return
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
usr.machine = src
usr.set_machine(src)
if (href_list["toggleUV"])
src.toggleUV(usr)
src.updateUsrDialog()

View File

@@ -20,7 +20,7 @@
var/charges = 1
attack_hand(var/mob/user as mob)
usr.machine = src
usr.set_machine(src)
var/dat = "<font color=#005500><i>Scanning [pick("retina pattern", "voice print", "fingerprints", "dna sequence")]...<br>Identity confirmed,<br></i></font>"
if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai))
if(is_special_character(user))

View File

@@ -102,6 +102,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
// In case message_delay is left on 1, otherwise it won't reset the list and people can't say the same thing twice anymore.
if(message_delay)
message_delay = 0
..()
/*
@@ -495,7 +496,6 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
/proc/Broadcast_SimpleMessage(var/source, var/frequency, var/text, var/data, var/mob/M, var/compression, var/level)
/* ###### Prepare the radio connection ###### */
if(!M)

View File

@@ -18,7 +18,7 @@
attack_hand(mob/user as mob)
if(stat & (BROKEN|NOPOWER))
return
user.machine = src
user.set_machine(src)
var/dat = "<TITLE>Telecommunication Server Monitor</TITLE><center><b>Telecommunications Server Monitor</b></center>"
switch(screen)
@@ -139,7 +139,7 @@
add_fingerprint(usr)
usr.machine = src
usr.set_machine(src)
if(href_list["viewserver"])
screen = 1

View File

@@ -108,7 +108,7 @@
var/obj/item/device/multitool/P = get_multitool(user)
user.machine = src
user.set_machine(src)
var/dat
dat = "<font face = \"Courier\"><HEAD><TITLE>[src.name]</TITLE></HEAD><center><H3>[src.name] Access</H3></center>"
dat += "<br>[temp]<br>"
@@ -395,7 +395,7 @@
src.Options_Topic(href, href_list)
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)
updateUsrDialog()

View File

@@ -69,7 +69,6 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
send_count++
if(machine.is_freq_listening(signal))
machine.traffic++
machine.receive_information(signal, src)
continue
// If we're sending a copy, be sure to create the copy for EACH machine and paste the data
var/datum/signal/copy = new

View File

@@ -22,7 +22,7 @@
attack_hand(mob/user as mob)
if(stat & (BROKEN|NOPOWER))
return
user.machine = src
user.set_machine(src)
var/dat = "<TITLE>Telecommunications Monitor</TITLE><center><b>Telecommunications Monitor</b></center>"
switch(screen)
@@ -71,7 +71,7 @@
add_fingerprint(usr)
usr.machine = src
usr.set_machine(src)
if(href_list["viewmachine"])
screen = 1

View File

@@ -73,7 +73,7 @@
attack_hand(mob/user as mob)
if(stat & (BROKEN|NOPOWER))
return
user.machine = src
user.set_machine(src)
var/dat = "<TITLE>Telecommunication Traffic Control</TITLE><center><b>Telecommunications Traffic Control</b></center>"
switch(screen)
@@ -123,7 +123,7 @@
add_fingerprint(usr)
usr.machine = src
usr.set_machine(src)
if(!src.allowed(usr) && !emagged)
usr << "\red ACCESS DENIED."
return

View File

@@ -7,25 +7,12 @@
anchored = 1
density = 1
var/transform_dead = 0
var/transform_standing = 0
/obj/machinery/transformer/New()
// On us
..()
var/turf/T = loc
if(T)
// Spawn Conveyour Belts
//East
var/turf/east = locate(T.x + 1, T.y, T.z)
if(istype(east, /turf/simulated/floor))
new /obj/machinery/conveyor(east, WEST, 1)
// West
var/turf/west = locate(T.x - 1, T.y, T.z)
if(istype(west, /turf/simulated/floor))
new /obj/machinery/conveyor(west, WEST, 1)
// On us
new /obj/machinery/conveyor(T, WEST, 1)
new /obj/machinery/conveyor(loc, WEST, 1)
/obj/machinery/transformer/Bumped(var/atom/movable/AM)
// HasEntered didn't like people lying down.
@@ -33,7 +20,7 @@
// Only humans can enter from the west side, while lying down.
var/move_dir = get_dir(loc, AM.loc)
var/mob/living/carbon/human/H = AM
if(H.lying && move_dir == EAST)// || move_dir == WEST)
if((transform_standing || H.lying) && move_dir == EAST)// || move_dir == WEST)
AM.loc = src.loc
transform(AM)
@@ -51,3 +38,19 @@
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
if(robot)
robot.lying = 0
/obj/machinery/transformer/conveyor/New()
..()
var/turf/T = loc
if(T)
// Spawn Conveyour Belts
//East
var/turf/east = locate(T.x + 1, T.y, T.z)
if(istype(east, /turf/simulated/floor))
new /obj/machinery/conveyor(east, WEST, 1)
// West
var/turf/west = locate(T.x - 1, T.y, T.z)
if(istype(west, /turf/simulated/floor))
new /obj/machinery/conveyor(west, WEST, 1)

View File

@@ -356,7 +356,7 @@
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] the panel.</span>"
if (locked)
if (user.machine==src)
user.machine = null
user.unset_machine()
user << browse(null, "window=turretid")
else
if (user.machine==src)
@@ -374,11 +374,11 @@
if ( get_dist(src, user) > 0 )
if ( !issilicon(user) )
user << "<span class='notice'>You are too far away.</span>"
user.machine = null
user.unset_machine()
user << browse(null, "window=turretid")
return
user.machine = src
user.set_machine(src)
var/loc = src.loc
if (istype(loc, /turf))
loc = loc:loc
@@ -515,7 +515,7 @@
attack_hand(mob/user as mob)
user.machine = src
user.set_machine(src)
var/dat = {"<html>
<head><title>[src] Control</title></head>
<body>

View File

@@ -128,7 +128,7 @@
/obj/machinery/vending/attack_hand(mob/user as mob)
if(stat & (BROKEN|NOPOWER))
return
user.machine = src
user.set_machine(src)
if(src.seconds_electrified != 0)
if(src.shock(user, 100))
@@ -223,7 +223,7 @@
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
usr.machine = src
usr.set_machine(src)
if ((href_list["vend"]) && (src.vend_ready))
if ((!src.allowed(usr)) && (!src.emagged) && (src.wires & WIRE_SCANID)) //For SECURE VENDING MACHINES YEAH

View File

@@ -11,7 +11,7 @@
var/insisting = 0
/obj/machinery/wish_granter/attack_hand(var/mob/user as mob)
usr.machine = src
usr.set_machine(src)
if(charges <= 0)
user << "The Wish Granter lies silent."

View File

@@ -532,7 +532,7 @@
return
if(!operation_allowed(user))
return
user.machine = src
user.set_machine(src)
var/turf/exit = get_step(src,SOUTH)
if(exit.density)
src.visible_message("\icon[src] <b>[src]</b> beeps, \"Error! Part outlet is obstructed\".")

View File

@@ -17,7 +17,7 @@
attack_hand(var/mob/user as mob)
if(..())
return
user.machine = src
user.set_machine(src)
var/dat = "<html><head><title>[src.name]</title><style>h3 {margin: 0px; padding: 0px;}</style></head><body>"
if(screen == 0)
dat += "<h3>Tracking beacons data</h3>"

View File

@@ -233,7 +233,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
//NOTE: graphic resources are loaded on client login
/obj/item/device/pda/attack_self(mob/user as mob)
user.machine = src
user.set_machine(src)
if(active_uplink_check(user))
return
@@ -438,14 +438,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
if ( !(U.stat || U.restrained()) )
add_fingerprint(U)
U.machine = src
U.set_machine(src)
switch(href_list["choice"])
//BASIC FUNCTIONS===================================
if("Close")//Self explanatory
U.machine = null
U.unset_machine()
U << browse(null, "window=pda")
return
if("Refresh")//Refresh, goes to the end of the proc.
@@ -635,7 +635,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
else
U << "PDA not found."
else
U.machine = null
U.unset_machine()
U << browse(null, "window=pda")
return
@@ -656,11 +656,11 @@ var/global/list/obj/item/device/pda/PDAs = list()
cartridge.mode = mode
cartridge.unlock()
else//If can't interact.
U.machine = null
U.unset_machine()
U << browse(null, "window=pda")
return
else//If not in range or not using the pda.
U.machine = null
U.unset_machine()
U << browse(null, "window=pda")
return
@@ -676,7 +676,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(U.machine == src && href_list["skiprefresh"]!="1")//Final safety.
attack_self(U)//It auto-closes the menu prior if the user is not in range and so on.
else
U.machine = null
U.unset_machine()
U << browse(null, "window=pda")
return

View File

@@ -641,7 +641,7 @@ Code:
..()
if (!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
usr.machine = null
usr.unset_machine()
usr << browse(null, "window=pda")
return

View File

@@ -33,7 +33,7 @@
attack_self(mob/user)
if (!in_range(src, user))
return
user.machine = src
user.set_machine(src)
var/dat = "<TT><B>Intelicard</B><BR>"
var/laws
for(var/mob/living/silicon/ai/A in src)
@@ -82,16 +82,16 @@
var/mob/U = usr
if (!in_range(src, U)||U.machine!=src)//If they are not in range of 1 or less or their machine is not the card (ie, clicked on something else).
U << browse(null, "window=aicard")
U.machine = null
U.unset_machine()
return
add_fingerprint(U)
U.machine = src
U.set_machine(src)
switch(href_list["choice"])//Now we switch based on choice.
if ("Close")
U << browse(null, "window=aicard")
U.machine = null
U.unset_machine()
return
if ("Wipe")
@@ -99,7 +99,7 @@
if(confirm == "Yes")
if(isnull(src)||!in_range(src, U)||U.machine!=src)
U << browse(null, "window=aicard")
U.machine = null
U.unset_machine()
return
else
flush = 1

View File

@@ -24,7 +24,7 @@
/obj/item/device/paicard/attack_self(mob/user)
if (!in_range(src, user))
return
user.machine = src
user.set_machine(src)
var/dat = "<TT><B>Personal AI Device</B><BR>"
if(pai && (!pai.master_dna || !pai.master))
dat += "<a href='byond://?src=\ref[src];setdna=1'>Imprint Master DNA</a><br>"

View File

@@ -44,7 +44,7 @@
if(usr.stat || usr.restrained())
return
if(((istype(usr, /mob/living/carbon/human) && ((!( ticker ) || (ticker && ticker.mode != "monkey")) && usr.contents.Find(src))) || (usr.contents.Find(master) || (in_range(src, usr) && istype(loc, /turf)))))
usr.machine = src
usr.set_machine(src)
if(href_list["freq"])
var/new_frequency = sanitize_frequency(frequency + text2num(href_list["freq"]))
set_frequency(new_frequency)
@@ -106,7 +106,7 @@
if(!istype(user, /mob/living/carbon/human))
return
user.machine = src
user.set_machine(src)
var/dat = {"<TT>
<A href='?src=\ref[src];power=1'>Turn [on ? "Off" : "On"]</A><BR>
<B>Frequency/Code</B> for electropack:<BR>

View File

@@ -158,7 +158,7 @@
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.machine = src
user.set_machine(src)
if (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
return

View File

@@ -71,7 +71,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
/obj/item/device/radio/attack_self(mob/user as mob)
user.machine = src
user.set_machine(src)
interact(user)
/obj/item/device/radio/proc/interact(mob/user as mob)
@@ -129,7 +129,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
if (!(issilicon(usr) || (usr.contents.Find(src) || ( in_range(src, usr) && istype(loc, /turf) ))))
usr << browse(null, "window=radio")
return
usr.machine = src
usr.set_machine(src)
if (href_list["track"])
var/mob/target = locate(href_list["track"])
var/mob/living/silicon/ai/A = locate(href_list["track2"])
@@ -643,7 +643,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
user.machine = src
user.set_machine(src)
if (!( istype(W, /obj/item/weapon/screwdriver) ))
return
b_stat = !( b_stat )
@@ -675,7 +675,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.machine = src
user.set_machine(src)
if (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
return

View File

@@ -63,7 +63,7 @@
/obj/item/device/transfer_valve/attack_self(mob/user as mob)
user.machine = src
user.set_machine(src)
var/dat = {"<B> Valve properties: </B>
<BR> <B> Attachment one:</B> [tank_one] [tank_one ? "<A href='?src=\ref[src];tankone=1'>Remove</A>" : ""]
<BR> <B> Attachment two:</B> [tank_two] [tank_two ? "<A href='?src=\ref[src];tanktwo=1'>Remove</A>" : ""]

View File

@@ -314,7 +314,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
return 0
if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
usr.machine = src
usr.set_machine(src)
if(href_list["lock"])
toggle()
usr << browse(null, "window=hidden")

View File

@@ -237,7 +237,7 @@
/obj/item/device/violin/attack_self(mob/user as mob)
if(!isliving(user) || user.stat || user.restrained() || user.lying) return
user.machine = src
user.set_machine(src)
var/dat = "<HEAD><TITLE>Violin</TITLE></HEAD><BODY>"

View File

@@ -39,7 +39,7 @@
return
if (!src || amount<=0)
user << browse(null, "window=stack")
user.machine = src //for correct work of onclose
user.set_machine(src) //for correct work of onclose
var/t1 = text("<HTML><HEAD><title>Constructions from []</title></HEAD><body><TT>Amount Left: []<br>", src, src.amount)
for(var/i=1;i<=recipes.len,i++)
var/datum/stack_recipe/R = recipes[i]

View File

@@ -87,7 +87,7 @@
if ((usr.stat || usr.restrained()))
return
if (usr.contents.Find(src))
usr.machine = src
usr.set_machine(src)
if (href_list["remove"])
var/obj/item/P = locate(href_list["remove"])
if ((P && P.loc == src))

View File

@@ -136,7 +136,7 @@
/obj/item/weapon/flamethrower/attack_self(mob/user as mob)
if(user.stat || user.restrained() || user.lying) return
user.machine = src
user.set_machine(src)
if(!ptank)
user << "<span class='notice'>Attach a plasma tank first!</span>"
return
@@ -148,11 +148,11 @@
/obj/item/weapon/flamethrower/Topic(href,href_list[])
if(href_list["close"])
usr.machine = null
usr.unset_machine()
usr << browse(null, "window=flamethrower")
return
if(usr.stat || usr.restrained() || usr.lying) return
usr.machine = src
usr.set_machine(src)
if(href_list["light"])
if(!ptank) return
if(ptank.air_contents.toxins < 1) return
@@ -168,7 +168,7 @@
usr.put_in_hands(ptank)
ptank = null
lit = 0
usr.machine = null
usr.unset_machine()
usr << browse(null, "window=flamethrower")
for(var/mob/M in viewers(1, loc))
if((M.client && M.machine == src))

View File

@@ -32,7 +32,7 @@
attack_hand(mob/user as mob)
user.machine = src
user.set_machine(src)
var/health_text = ""
if(src.occupant)
if(src.occupant.health <= -100)
@@ -48,7 +48,7 @@
dat += "<B>Implants:</B> [src.implant_list.len ? "[implant_list.len]" : "<A href='?src=\ref[src];replenish=1'>Replenish</A>"]<BR>"
if(src.occupant)
dat += "[src.ready ? "<A href='?src=\ref[src];implant=1'>Implant</A>" : "Recharging"]<BR>"
user.machine = src
user.set_machine(src)
user << browse(dat, "window=implant")
onclose(user, "implant")

View File

@@ -57,7 +57,7 @@
attack_self(mob/user as mob)
user.machine = src
user.set_machine(src)
var/dat = "<B>Implant Mini-Computer:</B><HR>"
if (src.case)
if(src.case.imp)
@@ -83,7 +83,7 @@
if (usr.stat)
return
if ((usr.contents.Find(src)) || ((in_range(src, usr) && istype(src.loc, /turf))))
usr.machine = src
usr.set_machine(src)
if (href_list["tracking_id"])
var/obj/item/weapon/implant/tracking/T = src.case.imp
T.id += text2num(href_list["tracking_id"])

Some files were not shown because too many files have changed in this diff Show More