Merge remote-tracking branch 'refs/remotes/ParadiseSS13/master' into DWI

This commit is contained in:
Aurorablade
2016-12-24 00:18:40 -05:00
192 changed files with 2244 additions and 1740 deletions
+4 -1
View File
@@ -33,7 +33,7 @@ Pipelines + Other Objects -> Pipe network
/obj/machinery/atmospherics/New()
..()
if(!icon_manager)
icon_manager = new()
@@ -318,3 +318,6 @@ Pipelines + Other Objects -> Pipe network
/obj/machinery/atmospherics/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)
Deconstruct()
/obj/machinery/atmospherics/update_remote_sight(mob/user)
user.sight |= (SEE_TURFS|BLIND)
@@ -108,22 +108,16 @@
return 1
/obj/machinery/atmospherics/omni/filter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
/obj/machinery/atmospherics/omni/filter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, force_open = 0)
usr.set_machine(src)
var/list/data = new()
data = build_uidata()
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "omni_filter.tmpl", "Omni Filter Control", 330, 330)
ui.set_initial_data(data)
ui.open()
/obj/machinery/atmospherics/omni/filter/proc/build_uidata()
var/list/data = new()
/obj/machinery/atmospherics/omni/filter/ui_data(mob/user, datum/topic_state/state)
var/data[0]
data["power"] = on
data["config"] = configuring
@@ -132,22 +132,16 @@
return 1
/obj/machinery/atmospherics/omni/mixer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
/obj/machinery/atmospherics/omni/mixer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, force_open = 0)
usr.set_machine(src)
var/list/data = new()
data = build_uidata()
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "omni_mixer.tmpl", "Omni Mixer Control", 360, 330)
ui.set_initial_data(data)
ui.open()
/obj/machinery/atmospherics/omni/mixer/proc/build_uidata()
var/list/data = new()
/obj/machinery/atmospherics/omni/mixer/ui_data(mob/user, datum/topic_state/state)
var/data[0]
data["power"] = on
data["config"] = configuring
+18 -1
View File
@@ -43,4 +43,21 @@
#define R_MAXPERMISSION 32768 //This holds the maximum value for a permission. It is used in iteration, so keep it updated.
#define R_HOST 65535
#define R_HOST 65535
#define ADMIN_QUE(user) "(<a href='?_src_=holder;adminmoreinfo=[user.UID()]'>?</a>)"
#define ADMIN_FLW(user) "(<a href='?_src_=holder;adminplayerobservefollow=[user.UID()]'>FLW</a>)"
#define ADMIN_PP(user) "(<a href='?_src_=holder;adminplayeropts=[user.UID()]'>PP</a>)"
#define ADMIN_VV(atom) "(<a href='?_src_=vars;Vars=[atom.UID()]'>VV</a>)"
#define ADMIN_SM(user) "(<a href='?_src_=holder;subtlemessage=[user.UID()]'>SM</a>)"
#define ADMIN_TP(user) "(<a href='?_src_=holder;traitor=[user.UID()]'>TP</a>)"
#define ADMIN_BSA(user) "(<a href='?_src_=holder;BlueSpaceArtillery=[user.UID()]'>BSA</a>)"
#define ADMIN_CENTCOM_REPLY(user) "(<a href='?_src_=holder;CentcommReply=[user.UID()]'>RPLY</a>)"
#define ADMIN_SYNDICATE_REPLY(user) "(<a href='?_src_=holder;SyndicateReply=[user.UID()]'>RPLY</a>)"
#define ADMIN_SC(user) "(<a href='?_src_=holder;adminspawncookie=[user.UID()]'>SC</a>)"
#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]"
#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]"
#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)]"
#define ADMIN_JMP(src) "(<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)"
#define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]"
#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]"
+19 -16
View File
@@ -196,7 +196,7 @@
//Human Overlays Indexes/////////
#define MUTANTRACE_LAYER 1
#define TAIL_UNDERLIMBS_LAYER 2
#define TAIL_UNDERLIMBS_LAYER 2 //Tail split-rendering.
#define LIMBS_LAYER 3
#define MARKINGS_LAYER 4
#define UNDERWEAR_LAYER 5
@@ -211,21 +211,24 @@
#define BELT_LAYER 14 //Possible make this an overlay of somethign required to wear a belt?
#define SUIT_STORE_LAYER 15
#define BACK_LAYER 16
#define HAIR_LAYER 17 //TODO: make part of head layer?
#define HEAD_ACCESSORY_LAYER 18
#define FHAIR_LAYER 19
#define TAIL_LAYER 20 //bs12 specific. this hack is probably gonna come back to haunt me
#define GLASSES_LAYER 21
#define FACEMASK_LAYER 22
#define HEAD_LAYER 23
#define COLLAR_LAYER 24
#define HANDCUFF_LAYER 25
#define LEGCUFF_LAYER 26
#define L_HAND_LAYER 27
#define R_HAND_LAYER 28
#define TARGETED_LAYER 29 //BS12: Layer for the target overlay from weapon targeting system
#define FIRE_LAYER 30 //If you're on fire
#define TOTAL_LAYERS 30
#define HEAD_ACCESSORY_LAYER 17
#define FHAIR_LAYER 18
#define GLASSES_LAYER 19
#define HAIR_LAYER 20 //TODO: make part of head layer?
#define HEAD_ACC_OVER_LAYER 21 //Select-layer rendering.
#define FHAIR_OVER_LAYER 22 //Select-layer rendering.
#define GLASSES_OVER_LAYER 23 //Select-layer rendering.
#define TAIL_LAYER 24 //bs12 specific. this hack is probably gonna come back to haunt me
#define FACEMASK_LAYER 25
#define HEAD_LAYER 26
#define COLLAR_LAYER 27
#define HANDCUFF_LAYER 28
#define LEGCUFF_LAYER 29
#define L_HAND_LAYER 30
#define R_HAND_LAYER 31
#define TARGETED_LAYER 32 //BS12: Layer for the target overlay from weapon targeting system
#define FIRE_LAYER 33 //If you're on fire
#define TOTAL_LAYERS 33
///Access Region Codes///
#define REGION_ALL 0
+4 -1
View File
@@ -110,6 +110,9 @@
#define CHEM_MOB_SPAWN_HOSTILE 1
#define CHEM_MOB_SPAWN_FRIENDLY 2
#define TINT_IMPAIR 2 //Threshold of tint level to apply weld mask overlay
#define TINT_BLIND 3 //Threshold of tint level to obscure vision fully
#define isliving(A) (istype((A), /mob/living))
#define iscarbon(A) (istype((A), /mob/living/carbon))
#define ishuman(A) (istype((A), /mob/living/carbon/human))
@@ -146,4 +149,4 @@
#define isorgan(A) (istype((A), /obj/item/organ/external))
#define hasorgans(A) (ishuman(A))
#define is_admin(user) (check_rights(R_ADMIN, 0, (user)) != 0)
#define is_admin(user) (check_rights(R_ADMIN, 0, (user)) != 0)
+36
View File
@@ -24,3 +24,39 @@
animate(transform = matrices[i], time = speed)
//doesn't have an object argument because this is "Stacking" with the animate call above
//3 billion% intentional
//Dumps the matrix data in format a-f
/matrix/proc/tolist()
. = list()
. += a
. += b
. += c
. += d
. += e
. += f
//Dumps the matrix data in a matrix-grid format
/*
a d 0
b e 0
c f 1
*/
/matrix/proc/togrid()
. = list()
. += a
. += d
. += 0
. += b
. += e
. += 0
. += c
. += f
. += 1
//The X pixel offset of this matrix
/matrix/proc/get_x_shift()
. = c
//The Y pixel offset of this matrix
/matrix/proc/get_y_shift()
. = f
+44
View File
@@ -1009,6 +1009,50 @@ proc/get_mob_with_client_list()
else if(zone == "l_foot") return "left foot"
else if(zone == "r_foot") return "right foot"
else return zone
/*
Gets the turf this atom's *ICON* appears to inhabit
It takes into account:
* Pixel_x/y
* Matrix x/y
NOTE: if your atom has non-standard bounds then this proc
will handle it, but:
* if the bounds are even, then there are an even amount of "middle" turfs, the one to the EAST, NORTH, or BOTH is picked
(this may seem bad, but you're atleast as close to the center of the atom as possible, better than byond's default loc being all the way off)
* if the bounds are odd, the true middle turf of the atom is returned
*/
/proc/get_turf_pixel(atom/movable/AM)
if(!istype(AM))
return
//Find AM's matrix so we can use it's X/Y pixel shifts
var/matrix/M = matrix(AM.transform)
var/pixel_x_offset = AM.pixel_x + M.get_x_shift()
var/pixel_y_offset = AM.pixel_y + M.get_y_shift()
//Irregular objects
if(AM.bound_height != world.icon_size || AM.bound_width != world.icon_size)
var/icon/AMicon = icon(AM.icon, AM.icon_state)
pixel_x_offset += ((AMicon.Width()/world.icon_size)-1)*(world.icon_size*0.5)
pixel_y_offset += ((AMicon.Height()/world.icon_size)-1)*(world.icon_size*0.5)
qdel(AMicon)
//DY and DX
var/rough_x = round(round(pixel_x_offset,world.icon_size)/world.icon_size)
var/rough_y = round(round(pixel_y_offset,world.icon_size)/world.icon_size)
//Find coordinates
var/turf/T = get_turf(AM) //use AM's turfs, as it's coords are the same as AM's AND AM's coords are lost if it is inside another atom
var/final_x = T.x + rough_x
var/final_y = T.y + rough_y
if(final_x || final_y)
return locate(final_x, final_y, T.z)
//Finds the distance between two atoms, in pixels
//centered = 0 counts from turf edge to edge
+7 -1
View File
@@ -31,9 +31,15 @@
return
next_click = world.time + 1
if(control_disabled || stat)
return
var/turf/pixel_turf = get_turf_pixel(A)
if(pixel_turf && !cameranet.checkTurfVis(pixel_turf))
log_admin("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(A)])")
message_admins("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([ADMIN_COORDJMP(A)]))")
send2irc_adminless_only("NOCHEAT", "[key_name(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(A)]))")
return
var/list/modifiers = params2list(params)
if(modifiers["shift"] && modifiers["ctrl"])
+4 -12
View File
@@ -643,9 +643,7 @@
//this is necessarily damaging
var/damage = rand(1,5)
to_chat(M, "<span class='danger'>The unloading machine grabs you with a hard metallic claw!</span>")
if(M.client)
M.client.eye = master
M.client.perspective = EYE_PERSPECTIVE
M.reset_perspective(master)
M.loc = master
master.types[M.type] = src
M.apply_damage(damage) // todo: ugly
@@ -699,10 +697,7 @@
//this is necessarily damaging
var/damage = rand(1,5)
to_chat(M, "<span class='danger'>The unloading machine grabs you with a hard metallic claw!</span>")
if(M.client)
M.client.eye = master
M.client.perspective = EYE_PERSPECTIVE
M.loc = master
M.forceMove(master)
master.types[M.type] = src
M.apply_damage(damage) // todo: ugly
M.visible_message("\red [M.name] gets pulled into the machine!")
@@ -710,11 +705,8 @@
outlet_reaction(var/atom/W,var/turf/D)
var/mob/living/M = W
M.loc = master.loc
M.forceMove(master.loc)
M.dir = master.outdir
if(M.client)
M.client.eye = M.client.mob
M.client.perspective = MOB_PERSPECTIVE
D = get_step(D,master.outdir) // throw attempt
eject_speed = rand(0,4)
@@ -796,4 +788,4 @@
var/punches = punch(M,remaining / PUNCH_WORK)
if(punches>1)master.sleep++
return punches * PUNCH_WORK
#undef MAXCOIL
#undef MAXCOIL
+1 -1
View File
@@ -1028,7 +1028,7 @@ body
to_chat(usr, "Mob doesn't exist anymore")
return
if(!(locateUID(rem_organ) in M.internal_organs))
if(!(rem_organ in M.internal_organs))
to_chat(usr, "Mob does not have that organ.")
return
+1 -1
View File
@@ -64,7 +64,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
var/mob/living/carbon/human/caster = user
if(caster.remoteview_target)
caster.remoteview_target = null
caster.reset_view(0)
caster.reset_perspective(0)
return 0
if(is_admin_level(user.z) && (!centcom_cancast || ticker.mode.name == "ragin' mages")) //Certain spells are not allowed on the centcom zlevel
+1
View File
@@ -207,6 +207,7 @@ var/list/uplink_items = list()
item = /obj/item/weapon/caution/proximity_sign
cost = 4
job = list("Janitor")
surplus = 0
//Medical
+9
View File
@@ -427,6 +427,15 @@
else
return 0
// Used to provide overlays when using this atom as a viewing focus
// (cameras, locker tint, etc.)
/atom/proc/get_remote_view_fullscreens(mob/user)
return
//the sight changes to give to the mob whose perspective is set to that atom (e.g. A mob with nightvision loses its nightvision while looking through a normal camera)
/atom/proc/update_remote_sight(mob/living/user)
return
/atom/proc/checkpass(passflag)
return pass_flags&passflag
+12
View File
@@ -147,6 +147,18 @@
return 1
/mob/living/forceMove(atom/destination)
stop_pulling()
if(buckled)
buckled.unbuckle_mob(src,force=1)
// in lieu of "unbuckle_all_mobs"
if(buckled_mob)
unbuckle_mob(buckled_mob,force=1)
. = ..()
if(client)
reset_perspective(destination)
update_canmove() //if the mob was asleep inside a container and then got forceMoved out we need to make them fall.
//called when src is thrown into hit_atom
/atom/movable/proc/throw_impact(atom/hit_atom, var/speed)
if(istype(hit_atom,/mob/living))
+13 -21
View File
@@ -156,8 +156,6 @@
to_chat(usr, "<span class='boldnotice'>Subject cannot have abiotic items on.</span>")
return
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.forceMove(src)
src.occupant = usr
src.icon_state = "scanner_occupied"
@@ -258,9 +256,6 @@
go_out()
/obj/machinery/dna_scannernew/proc/put_in(var/mob/M)
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.forceMove(src)
src.occupant = M
src.icon_state = "scanner_occupied"
@@ -283,9 +278,6 @@
to_chat(usr, "<span class='warning'>The scanner is locked!</span>")
return
if(src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.forceMove(src.loc)
src.occupant = null
src.icon_state = "scanner_open"
@@ -476,7 +468,18 @@
if(user == connected.occupant)
return
// this is the data which will be sent to the ui
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "dna_modifier.tmpl", "DNA Modifier Console", 660, 700)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/machinery/computer/scan_consolenew/ui_data(mob/user, datum/topic_state/state)
var/data[0]
data["selectedMenuKey"] = selected_menu_key
data["locked"] = src.connected.locked
@@ -550,18 +553,7 @@
for(var/datum/reagent/R in connected.beaker.reagents.reagent_list)
data["beakerVolume"] += R.volume
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "dna_modifier.tmpl", "DNA Modifier Console", 660, 700)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
return data
/obj/machinery/computer/scan_consolenew/Topic(href, href_list)
if(..())
+1 -1
View File
@@ -619,7 +619,7 @@
numbers += H.mind.initial_account.account_number
numbers += H.mind.initial_account.remote_access_pin
if(numbers.len>0)
to_chat(usr, "<span class='notice'>b>Numbers</b>: You sense the number[numbers.len>1?"s":""] [english_list(numbers)] [numbers.len>1?"are":"is"] important to [M.name].</span>")
to_chat(usr, "<span class='notice'><b>Numbers</b>: You sense the number[numbers.len>1?"s":""] [english_list(numbers)] [numbers.len>1?"are":"is"] important to [M.name].</span>")
to_chat(usr, "<span class='notice'><b>Thoughts</b>: [M.name] is currently [thoughts].</span>")
if(EMPATH in M.mutations)
+8
View File
@@ -161,6 +161,14 @@
/datum/dna/gene/basic/xray/New()
block=XRAYBLOCK
/datum/dna/gene/basic/xray/activate(mob/living/M, connected, flags)
..()
M.update_sight()
/datum/dna/gene/basic/xray/deactivate(mob/living/M, connected, flags)
..()
M.update_sight()
/datum/dna/gene/basic/tk
name="Telekenesis"
activation_messages = list("You feel smarter.")
+4 -4
View File
@@ -302,12 +302,12 @@
if(istype(user.l_hand, /obj/item/tk_grab) || istype(user.r_hand, /obj/item/tk_grab/))
to_chat(user, "<span class='warning'>Your mind is too busy with that telekinetic grab.</span>")
user.remoteview_target = null
user.reset_view(0)
user.reset_perspective(0)
return
if(user.client.eye != user.client.mob)
user.remoteview_target = null
user.reset_view(0)
user.reset_perspective(0)
return
for(var/mob/living/L in targets)
@@ -315,7 +315,7 @@
if(target)
user.remoteview_target = target
user.reset_view(target)
user.reset_perspective(target)
else
user.remoteview_target = null
user.reset_view(0)
user.reset_perspective(0)
+13 -1
View File
@@ -6,13 +6,20 @@ var/runedec = 0
var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", "self", "see", "other", "hide")
/client/proc/check_words() // -- Urist
set category = "Special Verbs"
set category = "Admin"
set name = "Check Rune Words"
set desc = "Check the rune-word meaning"
if(!check_rights(R_ADMIN))
return
if(!cultwords["travel"])
runerandom()
for(var/word in engwords)
to_chat(usr, "[cultwords[word]] is [word]")
log_and_message_admins("checked the rune words.")
feedback_add_details("admin_verb","CRW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/proc/runerandom() //randomizes word meaning
var/list/runewords=list("ire","ego","nahlizet","certum","veri","jatkaa","mgar","balaq", "karazet", "geeri") ///"orkan" and "allaq" removed.
@@ -100,6 +107,11 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
return
return
// This is for the seer rune, so you don't get permanent ghost sight
/obj/effect/rune/Uncrossed(atom/movable/O)
if(isliving(O))
var/mob/living/L = O
L.update_sight()
/obj/effect/rune/proc/get_word_string()
if(word1 == cultwords["travel"])
+3
View File
@@ -210,6 +210,8 @@ var/list/sacrificed = list()
/obj/effect/rune/proc/seer()
if(usr.loc==src.loc)
// No. Bad cultcode. Bad.
var/mob/living/carbon/human/H = usr
if(usr.seer==1)
usr.say("Rash'tla sektath mal[pick("'","`")]zua. Zasan therium viortia.")
to_chat(usr, "\red The world beyond fades from your vision.")
@@ -224,6 +226,7 @@ var/list/sacrificed = list()
to_chat(usr, "\red The world beyond opens to your eyes.")
usr.see_invisible = SEE_INVISIBLE_OBSERVER
usr.seer = 1
H.update_sight()
return
return fizzle()
+1 -1
View File
@@ -411,7 +411,7 @@ var/round_start_time = 0
var/dat
dat += {"<html><head><title>Karma Reminder</title></head><body><h1><B>Karma Reminder</B></h1><br>
You have not yet spent your karma for the round, surely there is a player who was worthy of receiving<br>
your reward? Look under 'Special Verbs' for the 'Award Karma' button, and use it once a round for best results!</table></body></html>"}
your reward? Look under 'OOC' for the 'Award Karma' button, and use it once a round for best results!</table></body></html>"}
player << browse(dat, "window=karmareminder;size=400x300")
@@ -76,10 +76,9 @@
origin.vest_mode_action.Remove(C)
origin.vest_disguise_action.Remove(C)
origin.set_droppoint_action.Remove(C)
remote_eye.user = null
remote_eye.eye_user = null
C.reset_perspective(null)
if(C.client)
C.client.perspective = MOB_PERSPECTIVE
C.client.eye = src
C.client.images -= remote_eye.user_image
for(var/datum/camerachunk/chunk in remote_eye.visibleCameraChunks)
C.client.images -= chunk.obscured
@@ -203,9 +203,6 @@
/obj/machinery/abductor/experiment/proc/eject_abductee()
if(!occupant)
return
if(occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.forceMove(get_turf(src))
occupant = null
icon_state = "experiment-open"
icon_state = "experiment-open"
@@ -446,7 +446,7 @@
controlling = 0
reset_view(null)
reset_perspective(null)
machine = null
host.verbs -= /mob/living/carbon/proc/release_control
@@ -562,10 +562,10 @@
src.forceMove(get_turf(host))
reset_view(null)
reset_perspective(null)
machine = null
host.reset_view(null)
host.reset_perspective(null)
host.machine = null
var/mob/living/H = host
+8 -6
View File
@@ -175,6 +175,13 @@ var/bomb_set
return
/obj/machinery/nuclearbomb/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "nuclear_bomb.tmpl", "Nuke Control Panel", 450, 550, state = physical_state)
ui.open()
ui.set_auto_update(1)
/obj/machinery/nuclearbomb/ui_data(mob/user, datum/topic_state/state)
var/data[0]
data["is_syndicate"] = is_syndicate
data["hacking"] = 0
@@ -201,12 +208,7 @@ var/bomb_set
if(yes_code)
data["message"] = "*****"
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "nuclear_bomb.tmpl", "Nuke Control Panel", 450, 550, state = physical_state)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/nuclearbomb/verb/make_deployable()
set category = "Object"
+2 -4
View File
@@ -817,11 +817,9 @@ var/global/list/multiverse = list()
log_game("[user][user.key] made [target][target.key] say [wgw] with a voodoo doll.")
if("eyes")
user.set_machine(src)
if(user.client)
user.client.eye = target
user.client.perspective = EYE_PERSPECTIVE
user.reset_perspective(target)
spawn(100)
user.reset_view()
user.reset_perspective(null)
user.unset_machine()
if("r_leg","l_leg")
to_chat(user, "<span class='notice'>You move the doll's legs around.</span>")
+26 -28
View File
@@ -98,7 +98,18 @@
src.ui_interact(user)
/obj/machinery/atmospherics/unary/cold_sink/freezer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// this is the data which will be sent to the ui
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "freezer.tmpl", "Gas Cooling System", 540, 300)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/machinery/atmospherics/unary/cold_sink/freezer/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["on"] = on ? 1 : 0
data["gasPressure"] = round(air_contents.return_pressure())
@@ -117,19 +128,7 @@
else if(air_contents.temperature < (T0C - 20) && air_contents.temperature > (T0C - 100))
temp_class = "average"
data["gasTemperatureClass"] = temp_class
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "freezer.tmpl", "Gas Cooling System", 540, 300)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
return data
/obj/machinery/atmospherics/unary/cold_sink/freezer/Topic(href, href_list)
if(..())
@@ -257,7 +256,18 @@
src.ui_interact(user)
/obj/machinery/atmospherics/unary/heat_reservoir/heater/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// this is the data which will be sent to the ui
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "freezer.tmpl", "Gas Heating System", 540, 300)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/machinery/atmospherics/unary/heat_reservoir/heater/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["on"] = on ? 1 : 0
data["gasPressure"] = round(air_contents.return_pressure())
@@ -274,19 +284,7 @@
if(air_contents.temperature > (T20C+40))
temp_class = "bad"
data["gasTemperatureClass"] = temp_class
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "freezer.tmpl", "Gas Heating System", 540, 300)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
return data
/obj/machinery/atmospherics/unary/heat_reservoir/heater/Topic(href, href_list)
if(..())
+1 -4
View File
@@ -96,12 +96,9 @@
user.visible_message("[user] climbs on the operating table.","You climb on the operating table.")
else
visible_message("<span class='alert'>[C] has been laid on the operating table by [user].</span>")
if(C.client)
C.client.perspective = EYE_PERSPECTIVE
C.client.eye = src
C.resting = 1
C.update_canmove()
C.loc = src.loc
C.forceMove(loc)
if(user.pulling == C)
user.stop_pulling()
for(var/obj/O in src)
+12 -23
View File
@@ -135,6 +135,13 @@
ui_interact(user)
/obj/machinery/sleeper/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "sleeper.tmpl", "Sleeper", 550, 770)
ui.open()
ui.set_auto_update(1)
/obj/machinery/sleeper/ui_data(mob/user, datum/topic_state/state)
var/data[0]
data["hasOccupant"] = occupant ? 1 : 0
var/occupantData[0]
@@ -229,13 +236,7 @@
chemicals.Add(list(list("title" = temp.name, "id" = temp.id, "commands" = list("chemical" = temp.id), "occ_amount" = reagent_amount, "pretty_amount" = pretty_amount, "injectable" = injectable, "overdosing" = overdosing, "od_warning" = caution)))
data["chemicals"] = chemicals
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "sleeper.tmpl", "Sleeper", 550, 770)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/sleeper/Topic(href, href_list)
if(!controls_inside && usr == occupant)
@@ -343,9 +344,6 @@
return
if(!G || !G:affecting) return
var/mob/M = G:affecting
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.forceMove(src)
src.occupant = M
src.icon_state = "[base_icon]"
@@ -420,9 +418,6 @@
toggle_filter()
if(!occupant)
return
if(occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.forceMove(loc)
occupant = null
icon_state = "[base_icon]-open"
@@ -454,10 +449,10 @@
set name = "Eject Sleeper"
set category = "Object"
set src in oview(1)
if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other
return
src.icon_state = "[base_icon]-open"
src.go_out()
add_fingerprint(usr)
@@ -467,10 +462,10 @@
set name = "Remove Beaker"
set category = "Object"
set src in oview(1)
if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other
return
if(beaker)
filtering = 0
beaker.forceMove(usr.loc)
@@ -521,10 +516,6 @@
to_chat(user, "<span class='boldnotice'>>The sleeper is already occupied!</span>")
return
if(!L) return
if(L.client)
L.client.perspective = EYE_PERSPECTIVE
L.client.eye = src
L.forceMove(src)
src.occupant = L
src.icon_state = "[base_icon]"
@@ -562,8 +553,6 @@
to_chat(usr, "<span class='boldnotice'>The sleeper is already occupied!</span>")
return
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.forceMove(src)
src.occupant = usr
src.icon_state = "[base_icon]"
+109 -113
View File
@@ -93,9 +93,6 @@
if(M.abiotic())
to_chat(user, "<span class='notice'>Subject cannot have abiotic items on.</span>")
return
/*if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src*///THIS IS FUCKING POINTLESS BECAUSE OF ON-LIFE() FUCKING RESET_VIEW() AHHHHHHHHHHGGGGGGGGGG
M.forceMove(src)
occupant = M
icon_state = "body_scanner_1"
@@ -159,9 +156,6 @@
/obj/machinery/bodyscanner/proc/go_out()
if(!occupant || locked)
return
if(occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.forceMove(loc)
occupant = null
icon_state = "body_scanner_0"
@@ -322,140 +316,142 @@
/obj/machinery/body_scanconsole/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "adv_med.tmpl", "Body Scanner", 690, 600)
ui.open()
ui.set_auto_update(1)
/obj/machinery/body_scanconsole/ui_data(mob/user, datum/topic_state/state)
var/data[0]
data["connected"] = connected ? 1 : 0
if(connected)
data["occupied"] = connected.occupant ? 1 : 0
if(!connected)
return data
var/occupantData[0]
if(connected.occupant)
var/mob/living/carbon/human/H = connected.occupant
occupantData["name"] = H.name
occupantData["stat"] = H.stat
occupantData["health"] = H.health
occupantData["maxHealth"] = H.maxHealth
data["occupied"] = connected.occupant ? 1 : 0
occupantData["hasVirus"] = H.viruses.len
var/occupantData[0]
if(connected.occupant)
var/mob/living/carbon/human/H = connected.occupant
occupantData["name"] = H.name
occupantData["stat"] = H.stat
occupantData["health"] = H.health
occupantData["maxHealth"] = H.maxHealth
occupantData["bruteLoss"] = H.getBruteLoss()
occupantData["oxyLoss"] = H.getOxyLoss()
occupantData["toxLoss"] = H.getToxLoss()
occupantData["fireLoss"] = H.getFireLoss()
occupantData["hasVirus"] = H.viruses.len
occupantData["radLoss"] = H.radiation
occupantData["cloneLoss"] = H.getCloneLoss()
occupantData["brainLoss"] = H.getBrainLoss()
occupantData["paralysis"] = H.paralysis
occupantData["paralysisSeconds"] = round(H.paralysis / 4)
occupantData["bodyTempC"] = H.bodytemperature-T0C
occupantData["bodyTempF"] = (((H.bodytemperature-T0C) * 1.8) + 32)
occupantData["bruteLoss"] = H.getBruteLoss()
occupantData["oxyLoss"] = H.getOxyLoss()
occupantData["toxLoss"] = H.getToxLoss()
occupantData["fireLoss"] = H.getFireLoss()
occupantData["hasBorer"] = H.has_brain_worms()
occupantData["radLoss"] = H.radiation
occupantData["cloneLoss"] = H.getCloneLoss()
occupantData["brainLoss"] = H.getBrainLoss()
occupantData["paralysis"] = H.paralysis
occupantData["paralysisSeconds"] = round(H.paralysis / 4)
occupantData["bodyTempC"] = H.bodytemperature-T0C
occupantData["bodyTempF"] = (((H.bodytemperature-T0C) * 1.8) + 32)
var/bloodData[0]
bloodData["hasBlood"] = 0
if(ishuman(H) && H.vessel && !(H.species && H.species.flags & NO_BLOOD))
var/blood_type = H.get_blood_name()
var/blood_volume = round(H.vessel.get_reagent_amount(blood_type))
bloodData["hasBlood"] = 1
bloodData["volume"] = blood_volume
bloodData["percent"] = round(((blood_volume / BLOOD_VOLUME_NORMAL)*100))
bloodData["pulse"] = H.get_pulse(GETPULSE_TOOL)
bloodData["bloodLevel"] = blood_volume
bloodData["bloodMax"] = H.max_blood
occupantData["blood"] = bloodData
occupantData["hasBorer"] = H.has_brain_worms()
var/implantData[0]
for(var/obj/item/weapon/implant/I in H)
if(I.implanted && is_type_in_list(I, known_implants))
var/implantSubData[0]
implantSubData["name"] = sanitize(I.name)
implantData.Add(list(implantSubData))
occupantData["implant"] = implantData
occupantData["implant_len"] = implantData.len
var/bloodData[0]
bloodData["hasBlood"] = 0
if(ishuman(H) && H.vessel && !(H.species && H.species.flags & NO_BLOOD))
var/blood_type = H.get_blood_name()
var/blood_volume = round(H.vessel.get_reagent_amount(blood_type))
bloodData["hasBlood"] = 1
bloodData["volume"] = blood_volume
bloodData["percent"] = round(((blood_volume / BLOOD_VOLUME_NORMAL)*100))
bloodData["pulse"] = H.get_pulse(GETPULSE_TOOL)
bloodData["bloodLevel"] = blood_volume
bloodData["bloodMax"] = H.max_blood
occupantData["blood"] = bloodData
var/extOrganData[0]
for(var/obj/item/organ/external/E in H.organs)
var/organData[0]
organData["name"] = E.name
organData["open"] = E.open
organData["germ_level"] = E.germ_level
organData["bruteLoss"] = E.brute_dam
organData["fireLoss"] = E.burn_dam
organData["totalLoss"] = E.brute_dam + E.burn_dam
organData["maxHealth"] = E.max_damage
organData["bruised"] = E.min_bruised_damage
organData["broken"] = E.min_broken_damage
var/implantData[0]
for(var/obj/item/weapon/implant/I in H)
if(I.implanted && is_type_in_list(I, known_implants))
var/implantSubData[0]
implantSubData["name"] = sanitize(I.name)
implantData.Add(list(implantSubData))
occupantData["implant"] = implantData
occupantData["implant_len"] = implantData.len
var/shrapnelData[0]
for(var/obj/I in E.implants)
var/shrapnelSubData[0]
shrapnelSubData["name"] = I.name
var/extOrganData[0]
for(var/obj/item/organ/external/E in H.organs)
var/organData[0]
organData["name"] = E.name
organData["open"] = E.open
organData["germ_level"] = E.germ_level
organData["bruteLoss"] = E.brute_dam
organData["fireLoss"] = E.burn_dam
organData["totalLoss"] = E.brute_dam + E.burn_dam
organData["maxHealth"] = E.max_damage
organData["bruised"] = E.min_bruised_damage
organData["broken"] = E.min_broken_damage
shrapnelData.Add(list(shrapnelSubData))
var/shrapnelData[0]
for(var/obj/I in E.implants)
var/shrapnelSubData[0]
shrapnelSubData["name"] = I.name
organData["shrapnel"] = shrapnelData
organData["shrapnel_len"] = shrapnelData.len
shrapnelData.Add(list(shrapnelSubData))
var/organStatus[0]
if(E.status & ORGAN_DESTROYED)
organStatus["destroyed"] = 1
if(E.status & ORGAN_BROKEN)
organStatus["broken"] = E.broken_description
if(E.status & ORGAN_ROBOT)
organStatus["robotic"] = 1
if(E.status & ORGAN_SPLINTED)
organStatus["splinted"] = 1
if(E.status & ORGAN_BLEEDING)
organStatus["bleeding"] = 1
if(E.status & ORGAN_DEAD)
organStatus["dead"] = 1
organData["shrapnel"] = shrapnelData
organData["shrapnel_len"] = shrapnelData.len
organData["status"] = organStatus
var/organStatus[0]
if(E.status & ORGAN_DESTROYED)
organStatus["destroyed"] = 1
if(E.status & ORGAN_BROKEN)
organStatus["broken"] = E.broken_description
if(E.status & ORGAN_ROBOT)
organStatus["robotic"] = 1
if(E.status & ORGAN_SPLINTED)
organStatus["splinted"] = 1
if(E.status & ORGAN_BLEEDING)
organStatus["bleeding"] = 1
if(E.status & ORGAN_DEAD)
organStatus["dead"] = 1
if(istype(E, /obj/item/organ/external/chest) && H.is_lung_ruptured())
organData["lungRuptured"] = 1
organData["status"] = organStatus
for(var/datum/wound/W in E.wounds)
if(W.internal)
organData["internalBleeding"] = 1
break
if(istype(E, /obj/item/organ/external/chest) && H.is_lung_ruptured())
organData["lungRuptured"] = 1
extOrganData.Add(list(organData))
for(var/datum/wound/W in E.wounds)
if(W.internal)
organData["internalBleeding"] = 1
break
occupantData["extOrgan"] = extOrganData
extOrganData.Add(list(organData))
var/intOrganData[0]
for(var/obj/item/organ/internal/I in H.internal_organs)
var/organData[0]
organData["name"] = I.name
organData["desc"] = I.desc
organData["germ_level"] = I.germ_level
organData["damage"] = I.damage
organData["maxHealth"] = I.max_damage
organData["bruised"] = I.min_broken_damage
organData["broken"] = I.min_bruised_damage
organData["robotic"] = I.robotic
organData["dead"] = (I.status & ORGAN_DEAD)
occupantData["extOrgan"] = extOrganData
intOrganData.Add(list(organData))
var/intOrganData[0]
for(var/obj/item/organ/internal/I in H.internal_organs)
var/organData[0]
organData["name"] = I.name
organData["desc"] = I.desc
organData["germ_level"] = I.germ_level
organData["damage"] = I.damage
organData["maxHealth"] = I.max_damage
organData["bruised"] = I.min_broken_damage
organData["broken"] = I.min_bruised_damage
organData["robotic"] = I.robotic
organData["dead"] = (I.status & ORGAN_DEAD)
occupantData["intOrgan"] = intOrganData
intOrganData.Add(list(organData))
occupantData["blind"] = (H.disabilities & BLIND)
occupantData["nearsighted"] = (H.disabilities & NEARSIGHTED)
occupantData["intOrgan"] = intOrganData
data["occupant"] = occupantData
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "adv_med.tmpl", "Body Scanner", 690, 600)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
occupantData["blind"] = (H.disabilities & BLIND)
occupantData["nearsighted"] = (H.disabilities & NEARSIGHTED)
data["occupant"] = occupantData
return data
/obj/machinery/body_scanconsole/Topic(href, href_list)
if(..())
+8 -15
View File
@@ -696,8 +696,14 @@
data["danger"] = danger
return data
/obj/machinery/alarm/proc/get_nano_data(mob/user, href_list)
/obj/machinery/alarm/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
var/list/href_list = state.href_list()
if(href_list)
data["remote_connection"] = href_list["remote_connection"]
data["remote_access"] = href_list["remote_access"]
data["name"] = sanitize(name)
data["air"] = ui_air_status()
data["alarmActivated"] = alarmActivated || danger_level == 2
@@ -807,22 +813,9 @@
return thresholds
/obj/machinery/alarm/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state)
var/list/href = state.href_list(user)
var/remote_connection = 0
var/remote_access = 0
if(href)
remote_connection = href["remote_connection"] // Remote connection means we're non-adjacent/connecting from another computer
remote_access = href["remote_access"] // Remote access means we also have the privilege to alter the air alarm.
var/list/data = get_nano_data(user, href)
data["remote_connection"] = remote_connection
data["remote_access"] = remote_access
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "air_alarm.tmpl", name, 570, 410, state = state)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
+24 -24
View File
@@ -88,8 +88,8 @@ var/datum/canister_icons/canister_icon_container = new()
"quart" = "none")
oldcolor = new /list()
decals = list("cold" = 0, "hot" = 0, "plasma" = 0)
colorcontainer = new /list(4)
possibledecals = new /list(3)
colorcontainer = list()
possibledecals = list()
update_icon()
/obj/machinery/portable_atmospherics/canister/proc/init_data_vars()
@@ -123,7 +123,7 @@ var/datum/canister_icons/canister_icon_container = new()
L.Add(list("anycolor" = 1))
colorcontainer[C] = L
possibledecals = new /list(3)
possibledecals = list()
var/i
var/list/L = canister_icon_container.possibledecals
@@ -382,10 +382,23 @@ update_flag
/obj/machinery/portable_atmospherics/canister/attack_hand(var/mob/user as mob)
return src.ui_interact(user)
/obj/machinery/portable_atmospherics/canister/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
/obj/machinery/portable_atmospherics/canister/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = physical_state)
if(src.destroyed)
return
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "canister.tmpl", "Canister", 480, 400, state = state)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/machinery/portable_atmospherics/canister/ui_data(mob/user, datum/topic_state/state)
init_data_vars() //set up var/colorcontainer and var/possibledecals
// this is the data which will be sent to the ui
@@ -394,8 +407,10 @@ update_flag
data["menu"] = menu ? 1 : 0
data["canLabel"] = can_label ? 1 : 0
data["canister_color"] = canister_color
data["colorContainer"] = colorcontainer
data["possibleDecals"] = possibledecals
data["colorContainer"] = colorcontainer.Copy()
colorcontainer.Cut()
data["possibleDecals"] = possibledecals.Copy()
possibledecals.Cut()
data["portConnected"] = connected_port ? 1 : 0
data["tankPressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0)
data["releasePressure"] = round(release_pressure ? release_pressure : 0)
@@ -405,24 +420,9 @@ update_flag
data["hasHoldingTank"] = holding ? 1 : 0
if(holding)
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure()))
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "canister.tmpl", "Canister", 480, 400, state = physical_state)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
//Disregard these, avoid cluttering up the VV window
colorcontainer = new /list(4)
possibledecals = new /list(3)
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure()))
return data
/obj/machinery/portable_atmospherics/canister/Topic(href, href_list)
if(..())
+18 -18
View File
@@ -8,7 +8,7 @@
var/on = 0
var/direction_out = 0 //0 = siphoning, 1 = releasing
var/target_pressure = 100
var/pressuremin = 0
var/pressuremax = 10 * ONE_ATMOSPHERE
@@ -98,15 +98,27 @@
/obj/machinery/portable_atmospherics/pump/attack_ai(var/mob/user as mob)
src.add_hiddenprint(user)
return src.attack_hand(user)
/obj/machinery/portable_atmospherics/pump/attack_ghost(var/mob/user as mob)
return src.attack_hand(user)
/obj/machinery/portable_atmospherics/pump/attack_hand(var/mob/user as mob)
ui_interact(user)
/obj/machinery/portable_atmospherics/pump/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
var/list/data[0]
/obj/machinery/portable_atmospherics/pump/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = physical_state)
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "portpump.tmpl", "Portable Pump", 480, 400, state = state)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/machinery/portable_atmospherics/pump/ui_data(mob/user, datum/topic_state/state = physical_state)
var/data[0]
data["portConnected"] = connected_port ? 1 : 0
data["tankPressure"] = round(air_contents.return_pressure() > 0 ? air_contents.return_pressure() : 0)
data["targetpressure"] = round(target_pressure)
@@ -119,18 +131,7 @@
if(holding)
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure() > 0 ? holding.air_contents.return_pressure() : 0))
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "portpump.tmpl", "Portable Pump", 480, 400, state = physical_state)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
return data
/obj/machinery/portable_atmospherics/pump/Topic(href, href_list)
if(..())
@@ -155,4 +156,3 @@
update_icon()
src.add_fingerprint(usr)
+22 -21
View File
@@ -10,7 +10,7 @@
var/widenet = 0 //is this scrubber acting on the 3x3 area around it.
volume = 750
var/minrate = 0//probably useless, but whatever
var/maxrate = 10 * ONE_ATMOSPHERE
@@ -52,7 +52,7 @@
if(istype(T))
for(var/turf/simulated/tile in T.GetAtmosAdjacentTurfs(alldir=1))
scrub(tile)
/obj/machinery/portable_atmospherics/scrubber/proc/scrub(var/turf/simulated/tile)
var/datum/gas_mixture/environment
if(holding)
@@ -108,7 +108,7 @@
/obj/machinery/portable_atmospherics/scrubber/attack_ai(var/mob/user as mob)
src.add_hiddenprint(user)
return src.attack_hand(user)
/obj/machinery/portable_atmospherics/scrubber/attack_ghost(var/mob/user as mob)
return src.attack_hand(user)
@@ -116,8 +116,20 @@
ui_interact(user)
return
/obj/machinery/portable_atmospherics/scrubber/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
var/list/data[0]
/obj/machinery/portable_atmospherics/scrubber/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = physical_state)
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "portscrubber.tmpl", "Portable Scrubber", 480, 400, state = state)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/machinery/portable_atmospherics/scrubber/ui_data(mob/user, datum/topic_state/state = physical_state)
var/data[0]
data["portConnected"] = connected_port ? 1 : 0
data["tankPressure"] = round(air_contents.return_pressure() > 0 ? air_contents.return_pressure() : 0)
data["rate"] = round(volume_rate)
@@ -129,18 +141,7 @@
if(holding)
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure() > 0 ? holding.air_contents.return_pressure() : 0))
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "portscrubber.tmpl", "Portable Scrubber", 480, 400, state = physical_state)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
return data
/obj/machinery/portable_atmospherics/scrubber/Topic(href, href_list)
if(..())
@@ -160,7 +161,7 @@
volume_rate = Clamp(volume_rate+diff, minrate, maxrate)
src.add_fingerprint(usr)
/obj/machinery/portable_atmospherics/scrubber/huge
name = "Huge Air Scrubber"
icon_state = "scrubber:0"
@@ -172,7 +173,7 @@
var/global/gid = 1
var/id = 0
var/stationary = 0
/obj/machinery/portable_atmospherics/scrubber/huge/New()
..()
id = gid
@@ -207,7 +208,7 @@
else if((istype(W, /obj/item/device/analyzer)) && get_dist(user, src) <= 1)
atmosanalyzer_scan(air_contents, user)
/obj/machinery/portable_atmospherics/scrubber/huge/stationary
name = "Stationary Air Scrubber"
stationary = 1
stationary = 1
+16 -2
View File
@@ -92,7 +92,7 @@
for(var/mob/O in mob_list)
if(O.client && O.client.eye == src)
O.unset_machine()
O.reset_view(null)
O.reset_perspective(null)
to_chat(O, "The screen bursts into static.")
..()
@@ -279,7 +279,7 @@
for(var/mob/O in player_list)
if(O.client && O.client.eye == src)
O.unset_machine()
O.reset_view(null)
O.reset_perspective(null)
to_chat(O, "The screen bursts into static.")
/obj/machinery/camera/proc/triggerCameraAlarm(var/duration = 0)
@@ -387,6 +387,20 @@
cam["z"] = 0
return cam
/obj/machinery/camera/get_remote_view_fullscreens(mob/user)
if(view_range == short_range) //unfocused
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
/obj/machinery/camera/update_remote_sight(mob/living/user)
user.see_invisible = SEE_INVISIBLE_LIVING //can't see ghosts through cameras
if(isXRay())
user.sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS)
user.see_in_dark = max(user.see_in_dark, 8)
else
user.sight = 0
user.see_in_dark = 2
return 1
/obj/machinery/camera/portable //Cameras which are placed inside of things, such as helmets.
var/turf/prev_turf
+15 -14
View File
@@ -205,7 +205,7 @@
clonemind = locate(R.mind)
if(!istype(clonemind)) //not a mind
return 0
if( clonemind.current && clonemind.current.stat != DEAD ) //mind is associated with a non-dead body
if(clonemind.current && clonemind.current.stat != DEAD) //mind is associated with a non-dead body
return 0
if(clonemind.active) //somebody is using that mind
if(ckey(clonemind.key) != R.ckey)
@@ -229,12 +229,21 @@
spawn(30)
eject_wait = 0
if(!R.dna)
R.dna = new /datum/dna()
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src, R.dna.species)
occupant = H
if(!R.dna.real_name) //to prevent null names
R.dna.real_name = "clone ([rand(0,999)])"
H.real_name = R.dna.real_name
R.dna.real_name = H.real_name
else
H.real_name = R.dna.real_name
H.dna = R.dna.Clone()
for(var/datum/language/L in R.languages)
H.add_language(L.name)
//Get the clone body ready
H.adjustCloneLoss(190) //new damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite
@@ -256,31 +265,23 @@
beginning to regenerate in a cloning pod. You will
become conscious when it is complete.</span>"})
if(!R.dna)
H.dna = new /datum/dna()
H.dna.real_name = H.real_name
H.dna.ready_dna(H)
else
H.dna = R.dna.Clone()
domutcheck(H, null, MUTCHK_FORCED) //Ensures species that get powers by the species proc handle_dna keep them
if(efficiency > 2 && efficiency < 5 && prob(25))
randmutb(H)
if(efficiency > 5 && prob(20))
randmutg(H)
if(efficiency < 3 && prob(50))
randmutb(H)
H.dna.UpdateSE()
H.dna.UpdateUI()
H.set_species(R.dna.species)
H.sync_organ_dna(1) // It's literally a fresh body as you can get, so all organs properly belong to it
H.UpdateAppearance()
H.update_body()
update_icon()
for(var/datum/language/L in R.languages)
H.add_language(L.name)
H.suiciding = 0
attempting = 0
return 1
+8 -9
View File
@@ -86,6 +86,13 @@
// onclose(user, "op")
/obj/machinery/computer/operating/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)//ui is mostly copy pasta from the sleeper ui
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "op_computer.tmpl", "Patient Monitor", 650, 455)
ui.open()
ui.set_auto_update(1)
/obj/machinery/computer/operating/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
var/mob/living/carbon/human/occupant = src.table.victim
data["hasOccupant"] = occupant ? 1 : 0
@@ -156,15 +163,7 @@
data["healthAlarm"]=healthAlarm
data["oxy"]=oxy
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "op_computer.tmpl", "Patient Monitor", 650, 455)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/computer/operating/Topic(href, href_list)
+9 -7
View File
@@ -33,6 +33,14 @@
to_chat(user, "<span class='warning'>You have been locked out from this console!</span>")
/obj/machinery/computer/aifixer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "ai_fixer.tmpl", "AI System Integrity Restorer", 550, 500)
ui.open()
ui.set_auto_update(1)
/obj/machinery/computer/aifixer/ui_data(mob/user, datum/topic_state/state)
var/data[0]
if(occupant)
data["occupant"] = occupant.name
@@ -49,13 +57,7 @@
data["laws"] = laws
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "ai_fixer.tmpl", "AI System Integrity Restorer", 550, 500)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/computer/aifixer/Topic(href, href_list)
if(..())
+8 -6
View File
@@ -24,6 +24,13 @@ var/global/list/minor_air_alarms = list()
ui_interact(user)
/obj/machinery/computer/atmos_alert/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "atmos_alert.tmpl", src.name, 500, 500)
ui.open()
ui.set_auto_update(1)
/obj/machinery/computer/atmos_alert/ui_data(mob/user, datum/topic_state/state)
var/data[0]
var/major_alarms[0]
var/minor_alarms[0]
@@ -37,12 +44,7 @@ var/global/list/minor_air_alarms = list()
data["priority_alarms"] = major_alarms
data["minor_alarms"] = minor_alarms
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "atmos_alert.tmpl", src.name, 500, 500)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/computer/atmos_alert/update_icon()
var/list/alarms = atmosphere_alarm.major_alarms()
+15 -15
View File
@@ -45,7 +45,7 @@
/obj/machinery/computer/security/check_eye(var/mob/user as mob)
if((get_dist(user, src) > 1 || !( user.canmove ) || user.blinded || !( current ) || !( current.status )) && (!istype(user, /mob/living/silicon)))
return null
user.reset_view(current)
user.reset_perspective(current)
return 1
// Network configuration
@@ -70,6 +70,17 @@
if(user.stat)
return
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "sec_camera.tmpl", "Camera Console", 900, 800)
// adding a template with the key "mapContent" enables the map ui functionality
ui.add_template("mapContent", "sec_camera_map_content.tmpl")
// adding a template with the key "mapHeader" replaces the map header content
ui.add_template("mapHeader", "sec_camera_map_header.tmpl")
ui.open()
ui.set_auto_update(1)
/obj/machinery/computer/security/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["current"] = null
@@ -115,18 +126,7 @@
if(current)
data["current"] = current.nano_structure()
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "sec_camera.tmpl", "Camera Console", 900, 800)
// adding a template with the key "mapContent" enables the map ui functionality
ui.add_template("mapContent", "sec_camera_map_content.tmpl")
// adding a template with the key "mapHeader" replaces the map header content
ui.add_template("mapHeader", "sec_camera_map_header.tmpl")
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/computer/security/Topic(href, href_list)
if(..())
@@ -138,10 +138,10 @@
var/obj/machinery/camera/C = locate(href_list["switchTo"]) in cameranet.cameras
if(!C)
return 1
if(!can_access_camera(C))
return 1 // No href exploits for you.
switch_to_camera(usr, C)
else if(href_list["reset"])
+47 -36
View File
@@ -41,61 +41,73 @@
return
if(!iscarbon(user))
return
var/mob/living/carbon/L = user
if(!current_user)
user.set_machine(src)
if(!eyeobj)
CreateEye()
GrantActions(user)
current_user = user
eyeobj.user = user
eyeobj.name = "Camera Eye ([user.name])"
L.remote_view = 1
L.remote_control = eyeobj
L.client.perspective = EYE_PERSPECTIVE
if(!eyeobj.initialized)
for(var/obj/machinery/camera/C in cameranet.cameras)
if(!C.can_use())
continue
if(C.network&networks)
eyeobj.setLoc(get_turf(C))
break
eyeobj.initialized = 1
else
eyeobj.setLoc(eyeobj.loc)
else
if(current_user)
to_chat(user, "The console is already in use!")
return
user.set_machine(src)
if(!eyeobj)
CreateEye()
if(!eyeobj.initialized)
var/camera_location
for(var/obj/machinery/camera/C in cameranet.cameras)
if(!C.can_use())
continue
if(C.network&networks)
camera_location = get_turf(C)
break
if(camera_location)
eyeobj.initialized = 1
give_eye_control(user)
eyeobj.setLoc(camera_location)
else
// An abberant case - silent failure is obnoxious
to_chat(user, "<span class='warning'>ERROR: No linked and active camera network found.</span>")
user.unset_machine()
else
give_eye_control(user)
/obj/machinery/computer/camera_advanced/proc/give_eye_control(mob/user)
GrantActions(user)
current_user = user
eyeobj.eye_user = user
eyeobj.name = "Camera Eye ([user.name])"
// This should be able to be excised once the full view refactor rolls out
user.remote_view = 1
user.remote_control = eyeobj
user.reset_perspective(eyeobj)
eyeobj.setLoc(eyeobj.loc)
/mob/camera/aiEye/remote
name = "Inactive Camera Eye"
var/sprint = 10
var/cooldown = 0
var/acceleration = 1
var/mob/living/carbon/human/user = null
var/mob/living/carbon/human/eye_user = null
var/obj/machinery/computer/camera_advanced/origin
var/initialized = 0
var/visible_icon = 0
var/image/user_image = null
/mob/camera/aiEye/remote/GetViewerClient()
if(user)
return user.client
if(eye_user)
return eye_user.client
return null
/mob/camera/aiEye/remote/setLoc(T)
if(user)
if(!isturf(user.loc))
if(eye_user)
if(!isturf(eye_user.loc))
return
T = get_turf(T)
loc = T
cameranet.visibility(src)
if(user.client)
if(eye_user.client)
if(visible_icon)
user.client.images -= user_image
eye_user.client.images -= user_image
user_image = image(icon,loc,icon_state,FLY_LAYER)
user.client.images += user_image
user.client.eye = src
eye_user.client.images += user_image
eye_user.client.eye = src
/mob/camera/aiEye/remote/relaymove(mob/user,direct)
var/initial = initial(sprint)
@@ -127,10 +139,9 @@
C.remote_view = 0
remote_eye.origin.current_user = null
remote_eye.origin.jump_action.Remove(C)
remote_eye.user = null
remote_eye.eye_user = null
C.reset_perspective(null)
if(C.client)
C.client.perspective = MOB_PERSPECTIVE
C.client.eye = src
C.client.images -= remote_eye.user_image
for(var/datum/camerachunk/chunk in remote_eye.visibleCameraChunks)
C.client.images -= chunk.obscured
+8 -6
View File
@@ -173,9 +173,15 @@ var/time_last_changed_position = 0
ui_interact(user)
/obj/machinery/computer/card/ui_interact(mob/user, ui_key="main", var/datum/nanoui/ui = null, var/force_open = 1)
/obj/machinery/computer/card/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
user.set_machine(src)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "identification_computer.tmpl", src.name, 775, 700)
ui.open()
/obj/machinery/computer/card/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["src"] = UID()
data["station_name"] = station_name()
@@ -242,11 +248,7 @@ var/time_last_changed_position = 0
data["regions"] = regions
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "identification_computer.tmpl", src.name, 775, 700)
ui.set_initial_data(data)
ui.open()
return data
/obj/machinery/computer/card/Topic(href, href_list)
if(..())
+9 -6
View File
@@ -120,6 +120,14 @@
/obj/machinery/computer/cloning/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(stat & (NOPOWER|BROKEN))
return
// Set up the Nano UI
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "cloning_console.tmpl", "Cloning Console UI", 640, 520)
ui.open()
/obj/machinery/computer/cloning/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["menu"] = src.menu
data["scanner"] = sanitize("[src.scanner]")
@@ -175,12 +183,7 @@
else
data["podready"] = 0
// Set up the Nano UI
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "cloning_console.tmpl", "Cloning Console UI", 640, 520)
ui.set_initial_data(data)
ui.open()
return data
/obj/machinery/computer/cloning/Topic(href, href_list)
if(..())
+14 -13
View File
@@ -69,14 +69,14 @@
var/list/access = usr.get_access()
if(allowed(usr))
authenticated = COMM_AUTHENTICATION_MIN
if(access_captain in access)
authenticated = COMM_AUTHENTICATION_MAX
var/mob/living/carbon/human/H = usr
var/obj/item/weapon/card/id = H.get_idcard(TRUE)
if(istype(id))
crew_announcement.announcer = GetNameAndAssignmentFromId(id)
nanomanager.update_uis(src)
return
@@ -313,7 +313,16 @@
ui_interact(user)
/obj/machinery/computer/communications/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
// this is the data which will be sent to the ui
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "comm_console.tmpl", "Communications Console", 400, 500)
// open the new ui window
ui.open()
/obj/machinery/computer/communications/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["is_ai"] = isAI(user)||isrobot(user)
data["menu_state"] = data["is_ai"] ? ai_menu_state : menu_state
@@ -377,16 +386,8 @@
else
data["dock_request"] = 0
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "comm_console.tmpl", "Communications Console", 400, 500)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
return data
/obj/machinery/computer/communications/proc/setCurrentMessage(var/mob/user,var/value)
if(isAI(user) || isrobot(user))
@@ -14,6 +14,13 @@
ui_interact(user)
/obj/machinery/computer/podtracker/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "pod_tracking.tmpl", "Pod Tracking Console", 400, 500)
ui.open()
ui.set_auto_update(1)
/obj/machinery/computer/podtracker/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
var/list/pods[0]
for(var/obj/item/device/spacepod_equipment/misc/tracker/TR in world)
@@ -33,14 +40,7 @@
pods.Add(list(list("pod" = "\ref[my_pod]", "name" = podname) + chairs + list("x" = my_pod.x, "y" = my_pod.y, "z" = my_pod.z)))
data["pods"] = pods
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "pod_tracking.tmpl", "Pod Tracking Console", 400, 500)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/computer/podtracker/Topic(href, href_list)
if(..())
+9 -9
View File
@@ -35,6 +35,13 @@
return 0
/obj/machinery/computer/robotics/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "robot_control.tmpl", "Robotic Control Console", 400, 500)
ui.open()
ui.set_auto_update(1)
/obj/machinery/computer/robotics/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
var/list/robots = get_cyborgs(user)
if(robots.len)
@@ -43,14 +50,7 @@
// Also applies for cyborgs. Hides the manual self-destruct button.
data["is_ai"] = issilicon(user)
data["allowed"] = is_authenticated(user)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "robot_control.tmpl", "Robotic Control Console", 400, 500)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/computer/robotics/Topic(href, href_list)
if(..())
@@ -242,4 +242,4 @@
return
for(var/mob/living/silicon/robot/R in mob_list)
if(R.name == name)
return R
return R
+20 -28
View File
@@ -122,7 +122,7 @@
..()
if(autoeject)
if(occupant)
if(occupant.health >= 100)
if(!occupant.has_organic_damage())
on = 0
go_out()
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
@@ -179,7 +179,18 @@
* @return nothing
*/
/obj/machinery/atmospherics/unary/cryo_cell/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// this is the data which will be sent to the ui
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "cryo.tmpl", "Cryo Cell Control System", 520, 420)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/machinery/atmospherics/unary/cryo_cell/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["isOperating"] = on
data["hasOccupant"] = occupant ? 1 : 0
@@ -206,13 +217,6 @@
data["cellTemperatureStatus"] = "average"
data["isBeakerLoaded"] = beaker ? 1 : 0
/* // Removing beaker contents list from front-end, replacing with a total remaining volume
var beakerContents[0]
if(beaker && beaker.reagents && beaker.reagents.reagent_list.len)
for(var/datum/reagent/R in beaker.reagents.reagent_list)
beakerContents.Add(list(list("name" = R.name, "volume" = R.volume))) // list in a list because Byond merges the first list...
data["beakerContents"] = beakerContents
*/
data["beakerLabel"] = null
data["beakerVolume"] = 0
if(beaker)
@@ -222,19 +226,7 @@
data["beakerVolume"] += R.volume
data["autoeject"] = autoeject
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "cryo.tmpl", "Cryo Cell Control System", 520, 420)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
return data
/obj/machinery/atmospherics/unary/cryo_cell/Topic(href, href_list)
if(usr == occupant)
@@ -406,9 +398,6 @@
/obj/machinery/atmospherics/unary/cryo_cell/proc/go_out()
if(!occupant)
return
if(occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.forceMove(get_step(loc, SOUTH)) //this doesn't account for walls or anything, but i don't forsee that being a problem.
if(occupant.bodytemperature < 261 && occupant.bodytemperature >= 70) //Patch by Aranclanos to stop people from taking burn damage after being ejected
occupant.bodytemperature = 261
@@ -431,9 +420,6 @@
if(!node)
to_chat(usr, "\red The cell is not correctly connected to its pipe network!")
return
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.stop_pulling()
M.forceMove(src)
if(M.health > -100 && (M.health < 0 || M.sleeping))
@@ -494,3 +480,9 @@
/datum/data/function/proc/display()
return
/obj/machinery/atmospherics/components/unary/cryo_cell/get_remote_view_fullscreens(mob/user)
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
/obj/machinery/atmospherics/components/unary/cryo_cell/update_remote_sight(mob/living/user)
return //we don't see the pipe network while inside cryo.
+4 -18
View File
@@ -442,11 +442,7 @@
to_chat(user, "<span class='boldnotice'>\The [src] is in use.</span>")
return
M.loc = src
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.forceMove(src)
time_till_despawn = initial(time_till_despawn) / willing
@@ -540,12 +536,8 @@
if(src.occupant)
to_chat(user, "<span class='boldnotice'>\The [src] is in use.</span>")
return
L.loc = src
L.forceMove(src)
time_till_despawn = initial(time_till_despawn) / willing
if(L.client)
L.client.perspective = EYE_PERSPECTIVE
L.client.eye = src
else
to_chat(user, "<span class='notice'>You stop [L == user ? "climbing into the cryo pod." : "putting [L] into the cryo pod."]</span>")
return
@@ -637,9 +629,7 @@
return
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.loc = src
usr.forceMove(src)
src.occupant = usr
time_till_despawn = initial(time_till_despawn) / willing_time_divisor
@@ -662,11 +652,7 @@
if(!occupant)
return
if(occupant.client)
occupant.client.eye = src.occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.loc = get_turf(src)
occupant.forceMove(get_turf(src))
occupant = null
if(orient_right)
+15 -14
View File
@@ -560,6 +560,13 @@ About the new airlock wires panel:
ui_interact(user)
/obj/machinery/door/airlock/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "door_control.tmpl", "Door Controls - [src]", 600, 375)
ui.open()
ui.set_auto_update(1)
/obj/machinery/door/airlock/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["main_power_loss"] = round(main_power_lost_until > 0 ? max(main_power_lost_until - world.time, 0) / 10 : main_power_lost_until, 1)
@@ -568,22 +575,16 @@ About the new airlock wires panel:
data["open"] = !density
var/commands[0]
commands[++commands.len] = list("name" = "IdScan", "command"= "idscan", "active" = !aiDisabledIdScanner, "enabled" = "Enabled", "disabled" = "Disable", "danger" = 0, "act" = 1)
commands[++commands.len] = list("name" = "Bolts", "command"= "bolts", "active" = !locked, "enabled" = "Raised", "disabled" = "Dropped", "danger" = 0, "act" = 0)
commands[++commands.len] = list("name" = "Bolt Lights", "command"= "lights", "active" = lights, "enabled" = "Enabled", "disabled" = "Disable", "danger" = 0, "act" = 1)
commands[++commands.len] = list("name" = "Safeties", "command"= "safeties", "active" = safe, "enabled" = "Nominal", "disabled" = "Overridden", "danger" = 1, "act" = 0)
commands[++commands.len] = list("name" = "Timing", "command"= "timing", "active" = normalspeed, "enabled" = "Nominal", "disabled" = "Overridden", "danger" = 1, "act" = 0)
commands[++commands.len] = list("name" = "Door State", "command"= "open", "active" = density, "enabled" = "Closed", "disabled" = "Opened", "danger" = 0, "act" = 0)
commands[++commands.len] = list("name" = "Emergency Access", "command"= "emergency", "active" = !emergency, "enabled" = "Disabled", "disabled" = "Enabled", "danger" = 0, "act" = 0)
commands[++commands.len] = list("name" = "IdScan", "command"= "idscan", "active" = !aiDisabledIdScanner,"enabled" = "Enabled", "disabled" = "Disable", "danger" = 0, "act" = 1)
commands[++commands.len] = list("name" = "Bolts", "command"= "bolts", "active" = !locked, "enabled" = "Raised", "disabled" = "Dropped", "danger" = 0, "act" = 0)
commands[++commands.len] = list("name" = "Bolt Lights", "command"= "lights", "active" = lights, "enabled" = "Enabled", "disabled" = "Disable", "danger" = 0, "act" = 1)
commands[++commands.len] = list("name" = "Safeties", "command"= "safeties", "active" = safe, "enabled" = "Nominal", "disabled" = "Overridden", "danger" = 1, "act" = 0)
commands[++commands.len] = list("name" = "Timing", "command"= "timing", "active" = normalspeed, "enabled" = "Nominal", "disabled" = "Overridden", "danger" = 1, "act" = 0)
commands[++commands.len] = list("name" = "Door State", "command"= "open", "active" = density, "enabled" = "Closed", "disabled" = "Opened", "danger" = 0, "act" = 0)
commands[++commands.len] = list("name" = "Emergency Access","command"= "emergency", "active" = !emergency, "enabled" = "Disabled", "disabled" = "Enabled", "danger" = 0, "act" = 0)
data["commands"] = commands
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "door_control.tmpl", "Door Controls - [src]", 600, 375)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/door/airlock/proc/hack(mob/user as mob)
if(src.aiHacking==0)
@@ -21,6 +21,13 @@
name = "Advanced Airlock Controller"
/obj/machinery/embedded_controller/radio/airlock/advanced_airlock_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "advanced_airlock_console.tmpl", name, 470, 290)
ui.open()
ui.set_auto_update(1)
/obj/machinery/embedded_controller/radio/airlock/advanced_airlock_controller/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data = list(
@@ -32,16 +39,7 @@
"secure" = program.memory["secure"]
)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "advanced_airlock_console.tmpl", name, 470, 290)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/embedded_controller/radio/airlock/advanced_airlock_controller/Topic(href, href_list)
if(..())
@@ -79,6 +77,13 @@
tag_secure = 1
/obj/machinery/embedded_controller/radio/airlock/airlock_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "simple_airlock_console.tmpl", name, 470, 290)
ui.open()
ui.set_auto_update(1)
/obj/machinery/embedded_controller/radio/airlock/airlock_controller/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data = list(
@@ -88,16 +93,7 @@
"processing" = program.memory["processing"],
)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "simple_airlock_console.tmpl", name, 470, 290)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/embedded_controller/radio/airlock/airlock_controller/Topic(href, href_list)
if(..())
@@ -144,6 +140,13 @@
icon_state = "access_control_off"
/obj/machinery/embedded_controller/radio/airlock/access_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "door_access_console.tmpl", name, 330, 220)
ui.open()
ui.set_auto_update(1)
/obj/machinery/embedded_controller/radio/airlock/access_controller/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data = list(
@@ -152,16 +155,7 @@
"processing" = program.memory["processing"]
)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "door_access_console.tmpl", name, 330, 220)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/embedded_controller/radio/airlock/access_controller/Topic(href, href_list)
if(..())
@@ -186,4 +180,4 @@
if(clean)
program.receive_user_command(href_list["command"])
return 1
return 1
+8 -10
View File
@@ -174,6 +174,13 @@ FIRE ALARM
ui_interact(user)
/obj/machinery/firealarm/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "firealarm.tmpl", name, 400, 400, state = state)
ui.open()
ui.set_auto_update(1)
/obj/machinery/firealarm/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
var/area/A = get_area(src)
@@ -186,16 +193,7 @@ FIRE ALARM
var/minute = round(time / 60)
data["time_left"] = "[minute ? "[minute]:" : ""][add_zero(num2text(second), 2)]"
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "firealarm.tmpl", name, 400, 400, state = state)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/firealarm/Topic(href, href_list)
if(..())
+7 -6
View File
@@ -130,18 +130,19 @@
/obj/machinery/poolcontroller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "poolcontroller.tmpl", "Pool Controller Interface", 520, 410)
ui.open()
/obj/machinery/poolcontroller/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["currentTemp"] = temperature
data["emagged"] = emagged
data["TempColor"] = temperaturecolor
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "poolcontroller.tmpl", "Pool Controller Interface", 520, 410)
ui.set_initial_data(data)
ui.open()
return data
/obj/machinery/poolcontroller/Topic(href, href_list)
+9 -8
View File
@@ -43,18 +43,19 @@
iconholder = 1
/obj/machinery/porta_turret/tag/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300)
ui.open()
ui.set_auto_update(1)
/obj/machinery/porta_turret/tag/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["access"] = !isLocked(user)
data["locked"] = locked
data["enabled"] = enabled
data["is_lethal"] = 0
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/porta_turret/tag/update_icon()
if(!anchored)
@@ -121,4 +122,4 @@
if(istype(H.belt, target_weapon))
return TURRET_SECONDARY_TARGET
return TURRET_NOT_TARGET
return TURRET_NOT_TARGET
+8 -7
View File
@@ -194,6 +194,13 @@ var/list/turret_icons
ui_interact(user)
/obj/machinery/porta_turret/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 320)
ui.open()
ui.set_auto_update(1)
/obj/machinery/porta_turret/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["access"] = !isLocked(user)
data["screen"] = screen
@@ -224,13 +231,7 @@ var/list/turret_icons
active = (access in req_access)
accesses[++accesses.len] = list("name" = name, "active" = active, "number" = access)
data["accesses"] = accesses
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 320)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/porta_turret/proc/HasController()
var/area/A = get_area(src)
+2 -4
View File
@@ -297,10 +297,8 @@
O.loc = loc
for(var/mob/M in contents)
M.loc = loc
if(M.client)
M.client.eye = M.client.mob
M.client.perspective = MOB_PERSPECTIVE
to_chat(M, "\blue The machine turns off, and you fall out.")
M.reset_perspective(null)
to_chat(M, "<span class='notice'>The machine turns off, and you fall out.</span>")
return
+4 -12
View File
@@ -166,17 +166,12 @@
H.updatehealth()
/obj/machinery/recharge_station/proc/go_out()
if(!( src.occupant ))
if(!occupant)
return
//for(var/obj/O in src)
// O.loc = src.loc
if(src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.loc = src.loc
src.occupant = null
occupant.forceMove(loc)
occupant = null
build_icon()
src.use_power = 1
use_power = 1
return
/obj/machinery/recharge_station/proc/restock_modules()
@@ -300,9 +295,6 @@
return
user.stop_pulling()
if(user && user.client)
user.client.perspective = EYE_PERSPECTIVE
user.client.eye = src
user.forceMove(src)
occupant = user
+8 -6
View File
@@ -109,6 +109,13 @@ var/list/obj/machinery/requests_console/allConsoles = list()
ui_interact(user)
/obj/machinery/requests_console/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "request_console.tmpl", "[department] Request Console", 520, 410)
ui.open()
ui.set_auto_update(1)
/obj/machinery/requests_console/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["department"] = department
@@ -129,12 +136,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
data["msgVerified"] = msgVerified
data["announceAuth"] = announceAuth
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "request_console.tmpl", "[department] Request Console", 520, 410)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/requests_console/Topic(href, href_list)
if(..())
+9 -7
View File
@@ -22,6 +22,13 @@
ui_interact(user)
/obj/machinery/slot_machine/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "slotmachine.tmpl", name, 350, 200)
ui.open()
ui.set_auto_update(1)
/obj/machinery/slot_machine/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["working"] = working
@@ -30,12 +37,7 @@
data["result"] = result
data["resultlvl"] = resultlvl
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "slotmachine.tmpl", name, 350, 200)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/slot_machine/Topic(href, href_list)
add_fingerprint(usr)
@@ -112,4 +114,4 @@
T.amount = "[amt]"
T.date = current_date_string
T.time = worldtime2text()
account.transaction_log.Add(T)
account.transaction_log.Add(T)
+17 -35
View File
@@ -430,27 +430,21 @@
/obj/machinery/suit_storage_unit/proc/eject_occupant(mob/user as mob)
if(src.islocked)
if(islocked)
return
if(!src.OCCUPANT)
if(!OCCUPANT)
return
// for(var/obj/O in src)
// O.loc = src.loc
if(src.OCCUPANT.client)
if(user != OCCUPANT)
to_chat(OCCUPANT, "<font color='blue'>The machine kicks you out!</font>")
if(user.loc != src.loc)
to_chat(OCCUPANT, "<font color='blue'>You leave the not-so-cozy confines of the SSU.</font>")
src.OCCUPANT.client.eye = src.OCCUPANT.client.mob
src.OCCUPANT.client.perspective = MOB_PERSPECTIVE
src.OCCUPANT.loc = src.loc
src.OCCUPANT = null
if(!src.isopen)
src.isopen = 1
src.update_icon()
if(user != OCCUPANT)
to_chat(OCCUPANT, "<font color='blue'>The machine kicks you out!</font>")
if(user.loc != loc)
to_chat(OCCUPANT, "<font color='blue'>You leave the not-so-cozy confines of the SSU.</font>")
OCCUPANT.forceMove(loc)
OCCUPANT = null
if(!isopen)
isopen = 1
update_icon()
return
@@ -487,9 +481,7 @@
visible_message("[usr] starts squeezing into the suit storage unit!")
if(do_after(usr, 10, target = usr))
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.loc = src
usr.forceMove(src)
// usr.metabslow = 1
src.OCCUPANT = usr
src.isopen = 0 //Close the thing after the guy gets inside
@@ -532,10 +524,7 @@
if(do_after(user, 20, target = G:affecting))
if(!G || !G.affecting) return //derpcheck
var/mob/M = G.affecting
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.loc = src
M.forceMove(src)
src.OCCUPANT = M
src.isopen = 0 //close ittt
@@ -690,10 +679,7 @@
if(do_after(user, 20, target = G:affecting))
if(!G || !G.affecting) return
var/mob/M = G.affecting
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.loc = src
M.forceMove(src)
src.occupant = M
src.add_fingerprint(user)
@@ -999,16 +985,12 @@
if(!occupant)
return
if(occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.loc = get_turf(occupant)
occupant.forceMove(loc)
occupant = null
add_fingerprint(usr)
src.updateUsrDialog()
src.update_icon()
updateUsrDialog()
update_icon()
return
/*
+9 -10
View File
@@ -11,7 +11,6 @@
var/calibrating
var/turf/target //Used for one-time-use teleport cards (such as clown planet coordinates.)
//Setting this to 1 will set src.locked to null after a player enters the portal and will not allow hand-teles to open portals to that location.
var/data[0]
/obj/machinery/computer/teleporter/New()
src.id = "[rand(1000, 9999)]"
@@ -67,11 +66,17 @@
ui_interact(user)
/obj/machinery/computer/teleporter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(..())
return
if(stat & (NOPOWER|BROKEN))
return
// Set up the Nano UI
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "teleporter_console.tmpl", "Teleporter Console UI", 400, 400)
ui.open()
/obj/machinery/computer/teleporter/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["powerstation"] = power_station
if(power_station)
data["teleporterhub"] = power_station.teleporter_hub
@@ -86,13 +91,7 @@
data["target"] = (!target) ? "None" : sanitize(targetarea.name)
data["calibrating"] = calibrating
data["locked"] = locked
// Set up the Nano UI
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "teleporter_console.tmpl", "Teleporter Console UI", 400, 400)
ui.set_initial_data(data)
ui.open()
return data
/obj/machinery/computer/teleporter/Topic(href, href_list)
if(..())
+8 -6
View File
@@ -119,6 +119,13 @@
ui_interact(user)
/obj/machinery/turretid/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300)
ui.open()
ui.set_auto_update(1)
/obj/machinery/turretid/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["access"] = !isLocked(user)
data["locked"] = locked
@@ -136,12 +143,7 @@
settings[++settings.len] = list("category" = "Check Misc. Lifeforms", "setting" = "check_anomalies", "value" = check_anomalies)
data["settings"] = settings
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/turretid/Topic(href, href_list, var/nowindow = 0)
if(..())
+7 -6
View File
@@ -411,6 +411,12 @@
/obj/machinery/vending/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
user.set_machine(src)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "vending_machine.tmpl", src.name, 440, 600)
ui.open()
/obj/machinery/vending/ui_data(mob/user, datum/topic_state/state = default_state)
var/list/data = list()
if(currently_vending)
data["mode"] = 1
@@ -446,12 +452,7 @@
data["speaker"] = src.shut_up ? 0 : 1
else
data["panel"] = 0
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "vending_machine.tmpl", src.name, 440, 600)
ui.set_initial_data(data)
ui.open()
return data
/obj/machinery/vending/Topic(href, href_list)
if(..())
@@ -33,6 +33,7 @@
/obj/item/mecha_parts/mecha_equipment/Destroy()//missiles detonating, teleporter creating singularity?
if(chassis)
detach(chassis)
chassis.equipment -= src
listclearnulls(chassis.equipment)
if(chassis.selected == src)
@@ -115,12 +115,22 @@
equip_cooldown = 30
var/scanning = 0
/obj/item/mecha_parts/mecha_equipment/mining_scanner/New()
/obj/item/mecha_parts/mecha_equipment/mining_scanner/attach(obj/mecha/M)
. = ..()
processing_objects.Add(src)
M.occupant_sight_flags |= SEE_TURFS
if(M.occupant)
M.occupant.update_sight()
/obj/item/mecha_parts/mecha_equipment/mining_scanner/detach()
chassis.occupant_sight_flags &= ~SEE_TURFS
processing_objects.Remove(src)
if(chassis.occupant)
chassis.occupant.update_sight()
return ..()
/obj/item/mecha_parts/mecha_equipment/mining_scanner/process()
if(!loc)
processing_objects.Remove(src)
qdel(src)
if(scanning)
return
+14 -13
View File
@@ -145,7 +145,18 @@
ui_interact(user)
/obj/machinery/computer/mech_bay_power_console/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/list/data = list()
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "mech_bay_console.tmpl", "Mech Bay Control Console", 500, 325)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/machinery/computer/mech_bay_power_console/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
if(!recharge_port)
reconnect()
if(recharge_port && !qdeleted(recharge_port))
@@ -160,20 +171,10 @@
data["mecha_charge_percentage"] = isnull(recharge_port.recharging_mecha) ? 0 : round(recharge_port.recharging_mecha.cell.percent())
else
data["has_mech"] = 0
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "mech_bay_console.tmpl", "Mech Bay Control Console", 500, 325)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
return data
/obj/machinery/computer/mech_bay_power_console/initialize()
reconnect()
update_icon()
return ..()
return ..()
+13 -9
View File
@@ -65,6 +65,7 @@
var/max_equip = 3
var/datum/events/events
var/turf/crashing = null
var/occupant_sight_flags = 0
var/stepsound = 'sound/mecha/mechstep.ogg'
@@ -563,7 +564,9 @@
dam_coeff = B.damage_coeff
break
if(prob(deflect_chance * deflection) && (Proj.damage_type == BRUTE || Proj.damage_type == BURN))
if(Proj.damage_type != BRUTE && Proj.damage_type != BURN)
visible_message("<span class='danger'>[src]'s armour is undamaged by [Proj]!</span>")
else if(prob(deflect_chance * deflection))
visible_message("<span class='danger'>[src]'s armour deflects [Proj]!</span>")
else
visible_message("<span class='danger'>[src] is hit by [Proj].</span>")
@@ -1126,7 +1129,7 @@
occupant = H
H.stop_pulling()
H.forceMove(src)
H.reset_view(src)
H.reset_perspective(src)
add_fingerprint(H)
//GrantActions(H, human_occupant=1)
forceMove(loc)
@@ -1175,13 +1178,9 @@
to_chat(user, "<span class='notice'>\the [mmi_as_oc] is stuck to your hand, you cannot put it in \the [src]</span>")
return 0
var/mob/brainmob = mmi_as_oc.brainmob
brainmob.reset_view(src)
/*
brainmob.client.eye = src
brainmob.client.perspective = EYE_PERSPECTIVE
*/
brainmob.reset_perspective(src)
occupant = brainmob
brainmob.loc = src //should allow relaymove
brainmob.forceMove(src) //should allow relaymove
brainmob.canmove = 1
mmi_as_oc.loc = src
mmi_as_oc.mecha = src
@@ -1264,7 +1263,7 @@
var/obj/item/device/mmi/mmi = mob_container
if(mmi.brainmob)
L.loc = mmi
L.reset_view()
L.reset_perspective()
mmi.mecha = null
mmi.update_icon()
L.canmove = 0
@@ -1438,3 +1437,8 @@
/obj/mecha/speech_bubble(var/bubble_state = "",var/bubble_loc = src, var/list/bubble_recipients = list())
flick_overlay(image('icons/mob/talk.dmi', bubble_loc, bubble_state,MOB_LAYER+1), bubble_recipients, 30)
/obj/mecha/update_remote_sight(mob/living/user)
if(occupant_sight_flags)
if(user == occupant)
user.sight |= occupant_sight_flags
+8 -8
View File
@@ -17,6 +17,13 @@
ui_interact(user)
/obj/machinery/computer/mecha/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "exosuit_control.tmpl", "Exosuit Control Console", 420, 500)
ui.open()
ui.set_auto_update(1)
/obj/machinery/computer/mecha/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["screen"] = screen
if(screen == 0)
@@ -28,14 +35,7 @@
data["mechas"] = mechas
if(screen == 1)
data["log"] = stored_data
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "exosuit_control.tmpl", "Exosuit Control Console", 420, 500)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/computer/mecha/Topic(href, href_list)
if(..())
+2 -3
View File
@@ -61,8 +61,8 @@
M.adjust_fire_stacks(1)
M.IgniteMob()
/atom/movable/proc/unbuckle_mob()
if(buckled_mob && buckled_mob.buckled == src && buckled_mob.can_unbuckle(usr))
/atom/movable/proc/unbuckle_mob(force = FALSE)
if(buckled_mob && buckled_mob.buckled == src && (buckled_mob.can_unbuckle(usr) || force))
. = buckled_mob
buckled_mob.buckled = null
buckled_mob.anchored = initial(buckled_mob.anchored)
@@ -72,7 +72,6 @@
post_buckle_mob(.)
//Handle any extras after buckling/unbuckling
//Called on buckle_mob() and unbuckle_mob()
/atom/movable/proc/post_buckle_mob(mob/living/M)
+2 -1
View File
@@ -79,7 +79,8 @@
/obj/structure/alien/resin/bullet_act(obj/item/projectile/Proj)
health -= Proj.damage
if(Proj.damage_type == BRUTE || Proj.damage_type == BURN)
health -= Proj.damage
..()
healthcheck()
+14
View File
@@ -97,3 +97,17 @@
icon = 'icons/effects/effects.dmi'
icon_state = "admin"
layer = 4.1
/obj/effect/overlay/wall_rot
name = "Wallrot"
desc = "Ick..."
icon = 'icons/effects/wallrot.dmi'
anchored = 1
density = 1
layer = 5
mouse_opacity = 0
/obj/effect/overlay/wall_rot/New()
..()
pixel_x += rand(-10, 10)
pixel_y += rand(-10, 10)
+9 -6
View File
@@ -41,6 +41,14 @@
/obj/item/device/aicard/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "aicard.tmpl", "[name]", 600, 400, state = state)
ui.open()
ui.set_auto_update(1)
/obj/item/device/aicard/ui_data(mob/user, datum/topic_state/state = inventory_state)
var/data[0]
var/mob/living/silicon/ai/AI = locate() in src
@@ -59,12 +67,7 @@
data["laws"] = laws
data["has_laws"] = laws.len
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "aicard.tmpl", "[name]", 600, 400, state = state)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/item/device/aicard/Topic(href, href_list, nowindow, state)
@@ -56,7 +56,7 @@
/obj/item/device/camera_bug/check_eye(var/mob/user as mob)
if(user.stat || loc != user || !user.canmove || !user.has_vision() || !current)
user.reset_view(null)
user.reset_perspective(null)
user.unset_machine()
return null
@@ -64,7 +64,7 @@
if(T.z != current.z || !current.can_use())
to_chat(user, "<span class='danger'>[src] has lost the signal.</span>")
current = null
user.reset_view(null)
user.reset_perspective(null)
user.unset_machine()
return null
@@ -184,7 +184,7 @@
/obj/item/device/camera_bug/Topic(var/href,var/list/href_list)
if(usr != loc)
usr.unset_machine()
usr.reset_view(null)
usr.reset_perspective(null)
usr << browse(null, "window=camerabug")
return
usr.set_machine(src)
@@ -195,7 +195,7 @@
if(C)
track_mode = BUGMODE_MONITOR
current = C
usr.reset_view(null)
usr.reset_perspective(null)
interact()
if("track" in href_list)
var/atom/A = locate(href_list["track"])
@@ -214,7 +214,7 @@
interact()
return
if("close" in href_list)
usr.reset_view(null)
usr.reset_perspective(null)
usr.unset_machine()
current = null
return // I do not <- I do not remember what I was going to write in this comment -Sayu, sometime later
@@ -231,16 +231,16 @@
current = C
spawn(6)
if(src.check_eye(usr))
usr.reset_view(C)
usr.reset_perspective(C)
interact()
else
usr.unset_machine()
usr.reset_view(null)
usr.reset_perspective(null)
usr << browse(null, "window=camerabug")
return
else
usr.unset_machine()
usr.reset_view(null)
usr.reset_perspective(null)
interact()
@@ -83,7 +83,7 @@
A.loc = active_dummy.loc
if(ismob(A))
var/mob/M = A
M.reset_view(null)
M.reset_perspective(null)
/obj/effect/dummy/chameleon
name = ""
@@ -33,6 +33,9 @@
song.ui_interact(user, ui_key, ui, force_open)
/obj/item/device/guitar/ui_data(mob/user, datum/topic_state/state = default_state)
return song.ui_data(user, state)
/obj/item/device/guitar/Topic(href, href_list)
song.Topic(href, href_list)
@@ -99,15 +99,17 @@
/obj/item/device/radio/electropack/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "radio_electro.tmpl", "[name]", 400, 500)
ui.open()
ui.set_auto_update(1)
/obj/item/device/radio/electropack/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["power"] = on
data["freq"] = format_frequency(frequency)
data["code"] = code
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "radio_electro.tmpl", "[name]", 400, 500)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
+16 -12
View File
@@ -108,6 +108,13 @@ var/global/list/default_medbay_channels = list(
return ui_interact(user)
/obj/item/device/radio/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 400, 550)
ui.open()
ui.set_auto_update(1)
/obj/item/device/radio/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["mic_status"] = broadcasting
@@ -126,12 +133,7 @@ var/global/list/default_medbay_channels = list(
if(syndie)
data["useSyndMode"] = 1
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 400, 550)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/item/device/radio/proc/list_channels(var/mob/user)
@@ -749,6 +751,13 @@ var/global/list/default_medbay_channels = list(
. = ..()
/obj/item/device/radio/borg/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 430, 500)
ui.open()
ui.set_auto_update(1)
/obj/item/device/radio/borg/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["mic_status"] = broadcasting
@@ -769,12 +778,7 @@ var/global/list/default_medbay_channels = list(
data["has_subspace"] = 1
data["subspace"] = subspace_transmission
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 430, 500)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/item/device/radio/proc/config(op)
if(radio_controller)
@@ -90,26 +90,26 @@
ui_interact(user)
/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "transfer_valve.tmpl", "Tank Transfer Valve", 460, 280)
// open the new ui window
ui.open()
// auto update every Master Controller tick
//ui.set_auto_update(1)
// this is the data which will be sent to the ui
/obj/item/device/transfer_valve/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["attachmentOne"] = tank_one ? tank_one.name : null
data["attachmentTwo"] = tank_two ? tank_two.name : null
data["valveAttachment"] = attached_device ? attached_device.name : null
data["valveOpen"] = valve_open ? 1 : 0
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "transfer_valve.tmpl", "Tank Transfer Valve", 460, 280)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
//ui.set_auto_update(1)
return data
/obj/item/device/transfer_valve/Topic(href, href_list)
..()
@@ -219,4 +219,4 @@
// this doesn't do anything but the timer etc. expects it to be here
// eventually maybe have it update icon to show state (timer, prox etc.) like old bombs
/obj/item/device/transfer_valve/proc/c_state()
return
return
+12 -12
View File
@@ -187,8 +187,18 @@ var/list/world_uplinks = list()
/*
NANO UI FOR UPLINK WOOP WOOP
*/
/obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
/obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
var/title = "Remote Uplink"
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "uplink.tmpl", title, 700, 600, state = state)
// open the new ui window
ui.open()
/obj/item/device/uplink/hidden/ui_data(mob/user, datum/topic_state/state = inventory_state)
var/data[0]
data["welcome"] = welcome
@@ -200,17 +210,7 @@ var/list/world_uplinks = list()
data["nano_items"] = nanoui_items
data += nanoui_data
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "uplink.tmpl", title, 700, 600, state = inventory_state)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
return data
// Interaction code. Gathers a list of items purchasable from the paren't uplink and displays it. It also adds a lock button.
/obj/item/device/uplink/hidden/interact(mob/user)
@@ -38,5 +38,8 @@
song.ui_interact(user, ui_key, ui, force_open)
/obj/item/device/violin/ui_data(mob/user, datum/topic_state/state = default_state)
return song.ui_data(user, state)
/obj/item/device/violin/Topic(href, href_list)
song.Topic(href, href_list)
+9 -7
View File
@@ -83,7 +83,14 @@ RCD
ui_interact(user)
/obj/item/weapon/rcd/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
var/list/data = list()
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "rcd.tmpl", "[name]", 400, 400, state = state)
ui.open()
ui.set_auto_update(1)
/obj/item/weapon/rcd/ui_data(mob/user, datum/topic_state/state = inventory_state)
var/data[0]
data["mode"] = mode
data["door_type"] = door_type
data["menu"] = menu
@@ -100,12 +107,7 @@ RCD
data["door_accesses"] = door_accesses_list
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "rcd.tmpl", "[name]", 400, 400, state = state)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/item/weapon/rcd/Topic(href, href_list, nowindow, state)
if(..())
+1 -1
View File
@@ -58,4 +58,4 @@
if(l && !(l.status & ORGAN_DESTROYED))
l.status |= ORGAN_DESTROYED
if(r && !(r.status & ORGAN_DESTROYED))
r.status |= ORGAN_DESTROYED
r.status |= ORGAN_DESTROYED
@@ -55,9 +55,7 @@
for(var/mob/M in src) //Should only be one but whatever.
M.loc = src.loc
if(M.client)
M.client.eye = M.client.mob
M.client.perspective = MOB_PERSPECTIVE
M.reset_perspective(null)
qdel(src)
@@ -94,10 +94,7 @@
return
if(M == occupant) // so that the guy inside can't eject himself -Agouri
return
if(src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.loc = src.loc
occupant.forceMove(loc)
if(injecting)
implant(src.occupant)
injecting = 0
@@ -113,11 +110,8 @@
if(src.occupant)
to_chat(usr, "<span class='warning'>The [src.name] is already occupied!</span>")
return
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.stop_pulling()
M.loc = src
M.forceMove(src)
src.occupant = M
src.add_fingerprint(usr)
icon_state = "implantchair_on"
+17 -18
View File
@@ -80,11 +80,11 @@
/obj/item/weapon/tank/examine(mob/user)
if(!..(user, 0))
return
var/obj/icon = src
if(istype(loc, /obj/item/assembly))
icon = loc
if(!in_range(src, user))
if(icon == src)
to_chat(user, "<span class='notice'>It's \a [bicon(icon)][src]! If you want any more information you'll need to get closer.</span>")
@@ -141,14 +141,24 @@
ui_interact(user)
/obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "tanks.tmpl", "Tank", 500, 300)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/item/weapon/tank/ui_data(mob/user, datum/topic_state/state = default_state)
var/using_internal
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(location.internal==src)
if(iscarbon(loc))
var/mob/living/carbon/C = loc
if(C.internal == src)
using_internal = 1
// this is the data which will be sent to the ui
var/data[0]
data["tankPressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0)
data["releasePressure"] = round(distribute_pressure ? distribute_pressure : 0)
@@ -170,18 +180,7 @@
if(H.head && (H.head.flags & AIRTIGHT))
data["maskConnected"] = 1
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "tanks.tmpl", "Tank", 500, 300)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
return data
/obj/item/weapon/tank/Topic(href, href_list)
if(..())
@@ -58,13 +58,11 @@
for(var/mob/M in src)
moveMob(M, loc)
if(M.client)
M.client.eye = M.client.mob
M.client.perspective = MOB_PERSPECTIVE
/obj/structure/closet/proc/moveMob(var/mob/M, var/atom/destination)
loc.Exited(M)
M.loc = destination
M.reset_perspective(destination)
if(isturf(loc))
loc.Entered(M, src, ignoreRest = 1)
else
@@ -122,10 +120,6 @@
if(M.buckled)
continue
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
moveMob(M, src)
itemcount++
@@ -428,3 +422,7 @@
..()
visible_message("<span class='danger'>[src] is blown apart by the bolt of electricity!</span>", "<span class='danger'>You hear a metallic screeching sound.</span>")
qdel(src)
/obj/structure/closet/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
@@ -18,10 +18,7 @@
if(L.buckled)
L.buckled = 0
L.anchored = 0
if(L.client)
L.client.perspective = EYE_PERSPECTIVE
L.client.eye = src
L.loc = src
L.forceMove(src)
L.disabilities += MUTE
health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
intialTox = L.getToxLoss()
@@ -76,12 +73,9 @@
O.loc = src.loc
for(var/mob/living/M in src)
M.loc = src.loc
M.forceMove(loc)
M.disabilities -= MUTE
M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob
if(M.client)
M.client.eye = M.client.mob
M.client.perspective = MOB_PERSPECTIVE
/obj/structure/closet/statue/open()
@@ -164,4 +158,4 @@ obj/structure/statue/angel
icon_state = "angelseen"
obj/structure/statue/corgi
icon_state = "corgi"
icon_state = "corgi"
+8
View File
@@ -154,6 +154,10 @@
src.attack_hand(CM)
/obj/structure/morgue/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
/*
* Morgue tray
*/
@@ -393,6 +397,10 @@
to_chat(CM, "<span class='alert'>You attempt to slide yourself out of \the [src]...</span>")
src.attack_hand(CM)
/obj/structure/crematorium/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
/*
* Crematorium tray
*/
+14 -9
View File
@@ -113,6 +113,16 @@
repeat = 0
/datum/song/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(!instrumentObj)
return
ui = nanomanager.try_update_ui(user, instrumentObj, ui_key, ui, force_open)
if(!ui)
ui = new(user, instrumentObj, ui_key, "song.tmpl", instrumentObj.name, 700, 500)
ui.open()
ui.set_auto_update(1)
/datum/song/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["lines"] = lines
@@ -125,15 +135,7 @@
data["minTempo"] = world.tick_lag
data["maxTempo"] = 600
if(!instrumentObj)
return
ui = nanomanager.try_update_ui(user, instrumentObj, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, instrumentObj, ui_key, "song.tmpl", instrumentObj.name, 700, 500)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/datum/song/Topic(href, href_list)
if(!in_range(instrumentObj, usr) || (issilicon(usr) && instrumentObj.loc != usr) || !isliving(usr) || !usr.canmove || usr.restrained())
@@ -294,6 +296,9 @@
song.ui_interact(user, ui_key, ui, force_open)
/obj/structure/piano/ui_data(mob/user, datum/topic_state/state = default_state)
return song.ui_data(user, state)
/obj/structure/piano/Topic(href, href_list)
song.Topic(href, href_list)
@@ -147,7 +147,7 @@
if(!(locate(/obj/structure/transit_tube) in loc))
mob.loc = loc
mob.client.Move(get_step(loc, direction), direction)
mob.reset_view(null)
mob.reset_perspective(null)
//if(moving && istype(loc, /turf/space))
// Todo: If you get out of a moving pod in space, you should move as well.
@@ -161,7 +161,7 @@
if(station.icon_state == "open")
mob.loc = loc
mob.client.Move(get_step(loc, direction), direction)
mob.reset_view(null)
mob.reset_perspective(null)
else
station.open_animation()
+12 -23
View File
@@ -23,7 +23,7 @@
var/hardness = 40 //lower numbers are harder. Used to determine the probability of a hulk smashing through.
var/engraving, engraving_quality //engraving on the wall
var/sheet_type = /obj/item/stack/sheet/metal
var/obj/item/stack/sheet/builtin_sheet = null
@@ -39,16 +39,14 @@
/turf/simulated/wall/New()
..()
builtin_sheet = new sheet_type
builtin_sheet = new sheet_type
/turf/simulated/wall/BeforeChange()
for(var/obj/effect/E in src)
// such quality code
if(E.name == "Wallrot")
qdel(E)
for(var/obj/effect/overlay/wall_rot/WR in src)
qdel(WR)
. = ..()
//Appearance
/turf/simulated/wall/examine(mob/user)
. = ..(user)
@@ -139,7 +137,7 @@
O.loc = src
ChangeTurf(/turf/simulated/floor/plating)
/turf/simulated/wall/proc/break_wall()
builtin_sheet.amount = 2
builtin_sheet.loc = src
@@ -187,21 +185,12 @@
var/number_rots = rand(2,3)
for(var/i=0, i<number_rots, i++)
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
O.name = "Wallrot"
O.desc = "Ick..."
O.icon = 'icons/effects/wallrot.dmi'
O.pixel_x += rand(-10, 10)
O.pixel_y += rand(-10, 10)
O.anchored = 1
O.density = 1
O.layer = 5
O.mouse_opacity = 0
new /obj/effect/overlay/wall_rot(src)
/turf/simulated/wall/proc/thermitemelt(mob/user as mob)
if(istype(sheet_type, /obj/item/stack/sheet/mineral/diamond))
return
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
O.name = "Thermite"
O.desc = "Looks hot."
@@ -275,7 +264,7 @@
return
//get the user's location
if(!istype(user.loc, /turf))
if(!istype(user.loc, /turf))
return //can't do this stuff whilst inside objects and such
if(rotting)
@@ -284,8 +273,8 @@
if(WT.remove_fuel(0,user))
to_chat(user, "<span class='notice'>You burn away the fungi with \the [WT].</span>")
playsound(src, 'sound/items/Welder.ogg', 10, 1)
for(var/obj/effect/E in src) if(E.name == "Wallrot")
qdel(E)
for(var/obj/effect/overlay/wall_rot/WR in src)
qdel(WR)
rotting = 0
return
else if(!is_sharp(W) && W.force >= 10 || W.force >= 20)
@@ -29,8 +29,8 @@
if( WT.remove_fuel(0,user) )
to_chat(user, "<span class='notice'>You burn away the fungi with \the [WT].</span>")
playsound(src, 'sound/items/Welder.ogg', 10, 1)
for(var/obj/effect/E in src) if(E.name == "Wallrot")
qdel(E)
for(var/obj/effect/overlay/wall_rot/WR in src)
qdel(WR)
rotting = 0
return
else if(!is_sharp(W) && W.force >= 10 || W.force >= 20)
+2 -2
View File
@@ -539,9 +539,9 @@ var/global/nologevent = 0
world.Reboot("Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key].", "end_error", "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", delay)
/datum/admins/proc/announce()
set category = "Special Verbs"
set category = "Admin"
set name = "Announce"
set desc="Announce your desires to the world"
set desc = "Announce your desires to the world"
if(!check_rights(R_ADMIN))
return
+1 -1
View File
@@ -534,7 +534,7 @@ var/list/admin_verbs_snpc = list(
#undef AUTOBANTIME
/client/proc/drop_bomb() // Some admin dickery that can probably be done better -- TLE
set category = "Special Verbs"
set category = "Event"
set name = "Drop Bomb"
set desc = "Cause an explosion of varying strength at your location."
+3 -2
View File
@@ -396,7 +396,8 @@
/proc/togglebuildmode(mob/M as mob in player_list)
set name = "Toggle Build Mode"
set category = "Special Verbs"
set category = "Event"
if(M.client)
if(istype(M.client.click_intercept,/datum/click_intercept/buildmode))
var/datum/click_intercept/buildmode/B = M.client.click_intercept
@@ -404,7 +405,7 @@
log_admin("[key_name(usr)] has left build mode.")
else
new/datum/click_intercept/buildmode(M.client)
message_admins("[key_name(usr)] has entered build mode.")
message_admins("[key_name_admin(usr)] has entered build mode.")
log_admin("[key_name(usr)] has entered build mode.")
/datum/click_intercept/buildmode/InterceptClickOn(user,params,atom/object) //Click Intercept
-8
View File
@@ -2235,14 +2235,6 @@
qdel(O)
for(var/obj/structure/grille/O in world)
qdel(O)
/* for(var/obj/machinery/vehicle/pod/O in world)
for(var/mob/M in src)
M.loc = src.loc
if(M.client)
M.client.perspective = MOB_PERSPECTIVE
M.client.eye = M
qdel(O)
ok = 1*/
if("monkey")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","M")
+2 -2
View File
@@ -1,5 +1,5 @@
/client/proc/cmd_admin_say(msg as text)
set category = "Special Verbs"
set category = "Admin"
set name = "Asay" //Gave this shit a shorter name so you only have to time out "asay" rather than "admin say" to use it --NeoFite
set hidden = 1
if(!check_rights(R_ADMIN)) return
@@ -17,7 +17,7 @@
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_mentor_say(msg as text)
set category = "Special Verbs"
set category = "Admin"
set name = "Msay"
set hidden = 1
+1 -1
View File
@@ -1,5 +1,5 @@
/client/proc/dsay(msg as text)
set category = "Special Verbs"
set category = "Admin"
set name = "Dsay" //Gave this shit a shorter name so you only have to time out "dsay" rather than "dead say" to use it --NeoFite
set hidden = 1
+13 -10
View File
@@ -7,13 +7,15 @@
////////////////////////////////////////////////////////////////////////////////
var/global/list/frozen_mob_list = list()
/client/proc/freeze(var/mob/living/M as mob in mob_list)
set category = "Special Verbs"
set category = "Admin"
set name = "Freeze"
if(!holder)
to_chat(src, "<font color='red'>Error: Freeze: Only administrators may use this command.</font>")
if(!check_rights(R_ADMIN))
return
if(!istype(M)) return
if(!check_rights(R_ADMIN)) return
if(!istype(M))
return
if(M in frozen_mob_list)
M.admin_unFreeze(src)
else
@@ -83,14 +85,15 @@ var/global/list/frozen_mob_list = list()
//////////////////////////Freeze Mech
/client/proc/freezemecha(var/obj/mecha/O as obj in mechas_list)
set category = "Special Verbs"
set category = "Admin"
set name = "Freeze Mech"
if(!holder)
to_chat(src, "Only administrators may use this command.")
return
if(!check_rights(R_ADMIN))
return
var/obj/mecha/M = O
if(!istype(M,/obj/mecha))
to_chat(src, "<span class='danger'>This can only be used on Mechs!</span>")
to_chat(src, "<span class='danger'>This can only be used on mechs!</span>")
return
else
if(usr)
@@ -21,8 +21,8 @@ var/global/sent_syndicate_infiltration_team = 0
var/pick_manually = 0
if(alert("Pick the team members manually? If you select yes, you pick from ghosts. If you select no, ghosts get offered the chance to join.",,"Yes","No")=="Yes")
pick_manually = 1
var/list/teamsizeoptions = list(1,2,3,4,5)
var/teamsize = input(src, "How many team members, not counting the team leader?") as null|anything in teamsizeoptions
var/list/teamsizeoptions = list(2,3,4,5,6)
var/teamsize = input(src, "How many team members, including the team leader?") as null|anything in teamsizeoptions
if(!(teamsize in teamsizeoptions))
alert("Invalid team size specified. Aborting.")
return
@@ -102,11 +102,11 @@ var/global/sent_syndicate_infiltration_team = 0
to_chat(new_syndicate_infiltrator, "<span class='danger'>As team leader, it is up to you to organize your team! Give the job to someone else if you can't handle it. Only your ID opens the exit door.</span>")
else
to_chat(new_syndicate_infiltrator, "<span class='danger'>Your team leader is: [team_leader]. They are in charge!</span>")
teamsize--
teamsize--
to_chat(new_syndicate_infiltrator, "<span class='notice'>You have more helpful information stored in your Notes.</span>")
new_syndicate_infiltrator.mind.store_memory("<B>Mission:</B> [input] ")
new_syndicate_infiltrator.mind.store_memory("<B>Team Leader:</B> [team_leader] ")
new_syndicate_infiltrator.mind.store_memory("<B>Starting Equipment:</B> <BR>- Chameleon Jumpsuit ((right click to Change Color))<BR> - Agent ID card ((disguise as another job))<BR> - Uplink Implant ((top left of screen)) <BR> - Dust Implant ((destroys your body on death)) <BR> - Combat Gloves ((insulated, disguised as black gloves)) <BR> - Anything bought with your uplink implant")
new_syndicate_infiltrator.mind.store_memory("<B>Starting Equipment:</B> <BR>- Syndicate Headset ((.h for your radio))<BR>- Chameleon Jumpsuit ((right click to Change Color))<BR> - Agent ID card ((disguise as another job))<BR> - Uplink Implant ((top left of screen)) <BR> - Dust Implant ((destroys your body on death)) <BR> - Combat Gloves ((insulated, disguised as black gloves)) <BR> - Anything bought with your uplink implant")
var/datum/atom_hud/antag/opshud = huds[ANTAG_HUD_OPS]
opshud.join_hud(new_syndicate_infiltrator.mind.current)
ticker.mode.set_antag_hud(new_syndicate_infiltrator.mind.current, "hudoperative")
@@ -145,8 +145,7 @@ var/global/sent_syndicate_infiltration_team = 0
var/datum/preferences/A = new() //Randomize appearance
A.real_name = syndicate_infiltrator_name
A.copy_to(new_syndicate_infiltrator)
new_syndicate_infiltrator.dna.ready_dna(new_syndicate_infiltrator) //Creates DNA.
new_syndicate_infiltrator.dna.ready_dna(new_syndicate_infiltrator)
//Creates mind stuff.
new_syndicate_infiltrator.mind_initialize()
@@ -154,7 +153,6 @@ var/global/sent_syndicate_infiltration_team = 0
new_syndicate_infiltrator.mind.special_role = "Syndicate Infiltrator"
ticker.mode.traitors |= new_syndicate_infiltrator.mind //Adds them to extra antag list
new_syndicate_infiltrator.equip_syndicate_infiltrator(syndicate_leader_selected, uplink_tc, is_mgmt)
qdel(spawn_location)
return new_syndicate_infiltrator
// ---------------------------------------------------------------------------------------------------------
@@ -180,9 +178,6 @@ var/global/sent_syndicate_infiltration_team = 0
U.hidden_uplink.uses = 500
else
U.hidden_uplink.uses = num_tc
// Storage
//var/obj/item/weapon/implant/storage/T = new /obj/item/weapon/implant/storage(src)
//T.implant(src)
// Dust
var/obj/item/weapon/implant/dust/D = new /obj/item/weapon/implant/dust(src)
D.implant(src)
@@ -196,7 +191,7 @@ var/global/sent_syndicate_infiltration_team = 0
// Other gear
equip_to_slot_or_del(new /obj/item/clothing/shoes/syndigaloshes(src), slot_shoes)
var/obj/item/weapon/card/id/syndicate/W = new(src) //Untrackable by AI
var/obj/item/weapon/card/id/syndicate/W = new(src)
if (flag_mgmt)
W.icon_state = "commander"
else

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