Merge branch 'master' into upstream-merge-32823

This commit is contained in:
deathride58
2017-11-18 06:06:14 +00:00
committed by GitHub
126 changed files with 908 additions and 1064 deletions
+3 -2
View File
@@ -77,7 +77,7 @@
/proc/alone_in_area(area/the_area, mob/must_be_alone, check_type = /mob/living/carbon)
var/area/our_area = get_area(the_area)
for(var/C in GLOB.living_mob_list)
for(var/C in GLOB.alive_mob_list)
if(!istype(C, check_type))
continue
if(C == must_be_alone)
@@ -318,7 +318,8 @@
break
/proc/get_mob_by_key(key)
for(var/mob/M in GLOB.mob_list)
for(var/i in GLOB.player_list)
var/mob/M = i
if(M.ckey == lowertext(key))
return M
return null
+6 -3
View File
@@ -232,7 +232,7 @@ Turf and target are separate in case you want to teleport some distance from a t
//Returns a list of unslaved cyborgs
/proc/active_free_borgs()
. = list()
for(var/mob/living/silicon/robot/R in GLOB.living_mob_list)
for(var/mob/living/silicon/robot/R in GLOB.alive_mob_list)
if(R.connected_ai || R.shell)
continue
if(R.stat == DEAD)
@@ -244,7 +244,7 @@ Turf and target are separate in case you want to teleport some distance from a t
//Returns a list of AI's
/proc/active_ais(check_mind=0)
. = list()
for(var/mob/living/silicon/ai/A in GLOB.living_mob_list)
for(var/mob/living/silicon/ai/A in GLOB.alive_mob_list)
if(A.stat == DEAD)
continue
if(A.control_disabled == 1)
@@ -920,7 +920,7 @@ GLOBAL_LIST_INIT(WALLITEMS_INVERSE, typecacheof(list(
/proc/living_player_count()
var/living_player_count = 0
for(var/mob in GLOB.player_list)
if(mob in GLOB.living_mob_list)
if(mob in GLOB.alive_mob_list)
living_player_count += 1
return living_player_count
@@ -1357,6 +1357,9 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
anchored = TRUE
var/ready_to_die = FALSE
/mob/dview/Initialize() //Properly prevents this mob from gaining huds or joining any global lists
return
/mob/dview/Destroy(force = FALSE)
if(!ready_to_die)
stack_trace("ALRIGHT WHICH FUCKER TRIED TO DELETE *MY* DVIEW?")
+3 -1
View File
@@ -12,11 +12,13 @@ GLOBAL_LIST_EMPTY(stealthminID) //reference list with IDs that store ckeys,
GLOBAL_LIST_EMPTY(player_list) //all mobs **with clients attached**. Excludes /mob/dead/new_player
GLOBAL_LIST_EMPTY(mob_list) //all mobs, including clientless
GLOBAL_LIST_EMPTY(mob_directory) //mob_id -> mob
GLOBAL_LIST_EMPTY(living_mob_list) //all alive mobs, including clientless. Excludes /mob/dead/new_player
GLOBAL_LIST_EMPTY(alive_mob_list) //all alive mobs, including clientless. Excludes /mob/dead/new_player
GLOBAL_LIST_EMPTY(drones_list)
GLOBAL_LIST_EMPTY(dead_mob_list) //all dead mobs, including clientless. Excludes /mob/dead/new_player
GLOBAL_LIST_EMPTY(joined_player_list) //all clients that have joined the game at round-start or as a latejoin.
GLOBAL_LIST_EMPTY(silicon_mobs) //all silicon mobs
GLOBAL_LIST_EMPTY(mob_living_list) //all instances of /mob/living and subtypes
GLOBAL_LIST_EMPTY(carbon_list) //all instances of /mob/living/carbon and subtypes, notably does not contain brains or simple animals
GLOBAL_LIST_EMPTY(ai_list)
GLOBAL_LIST_EMPTY(pai_list)
GLOBAL_LIST_EMPTY(available_ai_shells)
+1 -1
View File
@@ -390,7 +390,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
var/servants = 0
var/validservants = 0
var/list/textlist
for(var/mob/living/L in GLOB.living_mob_list)
for(var/mob/living/L in GLOB.alive_mob_list)
if(is_servant_of_ratvar(L))
servants++
if(ishuman(L) || issilicon(L))
@@ -15,7 +15,7 @@
/datum/objective/crew/cyborgs/check_completion()
var/borgcount = target_amount
for(var/mob/living/silicon/robot/R in GLOB.living_mob_list)
for(var/mob/living/silicon/robot/R in GLOB.alive_mob_list)
if(!(R.stat == DEAD))
borgcount--
if(borgcount <= 0)
@@ -42,4 +42,4 @@
if(S && S.files && S.files.known_designs)
if(targetdesign in S.files.known_designs)
return TRUE
return FALSE
return FALSE
+6 -5
View File
@@ -575,7 +575,7 @@ SUBSYSTEM_DEF(job)
///////////////////////////////////
/datum/controller/subsystem/job/proc/get_living_heads()
. = list()
for(var/mob/living/carbon/human/player in GLOB.mob_list)
for(var/mob/living/carbon/human/player in GLOB.alive_mob_list)
if(player.stat != DEAD && player.mind && (player.mind.assigned_role in GLOB.command_positions))
. |= player.mind
@@ -585,7 +585,8 @@ SUBSYSTEM_DEF(job)
////////////////////////////
/datum/controller/subsystem/job/proc/get_all_heads()
. = list()
for(var/mob/player in GLOB.mob_list)
for(var/i in GLOB.mob_list)
var/mob/player = i
if(player.mind && (player.mind.assigned_role in GLOB.command_positions))
. |= player.mind
@@ -594,7 +595,7 @@ SUBSYSTEM_DEF(job)
//////////////////////////////////////////////
/datum/controller/subsystem/job/proc/get_living_sec()
. = list()
for(var/mob/living/carbon/human/player in GLOB.mob_list)
for(var/mob/living/carbon/human/player in GLOB.carbon_list)
if(player.stat != DEAD && player.mind && (player.mind.assigned_role in GLOB.security_positions))
. |= player.mind
@@ -603,6 +604,6 @@ SUBSYSTEM_DEF(job)
////////////////////////////////////////
/datum/controller/subsystem/job/proc/get_all_sec()
. = list()
for(var/mob/living/carbon/human/player in GLOB.mob_list)
for(var/mob/living/carbon/human/player in GLOB.carbon_list)
if(player.mind && (player.mind.assigned_role in GLOB.security_positions))
. |= player.mind
. |= player.mind
+5 -3
View File
@@ -7,13 +7,15 @@ SUBSYSTEM_DEF(mobs)
var/list/currentrun = list()
/datum/controller/subsystem/mobs/stat_entry()
..("P:[GLOB.mob_list.len]")
..("P:[GLOB.mob_living_list.len]")
/datum/controller/subsystem/mobs/fire(resumed = 0)
var/seconds = wait * 0.1
if (!resumed)
src.currentrun = GLOB.mob_list.Copy()
src.currentrun = GLOB.mob_living_list.Copy()
if (GLOB.overminds.len) // blob cameras need to Life()
src.currentrun += GLOB.overminds
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
@@ -24,6 +26,6 @@ SUBSYSTEM_DEF(mobs)
if(M)
M.Life(seconds, times_fired)
else
GLOB.mob_list.Remove(M)
GLOB.mob_living_list.Remove(M)
if (MC_TICK_CHECK)
return
+1 -1
View File
@@ -73,7 +73,7 @@ SUBSYSTEM_DEF(persistence)
break
/datum/controller/subsystem/persistence/proc/LoadPoly()
for(var/mob/living/simple_animal/parrot/Poly/P in GLOB.living_mob_list)
for(var/mob/living/simple_animal/parrot/Poly/P in GLOB.alive_mob_list)
twitterize(P.speech_buffer, "polytalk")
break //Who's been duping the bird?!
+5 -3
View File
@@ -416,7 +416,8 @@ SUBSYSTEM_DEF(ticker)
C.playtitlemusic(40)*/
//Player status report
for(var/mob/Player in GLOB.mob_list)
for(var/i in GLOB.mob_list)
var/mob/Player = i
if(Player.mind && !isnewplayer(Player))
if(Player.stat != DEAD && !isbrain(Player))
num_survivors++
@@ -462,7 +463,8 @@ SUBSYSTEM_DEF(ticker)
CHECK_TICK
//Silicon laws report
for (var/mob/living/silicon/ai/aiPlayer in GLOB.mob_list)
for (var/i in GLOB.ai_list)
var/mob/living/silicon/ai/aiPlayer = i
if (aiPlayer.stat != DEAD && aiPlayer.mind)
to_chat(world, "<b>[aiPlayer.name] (Played by: [aiPlayer.mind.key])'s laws at the end of the round were:</b>")
aiPlayer.show_laws(1)
@@ -481,7 +483,7 @@ SUBSYSTEM_DEF(ticker)
CHECK_TICK
for (var/mob/living/silicon/robot/robo in GLOB.mob_list)
for (var/mob/living/silicon/robot/robo in GLOB.silicon_mobs)
if (!robo.connected_ai && robo.mind)
if (robo.stat != DEAD)
to_chat(world, "<b>[robo.name] (Played by: [robo.mind.key]) survived as an AI-less borg! Its laws were:</b>")
+2 -1
View File
@@ -13,7 +13,8 @@ SUBSYSTEM_DEF(weather)
var/datum/weather/W = V
if(W.aesthetic)
continue
for(var/mob/living/L in GLOB.mob_list)
for(var/i in GLOB.mob_living_list)
var/mob/living/L = i
if(W.can_weather_act(L))
W.weather_act(L)
for(var/Z in eligible_zlevels)
+5
View File
@@ -537,6 +537,11 @@
admin_delete(D)
href_list["datumrefresh"] = href_list["delete"]
else if(href_list["osay"])
if(!check_rights(R_FUN, 0))
return
usr.client.object_say(locate(href_list["osay"]))
else if(href_list["regenerateicons"])
if(!check_rights(0))
return
+1 -1
View File
@@ -416,7 +416,7 @@
for(var/datum/disease/advance/AD in SSdisease.active_diseases)
AD.Refresh()
for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list))
for(var/mob/living/carbon/human/H in shuffle(GLOB.alive_mob_list))
if(!(H.z in GLOB.station_z_levels))
continue
if(!H.HasDisease(D))
+2 -1
View File
@@ -326,7 +326,8 @@ GLOBAL_LIST_EMPTY(teleportlocs)
var/obj/machinery/camera/C = item
cameras += C
for (var/mob/living/silicon/SILICON in GLOB.player_list)
for (var/i in GLOB.silicon_mobs)
var/mob/living/silicon/SILICON = i
if(SILICON.triggerAlarm("Burglar", src, cameras, trigger))
//Cancel silicon alert after 1 minute
addtimer(CALLBACK(SILICON, /mob/living/silicon.proc/cancelAlarm,"Burglar",src,trigger), 600)
+2 -1
View File
@@ -79,7 +79,8 @@ GLOBAL_LIST_EMPTY(blob_nodes)
/mob/camera/blob/proc/victory()
sound_to_playing_players('sound/machines/alarm.ogg')
sleep(100)
for(var/mob/living/L in GLOB.mob_list)
for(var/i in GLOB.mob_living_list)
var/mob/living/L = i
var/turf/T = get_turf(L)
if(!T || !(T.z in GLOB.station_z_levels))
continue
@@ -48,7 +48,8 @@
if(3)
to_chat(user, "<span class='notice'>We mold the [target]'s mind like clay, granting [target.p_them()] the ability to speak in the hivemind!</span>")
to_chat(target, "<span class='userdanger'>A migraine throbs behind your eyes, you hear yourself screaming - but your mouth has not opened!</span>")
for(var/mob/M in GLOB.mob_list)
for(var/mi in GLOB.mob_list)
var/mob/M = mi
if(M.lingcheck() == 2)
to_chat(M, "<i><font color=#800080>We can sense a foreign presence in the hivemind...</font></i>")
target.mind.linglink = 1
@@ -162,7 +162,7 @@
var/locname = initial(A.name)
possible_targets[avoid_assoc_duplicate_keys("[locname] [O.name]", teleportnames)] = O
for(var/mob/living/L in GLOB.living_mob_list)
for(var/mob/living/L in GLOB.alive_mob_list)
if(!L.stat && is_servant_of_ratvar(L) && !L.Adjacent(invoker) && (L.z <= ZLEVEL_SPACEMAX)) //People right next to the invoker can't be portaled to, for obvious reasons
possible_targets[avoid_assoc_duplicate_keys("[L.name] ([L.real_name])", teleportnames)] = L
@@ -322,7 +322,7 @@
to_chat(invoker, "<span class='warning'>You must not be inside an object to use this scripture!</span>")
return FALSE
var/other_servants = 0
for(var/mob/living/L in GLOB.living_mob_list)
for(var/mob/living/L in GLOB.alive_mob_list)
if(is_servant_of_ratvar(L) && !L.stat && L != invoker)
other_servants++
for(var/obj/structure/destructible/clockwork/powered/clockwork_obelisk/O in GLOB.all_clockwork_objects)
@@ -100,7 +100,7 @@
continue
C.update_values()
to_chat(C, C.empower_string)
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(is_servant_of_ratvar(H))
to_chat(H, "<span class='bold alloy'>The beacon's power warps your body into a clockwork form! You are now immune to many hazards, and your body is more robust against damage!</span>")
H.set_species(/datum/species/golem/clockwork/no_scrap)
@@ -67,7 +67,7 @@
T.ratvar_act(TRUE)
var/dir_to_step_in = pick(GLOB.cardinals)
var/list/meals = list()
for(var/mob/living/L in GLOB.living_mob_list) //we want to know who's alive so we don't lose and retarget a single person
for(var/mob/living/L in GLOB.alive_mob_list) //we want to know who's alive so we don't lose and retarget a single person
if(L.z == z && !is_servant_of_ratvar(L) && L.mind)
meals += L
if(GLOB.cult_narsie && GLOB.cult_narsie.z == z)
+2 -1
View File
@@ -40,7 +40,8 @@
else if(!ishuman(user))
title = "Construct"
my_message = "<span class='[span]'><b>[title] [findtextEx(user.name, user.real_name) ? user.name : "[user.real_name] (as [user.name])"]:</b> [message]</span>"
for(var/mob/M in GLOB.mob_list)
for(var/i in GLOB.player_list)
var/mob/M = i
if(iscultist(M))
to_chat(M, my_message)
else if(M in GLOB.dead_mob_list)
+8 -15
View File
@@ -217,7 +217,7 @@
if(living_antag_player && living_antag_player.mind && isliving(living_antag_player) && living_antag_player.stat != DEAD && !isnewplayer(living_antag_player) &&!isbrain(living_antag_player))
return 0 //A resource saver: once we find someone who has to die for all antags to be dead, we can just keep checking them, cycling over everyone only when we lose our mark.
for(var/mob/Player in GLOB.living_mob_list)
for(var/mob/Player in GLOB.alive_mob_list)
if(Player.mind && Player.stat != DEAD && !isnewplayer(Player) &&!isbrain(Player) && Player.client)
if(Player.mind.special_role || LAZYLEN(Player.mind.antag_datums)) //Someone's still antaging!
living_antag_player = Player
@@ -407,16 +407,11 @@
//////////////////////////
/proc/display_roundstart_logout_report()
var/msg = "<span class='boldnotice'>Roundstart logout report\n\n</span>"
for(var/mob/living/L in GLOB.mob_list)
for(var/i in GLOB.mob_living_list)
var/mob/living/L = i
if(L.ckey)
var/found = 0
for(var/client/C in GLOB.clients)
if(C.ckey == L.ckey)
found = 1
break
if(!found)
msg += "<b>[L.name]</b> ([L.ckey]), the [L.job] (<font color='#ffcc00'><b>Disconnected</b></font>)\n"
if(L.ckey && !GLOB.directory[L.ckey])
msg += "<b>[L.name]</b> ([L.ckey]), the [L.job] (<font color='#ffcc00'><b>Disconnected</b></font>)\n"
if(L.ckey && L.client)
@@ -452,10 +447,8 @@
continue //Ghosted while alive
for(var/mob/M in GLOB.mob_list)
if(M.client && M.client.holder)
to_chat(M, msg)
for (var/C in GLOB.admins)
to_chat(C, msg)
/datum/game_mode/proc/printplayer(datum/mind/ply, fleecheck)
var/text = "<br><b>[ply.key]</b> was <b>[ply.name]</b> the <b>[ply.assigned_role]</b> and"
@@ -535,4 +528,4 @@
//By default nuke just ends the round
/datum/game_mode/proc/OnNukeExplosion(off_station)
if(off_station < 2)
station_was_nuked = TRUE //Will end the round on next check.
station_was_nuked = TRUE //Will end the round on next check.
@@ -375,7 +375,8 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
/obj/machinery/doomsday_device/proc/detonate(z_level = ZLEVEL_STATION_PRIMARY)
sound_to_playing_players('sound/machines/alarm.ogg')
sleep(100)
for(var/mob/living/L in GLOB.mob_list)
for(var/i in GLOB.mob_living_list)
var/mob/living/L = i
var/turf/T = get_turf(L)
if(!T || !(T.z in GLOB.station_z_levels))
continue
@@ -654,7 +654,8 @@
/mob/living/simple_animal/hostile/swarmer/proc/swarmer_chat(msg)
var/rendered = "<B>Swarm communication - [src]</b> [say_quote(msg, get_spans())]"
for(var/mob/M in GLOB.mob_list)
for(var/i in GLOB.mob_list)
var/mob/M = i
if(isswarmer(M))
to_chat(M, rendered)
if(isobserver(M))
@@ -21,7 +21,8 @@
print_command_report(swarmer_report, announce=TRUE)
/datum/round_event/spawn_swarmer/proc/find_swarmer()
for(var/mob/living/M in GLOB.mob_list)
if(istype(M, /mob/living/simple_animal/hostile/swarmer) && M.client) //If there is a swarmer with an active client, we've found our swarmer
for(var/i in GLOB.mob_living_list)
var/mob/living/L = i
if(istype(L, /mob/living/simple_animal/hostile/swarmer) && L.client) //If there is a swarmer with an active client, we've found our swarmer
return 1
return 0
@@ -76,7 +76,7 @@
return 0
var/datum/disease/D = new /datum/disease/transformation/jungle_fever() //ugly but unfortunately needed
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(H.mind && H.stat != DEAD)
if(H.HasDisease(D))
return 0
@@ -87,7 +87,7 @@
if(SSshuttle.emergency.mode != SHUTTLE_ENDGAME)
return 0
var/datum/disease/D = new /datum/disease/transformation/jungle_fever()
for(var/mob/living/carbon/monkey/M in GLOB.living_mob_list)
for(var/mob/living/carbon/monkey/M in GLOB.alive_mob_list)
if (M.HasDisease(D))
if(M.onCentCom() || M.onSyndieBase())
escaped_monkeys++
+1 -1
View File
@@ -194,7 +194,7 @@
if(headrevs.len)
var/num_revs = 0
var/num_survivors = 0
for(var/mob/living/carbon/survivor in GLOB.living_mob_list)
for(var/mob/living/carbon/survivor in GLOB.alive_mob_list)
if(survivor.ckey)
num_survivors++
if(survivor.mind)
+1 -1
View File
@@ -288,7 +288,7 @@
possible = list()
if(!link)
return
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(md5(H.dna.uni_identity) in link.fingerprints)
possible |= H
+6 -5
View File
@@ -97,11 +97,12 @@
GLOB.cameranet.addCamera(src)
emped = 0 //Resets the consecutive EMP count
addtimer(CALLBACK(src, .proc/cancelCameraAlarm), 100)
for(var/mob/O in GLOB.mob_list)
if (O.client && O.client.eye == src)
O.unset_machine()
O.reset_perspective(null)
to_chat(O, "The screen bursts into static.")
for(var/i in GLOB.player_list)
var/mob/M = i
if (M.client.eye == src)
M.unset_machine()
M.reset_perspective(null)
to_chat(M, "The screen bursts into static.")
..()
/obj/machinery/camera/tesla_act(var/power)//EMP proof upgrade also makes it tesla immune
+3 -2
View File
@@ -50,7 +50,8 @@
/obj/machinery/camera/proc/cancelAlarm()
if (detectTime == -1)
for (var/mob/living/silicon/aiPlayer in GLOB.player_list)
for (var/i in GLOB.silicon_mobs)
var/mob/living/silicon/aiPlayer = i
if (status)
aiPlayer.cancelAlarm("Motion", get_area(src), src)
detectTime = 0
@@ -69,4 +70,4 @@
// Motion cameras outside of an "ai monitored" area will use this to detect stuff.
if (!area_motion)
if(isliving(AM))
newTarget(AM)
newTarget(AM)
+168 -172
View File
@@ -1,172 +1,168 @@
/mob/living/silicon/ai/proc/get_camera_list()
track.cameras.Cut()
if(src.stat == DEAD)
return
var/list/L = list()
for (var/obj/machinery/camera/C in GLOB.cameranet.cameras)
L.Add(C)
camera_sort(L)
var/list/T = list()
for (var/obj/machinery/camera/C in L)
var/list/tempnetwork = C.network&src.network
if (tempnetwork.len)
T[text("[][]", C.c_tag, (C.can_use() ? null : " (Deactivated)"))] = C
track.cameras = T
return T
/mob/living/silicon/ai/proc/ai_camera_list(camera)
if (!camera)
return 0
var/obj/machinery/camera/C = track.cameras[camera]
src.eyeobj.setLoc(C)
return
/datum/trackable
var/list/names = list()
var/list/namecounts = list()
var/list/humans = list()
var/list/others = list()
var/list/cameras = list()
/mob/living/silicon/ai/proc/trackable_mobs()
track.names.Cut()
track.namecounts.Cut()
track.humans.Cut()
track.others.Cut()
if(usr.stat == DEAD)
return list()
for(var/mob/living/M in GLOB.mob_list)
if(!M.can_track(usr))
continue
// Human check
var/human = 0
if(ishuman(M))
human = 1
var/name = M.name
while(name in track.names)
track.namecounts[name]++
name = text("[] ([])", name, track.namecounts[name])
track.names.Add(name)
track.namecounts[name] = 1
if(human)
track.humans[name] = M
else
track.others[name] = M
var/list/targets = sortList(track.humans) + sortList(track.others)
return targets
/mob/living/silicon/ai/verb/ai_camera_track(target_name in trackable_mobs())
set name = "track"
set hidden = 1 //Don't display it on the verb lists. This verb exists purely so you can type "track Oldman Robustin" and follow his ass
if(!target_name)
return
var/mob/target = (isnull(track.humans[target_name]) ? track.others[target_name] : track.humans[target_name])
ai_actual_track(target)
/mob/living/silicon/ai/proc/ai_actual_track(mob/living/target)
if(!istype(target))
return
var/mob/living/silicon/ai/U = usr
U.cameraFollow = target
U.tracking = 1
if(!target || !target.can_track(usr))
to_chat(U, "<span class='warning'>Target is not near any active cameras.</span>")
U.cameraFollow = null
return
to_chat(U, "<span class='notice'>Now tracking [target.get_visible_name()] on camera.</span>")
var/cameraticks = 0
spawn(0)
while(U.cameraFollow == target)
if(U.cameraFollow == null)
return
if(!target.can_track(usr))
U.tracking = 1
if(!cameraticks)
to_chat(U, "<span class='warning'>Target is not near any active cameras. Attempting to reacquire...</span>")
cameraticks++
if(cameraticks > 9)
U.cameraFollow = null
to_chat(U, "<span class='warning'>Unable to reacquire, cancelling track...</span>")
tracking = 0
return
else
sleep(10)
continue
else
cameraticks = 0
U.tracking = 0
if(U.eyeobj)
U.eyeobj.setLoc(get_turf(target))
else
view_core()
U.cameraFollow = null
return
sleep(10)
/proc/near_camera(mob/living/M)
if (!isturf(M.loc))
return 0
if(issilicon(M))
var/mob/living/silicon/S = M
if((!QDELETED(S.builtInCamera) || !S.builtInCamera.can_use()) && !GLOB.cameranet.checkCameraVis(M))
return 0
else if(!GLOB.cameranet.checkCameraVis(M))
return 0
return 1
/obj/machinery/camera/attack_ai(mob/living/silicon/ai/user)
if (!istype(user))
return
if (!src.can_use())
return
user.eyeobj.setLoc(get_turf(src))
/mob/living/silicon/ai/attack_ai(mob/user)
ai_camera_list()
/proc/camera_sort(list/L)
var/obj/machinery/camera/a
var/obj/machinery/camera/b
for (var/i = L.len, i > 0, i--)
for (var/j = 1 to i - 1)
a = L[j]
b = L[j + 1]
if (a.c_tag_order != b.c_tag_order)
if (a.c_tag_order > b.c_tag_order)
L.Swap(j, j + 1)
else
if (sorttext(a.c_tag, b.c_tag) < 0)
L.Swap(j, j + 1)
return L
/mob/living/silicon/ai/proc/get_camera_list()
track.cameras.Cut()
if(src.stat == DEAD)
return
var/list/L = list()
for (var/obj/machinery/camera/C in GLOB.cameranet.cameras)
L.Add(C)
camera_sort(L)
var/list/T = list()
for (var/obj/machinery/camera/C in L)
var/list/tempnetwork = C.network&src.network
if (tempnetwork.len)
T[text("[][]", C.c_tag, (C.can_use() ? null : " (Deactivated)"))] = C
track.cameras = T
return T
/mob/living/silicon/ai/proc/ai_camera_list(camera)
if (!camera)
return 0
var/obj/machinery/camera/C = track.cameras[camera]
src.eyeobj.setLoc(C)
return
/datum/trackable
var/list/names = list()
var/list/namecounts = list()
var/list/humans = list()
var/list/others = list()
var/list/cameras = list()
/mob/living/silicon/ai/proc/trackable_mobs()
track.names.Cut()
track.namecounts.Cut()
track.humans.Cut()
track.others.Cut()
if(usr.stat == DEAD)
return list()
for(var/i in GLOB.mob_living_list)
var/mob/living/L = i
if(!L.can_track(usr))
continue
var/name = L.name
while(name in track.names)
track.namecounts[name]++
name = text("[] ([])", name, track.namecounts[name])
track.names.Add(name)
track.namecounts[name] = 1
if(ishuman(L))
track.humans[name] = L
else
track.others[name] = L
var/list/targets = sortList(track.humans) + sortList(track.others)
return targets
/mob/living/silicon/ai/verb/ai_camera_track(target_name in trackable_mobs())
set name = "track"
set hidden = 1 //Don't display it on the verb lists. This verb exists purely so you can type "track Oldman Robustin" and follow his ass
if(!target_name)
return
var/mob/target = (isnull(track.humans[target_name]) ? track.others[target_name] : track.humans[target_name])
ai_actual_track(target)
/mob/living/silicon/ai/proc/ai_actual_track(mob/living/target)
if(!istype(target))
return
var/mob/living/silicon/ai/U = usr
U.cameraFollow = target
U.tracking = 1
if(!target || !target.can_track(usr))
to_chat(U, "<span class='warning'>Target is not near any active cameras.</span>")
U.cameraFollow = null
return
to_chat(U, "<span class='notice'>Now tracking [target.get_visible_name()] on camera.</span>")
var/cameraticks = 0
spawn(0)
while(U.cameraFollow == target)
if(U.cameraFollow == null)
return
if(!target.can_track(usr))
U.tracking = 1
if(!cameraticks)
to_chat(U, "<span class='warning'>Target is not near any active cameras. Attempting to reacquire...</span>")
cameraticks++
if(cameraticks > 9)
U.cameraFollow = null
to_chat(U, "<span class='warning'>Unable to reacquire, cancelling track...</span>")
tracking = 0
return
else
sleep(10)
continue
else
cameraticks = 0
U.tracking = 0
if(U.eyeobj)
U.eyeobj.setLoc(get_turf(target))
else
view_core()
U.cameraFollow = null
return
sleep(10)
/proc/near_camera(mob/living/M)
if (!isturf(M.loc))
return 0
if(issilicon(M))
var/mob/living/silicon/S = M
if((!QDELETED(S.builtInCamera) || !S.builtInCamera.can_use()) && !GLOB.cameranet.checkCameraVis(M))
return 0
else if(!GLOB.cameranet.checkCameraVis(M))
return 0
return 1
/obj/machinery/camera/attack_ai(mob/living/silicon/ai/user)
if (!istype(user))
return
if (!src.can_use())
return
user.eyeobj.setLoc(get_turf(src))
/mob/living/silicon/ai/attack_ai(mob/user)
ai_camera_list()
/proc/camera_sort(list/L)
var/obj/machinery/camera/a
var/obj/machinery/camera/b
for (var/i = L.len, i > 0, i--)
for (var/j = 1 to i - 1)
a = L[j]
b = L[j + 1]
if (a.c_tag_order != b.c_tag_order)
if (a.c_tag_order > b.c_tag_order)
L.Swap(j, j + 1)
else
if (sorttext(a.c_tag, b.c_tag) < 0)
L.Swap(j, j + 1)
return L
+72 -74
View File
@@ -1,74 +1,72 @@
/obj/machinery/computer/operating
name = "operating computer"
desc = "Used to monitor the vitals of a patient during surgery."
icon_screen = "crew"
icon_keyboard = "med_key"
circuit = /obj/item/circuitboard/computer/operating
var/mob/living/carbon/human/patient
var/obj/structure/table/optable/table
light_color = LIGHT_COLOR_BLUE
/obj/machinery/computer/operating/Initialize()
. = ..()
find_table()
/obj/machinery/computer/operating/proc/find_table()
for(var/dir in GLOB.cardinals)
table = locate(/obj/structure/table/optable, get_step(src, dir))
if(table)
table.computer = src
break
/obj/machinery/computer/operating/attack_hand(mob/user)
if(..())
return
interact(user)
/obj/machinery/computer/operating/interact(mob/user)
var/dat = ""
if(table)
dat += "<B>Patient information:</B><BR>"
if(table.check_patient())
patient = table.patient
dat += get_patient_info()
else
patient = null
dat += "<B>No patient detected</B>"
else
dat += "<B>Operating table not found.</B>"
var/datum/browser/popup = new(user, "op", "Operating Computer", 400, 500)
popup.set_content(dat)
popup.open()
/obj/machinery/computer/operating/proc/get_patient_info()
var/dat = {"
<div class='statusLabel'>Patient:</div> [patient.stat ? "<span class='bad'>Non-Responsive</span>" : "<span class='good'>Stable</span>"]<BR>
<div class='statusLabel'>Blood Type:</div> [patient.dna.blood_type]
<BR>
<div class='line'><div class='statusLabel'>Health:</div><div class='progressBar'><div style='width: [max(patient.health, 0)]%;' class='progressFill good'></div></div><div class='statusValue'>[patient.health]%</div></div>
<div class='line'><div class='statusLabel'>\> Brute Damage:</div><div class='progressBar'><div style='width: [max(patient.getBruteLoss(), 0)]%;' class='progressFill bad'></div></div><div class='statusValue'>[patient.getBruteLoss()]%</div></div>
<div class='line'><div class='statusLabel'>\> Resp. Damage:</div><div class='progressBar'><div style='width: [max(patient.getOxyLoss(), 0)]%;' class='progressFill bad'></div></div><div class='statusValue'>[patient.getOxyLoss()]%</div></div>
<div class='line'><div class='statusLabel'>\> Toxin Content:</div><div class='progressBar'><div style='width: [max(patient.getToxLoss(), 0)]%;' class='progressFill bad'></div></div><div class='statusValue'>[patient.getToxLoss()]%</div></div>
<div class='line'><div class='statusLabel'>\> Burn Severity:</div><div class='progressBar'><div style='width: [max(patient.getFireLoss(), 0)]%;' class='progressFill bad'></div></div><div class='statusValue'>[patient.getFireLoss()]%</div></div>
"}
if(patient.surgeries.len)
dat += "<BR><BR><B>Initiated Procedures</B><div class='statusDisplay'>"
for(var/datum/surgery/procedure in patient.surgeries)
dat += "[capitalize(procedure.name)]<BR>"
var/datum/surgery_step/surgery_step = procedure.get_surgery_step()
dat += "Next step: [capitalize(surgery_step.name)]"
if(surgery_step.repeatable)
dat += " or "
var/datum/surgery_step/next_step = procedure.get_surgery_next_step()
if(next_step)
dat += "[capitalize(next_step.name)]"
else
dat += "finish operation"
dat += "<BR>"
dat += "</div>"
return dat
/obj/machinery/computer/operating
name = "operating computer"
desc = "Used to monitor the vitals of a patient during surgery."
icon_screen = "crew"
icon_keyboard = "med_key"
circuit = /obj/item/circuitboard/computer/operating
var/mob/living/carbon/human/patient
var/obj/structure/table/optable/table
light_color = LIGHT_COLOR_BLUE
/obj/machinery/computer/operating/Initialize()
. = ..()
find_table()
/obj/machinery/computer/operating/proc/find_table()
for(var/dir in GLOB.cardinals)
table = locate(/obj/structure/table/optable, get_step(src, dir))
if(table)
table.computer = src
break
/obj/machinery/computer/operating/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "operating_computer", name, 350, 470, master_ui, state)
ui.open()
/obj/machinery/computer/operating/ui_data(mob/user)
var/list/data = list()
data["table"] = table
if(table)
data["patient"] = list()
if(table.check_patient())
patient = table.patient
switch(patient.stat)
if(CONSCIOUS)
data["patient"]["stat"] = "Conscious"
data["patient"]["statstate"] = "good"
if(SOFT_CRIT)
data["patient"]["stat"] = "Conscious"
data["patient"]["statstate"] = "average"
if(UNCONSCIOUS)
data["patient"]["stat"] = "Unconscious"
data["patient"]["statstate"] = "average"
if(DEAD)
data["patient"]["stat"] = "Dead"
data["patient"]["statstate"] = "bad"
data["patient"]["health"] = patient.health
data["patient"]["blood_type"] = patient.dna.blood_type
data["patient"]["maxHealth"] = patient.maxHealth
data["patient"]["minHealth"] = HEALTH_THRESHOLD_DEAD
data["patient"]["bruteLoss"] = patient.getBruteLoss()
data["patient"]["fireLoss"] = patient.getFireLoss()
data["patient"]["toxLoss"] = patient.getToxLoss()
data["patient"]["oxyLoss"] = patient.getOxyLoss()
if(patient.surgeries.len)
data["procedures"] = list()
for(var/datum/surgery/procedure in patient.surgeries)
var/datum/surgery_step/surgery_step = procedure.get_surgery_step()
var/alternative_step
if(surgery_step.repeatable)
var/datum/surgery_step/next_step = procedure.get_surgery_next_step()
if(next_step)
alternative_step = capitalize(next_step.name)
else
alternative_step = "Finish operation"
data["procedures"] += list(list(
"name" = capitalize(procedure.name),
"next_step" = capitalize(surgery_step.name),
"alternative_step" = alternative_step
))
return data
+1 -1
View File
@@ -150,7 +150,7 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
var/pos_y
var/life_status
for(var/mob/living/carbon/human/H in GLOB.mob_list)
for(var/mob/living/carbon/human/H in GLOB.carbon_list)
// Check if their z-level is correct and if they are wearing a uniform.
// Accept H.z==0 as well in case the mob is inside an object.
if ((H.z == 0 || H.z == z) && istype(H.w_uniform, /obj/item/clothing/under))
+1 -1
View File
@@ -173,7 +173,7 @@
dat += "<a href='?src=[REF(src)];screen=1'>Back</a>"
dat += "<br><b>Medical Robots:</b>"
var/bdat = null
for(var/mob/living/simple_animal/bot/medbot/M in GLOB.living_mob_list)
for(var/mob/living/simple_animal/bot/medbot/M in GLOB.alive_mob_list)
if(M.z != src.z)
continue //only find medibots on the same z-level as the computer
var/turf/bl = get_turf(M)
+2 -2
View File
@@ -37,7 +37,7 @@
user.set_machine(src)
var/dat
var/robots = 0
for(var/mob/living/silicon/robot/R in GLOB.mob_list)
for(var/mob/living/silicon/robot/R in GLOB.silicon_mobs)
if(!can_control(user, R))
continue
robots++
@@ -75,7 +75,7 @@
dat += "<BR>"
var/drones = 0
for(var/mob/living/simple_animal/drone/D in GLOB.mob_list)
for(var/mob/living/simple_animal/drone/D in GLOB.drones_list)
if(D.hacked)
continue
drones++
+1 -1
View File
@@ -699,7 +699,7 @@ What a mess.*/
if("released")
active2.fields["criminal"] = "Discharged"
investigate_log("[active1.fields["name"]] has been set from [old_field] to [active2.fields["criminal"]] by [usr.name] ([usr.key]).", INVESTIGATE_RECORDS)
for(var/mob/living/carbon/human/H in GLOB.mob_list) //thanks for forcing me to do this, whoever wrote this shitty records system
for(var/mob/living/carbon/human/H in GLOB.carbon_list)
H.sec_hud_set_security_status()
if("Delete Record (Security) Execute")
investigate_log("[usr.name] ([usr.key]) has deleted the security records for [active1.fields["name"]].", INVESTIGATE_RECORDS)
+3 -1
View File
@@ -1358,7 +1358,7 @@
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "ai_airlock", name, 550, 430, master_ui, state)
ui = new(user, src, ui_key, "ai_airlock", name, 550, 456, master_ui, state)
ui.open()
/obj/machinery/door/airlock/ui_data()
@@ -1381,6 +1381,8 @@
data["lights"] = lights // bolt lights
data["safe"] = safe // safeties
data["speed"] = normalspeed // safe speed
data["welded"] = welded // welded
data["opened"] = !density // opened
var/list/wire = list()
wire["main_1"] = !wires.is_cut(WIRE_POWER1)
+1 -1
View File
@@ -20,7 +20,7 @@ Buildable meters
w_class = WEIGHT_CLASS_NORMAL
level = 2
var/piping_layer = PIPING_LAYER_DEFAULT
var/RPD_type //TEMP: kill this once RPDs get a rewrite pls
var/RPD_type
/obj/item/pipe/directional
RPD_type = PIPE_UNARY
+1 -1
View File
@@ -1124,7 +1124,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
/obj/item/clothing/head/beanie/purple=1, /obj/item/clothing/head/beanie/yellow=1, /obj/item/clothing/head/beanie/orange=1, /obj/item/clothing/head/beanie/cyan=1, /obj/item/clothing/head/beanie/christmas=1,
/obj/item/clothing/head/beanie/striped=1, /obj/item/clothing/head/beanie/stripedred=1, /obj/item/clothing/head/beanie/stripedblue=1, /obj/item/clothing/head/beanie/stripedgreen=1,
/obj/item/clothing/suit/jacket/letterman_red=1,
/obj/item/clothing/ears/headphones = 10)
/obj/item/clothing/ears/headphones = 10, /obj/item/clothing/suit/apron/purple_bartender=2, /obj/item/clothing/under/rank/bartender/purple=2)
contraband = list(/obj/item/clothing/under/syndicate/tacticool=1, /obj/item/clothing/mask/balaclava=1, /obj/item/clothing/head/ushanka=1, /obj/item/clothing/under/soviet=1, /obj/item/storage/belt/fannypack/black=2, /obj/item/clothing/suit/jacket/letterman_syndie=1, /obj/item/clothing/under/jabroni=1, /obj/item/clothing/suit/vapeshirt=1, /obj/item/clothing/under/geisha=1)
premium = list(/obj/item/clothing/under/suit_jacket/checkered=1, /obj/item/clothing/head/mailman=1, /obj/item/clothing/under/rank/mailman=1, /obj/item/clothing/suit/jacket/leather=1, /obj/item/clothing/suit/jacket/leather/overcoat=1, /obj/item/clothing/under/pants/mustangjeans=1, /obj/item/clothing/neck/necklace/dope=3, /obj/item/clothing/suit/jacket/letterman_nanotrasen=1)
refill_canister = /obj/item/vending_refill/clothing
+17 -17
View File
@@ -1,17 +1,17 @@
/obj/effect/manifest
name = "manifest"
icon = 'icons/mob/screen_gen.dmi'
icon_state = "x"
/obj/effect/manifest/New()
src.invisibility = INVISIBILITY_ABSTRACT
/obj/effect/manifest/proc/manifest()
var/dat = "<B>Crew Manifest</B>:<BR>"
for(var/mob/living/carbon/human/M in GLOB.mob_list)
dat += text(" <B>[]</B> - []<BR>", M.name, M.get_assignment())
var/obj/item/paper/P = new /obj/item/paper( src.loc )
P.info = dat
P.name = "paper- 'Crew Manifest'"
//SN src = null
qdel(src)
/obj/effect/manifest
name = "manifest"
icon = 'icons/mob/screen_gen.dmi'
icon_state = "x"
/obj/effect/manifest/New()
src.invisibility = INVISIBILITY_ABSTRACT
/obj/effect/manifest/proc/manifest()
var/dat = "<B>Crew Manifest</B>:<BR>"
for(var/mob/living/carbon/human/M in GLOB.carbon_list)
dat += text(" <B>[]</B> - []<BR>", M.name, M.get_assignment())
var/obj/item/paper/P = new /obj/item/paper( src.loc )
P.info = dat
P.name = "paper- 'Crew Manifest'"
//SN src = null
qdel(src)
+125 -399
View File
@@ -13,7 +13,6 @@ RPD
#define CATEGORY_DISPOSALS 1
//find the defines in code\_DEFINES\pipe_construction.dm
GLOBAL_LIST_INIT(atmos_pipe_recipes, list(
"Pipes" = list(
new /datum/pipe_info/pipe("Pipe", /obj/machinery/atmospherics/pipe/simple),
@@ -60,10 +59,8 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
/datum/pipe_info
var/name
var/icon
var/icon_state
var/id = -1
var/categoryId
var/dirtype = PIPE_BENDABLE
/datum/pipe_info/proc/Render(dispenser)
@@ -80,26 +77,51 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
/datum/pipe_info/proc/Params()
return ""
/datum/pipe_info/proc/get_preview(selected_dir)
var/list/dirs
switch(dirtype)
if(PIPE_STRAIGHT, PIPE_BENDABLE)
dirs = list("[NORTH]" = "Vertical", "[EAST]" = "Horizontal")
if(dirtype == PIPE_BENDABLE)
dirs += list("[NORTHWEST]" = "West to North", "[NORTHEAST]" = "North to East",
"[SOUTHWEST]" = "South to West", "[SOUTHEAST]" = "East to South")
if(PIPE_TRINARY, PIPE_TRIN_M)
dirs = list("[NORTH]" = "West South East", "[EAST]" = "North West South",
"[SOUTH]" = "East North West", "[WEST]" = "South East North")
if(dirtype == PIPE_TRIN_M)
dirs += list("[SOUTHEAST]" = "West South East", "[NORTHEAST]" = "North West South",
"[NORTHWEST]" = "East North West", "[SOUTHWEST]" = "South East North")
if(PIPE_UNARY)
dirs = list("[NORTH]" = "North", "[EAST]" = "East", "[SOUTH]" = "South", "[WEST]" = "West")
if(PIPE_ONEDIR)
dirs = list("[SOUTH]" = name)
/datum/pipe_info/pipe
categoryId = CATEGORY_ATMOS
icon = 'icons/obj/atmospherics/pipes/pipe_item.dmi'
var/list/rows = list()
var/list/row = list("previews" = list())
var/i = 0
for(var/dir in dirs)
var/flipped = (dirtype == PIPE_TRIN_M) && (text2num(dir) in GLOB.diagonals)
row["previews"] += list(list("selected" = (text2num(dir) == selected_dir), "dir" = dir2text(text2num(dir)), "dir_name" = dirs[dir], "icon_state" = icon_state, "flipped" = flipped))
if(i++ || dirtype == PIPE_ONEDIR)
rows += list(row)
row = list("previews" = list())
i = 0
return rows
/datum/pipe_info/pipe/New(label, obj/machinery/atmospherics/path)
name = label
id = path
icon_state = initial(path.pipe_state)
dirtype = initial(path.construction_type)
var/obj/item/pipe/c = initial(path.construction_type)
dirtype = initial(c.RPD_type)
/datum/pipe_info/pipe/Params()
return "makepipe=[id]&type=[dirtype]"
/datum/pipe_info/meter
categoryId = CATEGORY_ATMOS
dirtype = PIPE_ONEDIR
icon = 'icons/obj/meter.dmi'
icon_state = "meterX"
dirtype = PIPE_ONEDIR
/datum/pipe_info/meter/New(label)
name = label
@@ -107,11 +129,6 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
/datum/pipe_info/meter/Params()
return "makemeter=[id]&type=[dirtype]"
/datum/pipe_info/disposal
categoryId = CATEGORY_DISPOSALS
icon = 'icons/obj/atmospherics/pipes/disposal.dmi'
/datum/pipe_info/disposal/New(label, obj/path, dt=PIPE_UNARY)
name = label
id = path
@@ -126,7 +143,6 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
return "dmake=[id]&type=[dirtype]"
/obj/item/pipe_dispenser
name = "Rapid Piping Device (RPD)"
desc = "A device used to rapidly pipe things."
@@ -144,29 +160,35 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
resistance_flags = FIRE_PROOF
var/datum/effect_system/spark_spread/spark_system
var/working = 0
var/p_type = /obj/machinery/atmospherics/pipe/simple
var/p_conntype = PIPE_BENDABLE
var/p_dir = 1
var/mode = ATMOS_MODE
var/p_dir = NORTH
var/p_flipped = FALSE
var/p_class = ATMOS_MODE
var/list/paint_colors = list(
"grey" = rgb(255,255,255),
"red" = rgb(255,0,0),
"blue" = rgb(0,0,255),
"cyan" = rgb(0,256,249),
"green" = rgb(30,255,0),
"yellow" = rgb(255,198,0),
"purple" = rgb(130,43,255)
"Grey" = rgb(255,255,255),
"Red" = rgb(255,0,0),
"Blue" = rgb(0,0,255),
"Cyan" = rgb(0,256,249),
"Green" = rgb(30,255,0),
"Yellow" = rgb(255,198,0),
"Purple" = rgb(130,43,255)
)
var/paint_color="grey"
var/paint_color="Grey"
var/screen = CATEGORY_ATMOS //Starts on the atmos tab.
var/piping_layer = PIPING_LAYER_DEFAULT
var/datum/pipe_info/recipe
var/static/datum/pipe_info/first_atmos
var/static/datum/pipe_info/first_disposal
/obj/item/pipe_dispenser/New()
. = ..()
spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
if(!first_atmos)
first_atmos = GLOB.atmos_pipe_recipes[GLOB.atmos_pipe_recipes[1]][1]
if(!first_disposal)
first_disposal = GLOB.disposal_pipe_recipes[GLOB.disposal_pipe_recipes[1]][1]
recipe = first_atmos
/obj/item/pipe_dispenser/Destroy()
qdel(spark_system)
@@ -174,7 +196,7 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
return ..()
/obj/item/pipe_dispenser/attack_self(mob/user)
show_menu(user)
ui_interact(user)
/obj/item/pipe_dispenser/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] points the end of the RPD down [user.p_their()] throat and presses a button! It looks like [user.p_theyre()] trying to commit suicide...</span>")
@@ -182,386 +204,85 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
playsound(get_turf(user), 'sound/items/deconstruct.ogg', 50, 1)
return(BRUTELOSS)
/obj/item/pipe_dispenser/proc/render_dir_img(_dir,pic,title,flipped=0)
var/selected=" class=\"imglink\""
if(_dir == p_dir)
selected=" class=\"imglink selected\""
return "<a href=\"?src=[REF(src)];setdir=[_dir];flipped=[flipped]\" title=\"[title]\"[selected]\"><img src=\"[pic]\" /></a>"
/obj/item/pipe_dispenser/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/icon_states/multiple_icons/pipes)
assets.send(user)
ui = new(user, src, ui_key, "rpd", name, 300, 550, master_ui, state)
ui.open()
/obj/item/pipe_dispenser/proc/show_menu(mob/user)
if(!user || !src)
return 0
var/dat = {"<h2>Type</h2>
<b>Utilities:</b>
<ul>"}
if(p_class != EATING_MODE)
dat += "<li><a href='?src=[REF(src)];eatpipes=1;type=-1'>Eat Pipes</a></li>"
else
dat += "<li><span class='linkOn'>Eat Pipes</span></li>"
if(p_class != PAINT_MODE)
dat += "<li><a href='?src=[REF(src)];paintpipes=1;type=-1'>Paint Pipes</a></li>"
else
dat += "<li><span class='linkOn'>Paint Pipes</span></li>"
dat += "</ul>"
/obj/item/pipe_dispenser/ui_data(mob/user)
var/list/data = list(
"mode" = mode,
"screen" = screen,
"piping_layer" = piping_layer,
"preview_rows" = recipe.get_preview(p_dir),
"categories" = list(),
"paint_colors" = list()
)
dat += "<b>Category:</b><ul>"
if(screen == CATEGORY_ATMOS)
var/list/recipes = GLOB.disposal_pipe_recipes
var/datum/pipe_info/first_recipe = recipes[recipes[1]][1]
dat += "<span class='linkOn'>Atmospherics</span> "
dat += "<A href='?src=[REF(src)]&screen=[CATEGORY_DISPOSALS]&[first_recipe.Params()]'>Disposals</A><BR>"
dat += "Atmospherics Piping Layer: "
var/list/recipes
if(screen == ATMOS_MODE)
recipes = GLOB.atmos_pipe_recipes
else if(screen == DISPOSALS_MODE)
recipes = GLOB.disposal_pipe_recipes
for(var/c in recipes)
var/list/cat = recipes[c]
var/list/r = list()
for(var/i in 1 to cat.len)
var/datum/pipe_info/info = cat[i]
r += list(list("pipe_name" = info.name, "pipe_index" = i, "selected" = (info == recipe)))
data["categories"] += list(list("cat_name" = c, "recipes" = r))
var/layers_total = PIPING_LAYER_MAX - PIPING_LAYER_MIN + 1
for(var/iter = PIPING_LAYER_MIN, iter <= layers_total, iter++)
if(iter == piping_layer)
dat += "<span class='linkOn'>[iter]</span>"
else
dat += "<A href='?src=[REF(src)];setlayer=[iter]'>[iter]</A>"
dat += "<BR>"
data["paint_colors"] = list()
for(var/c in paint_colors)
data["paint_colors"] += list(list("color_name" = c, "color_hex" = paint_colors[c], "selected" = (c == paint_color)))
else if(screen == CATEGORY_DISPOSALS)
var/list/recipes = GLOB.atmos_pipe_recipes
var/datum/pipe_info/first_recipe = recipes[recipes[1]][1]
dat += "<A href='?src=[REF(src)]&screen=[CATEGORY_ATMOS]&[first_recipe.Params()]'>Atmospherics</A> "
dat += "<span class='linkOn'>Disposals</span><BR>"
return data
dat += "</ul>"
var/icon/preview=null
var/datbuild = ""
var/recipes = GLOB.atmos_pipe_recipes + GLOB.disposal_pipe_recipes
for(var/category in recipes)
var/list/cat_recipes = recipes[category]
for(var/i in cat_recipes)
var/datum/pipe_info/I = i
var/found=0
if(I.id == p_type)
if((p_class == ATMOS_MODE || p_class == METER_MODE) && I.categoryId == CATEGORY_ATMOS)
found = 1
else if(p_class == DISPOSALS_MODE && I.categoryId == CATEGORY_DISPOSALS)
found = 1
if(found)
preview = new /icon(I.icon, I.icon_state)
if(screen == I.categoryId)
if(I.id == p_type && p_class >= 0)
datbuild += "<li><span class='linkOn'>[I.name]</span></li>"
else
datbuild += I.Render(src)
if(length(datbuild) > 0)
dat += "<b>[category]:</b><ul>"
dat += datbuild
datbuild = ""
dat += "</ul>"
var/color_css=""
var/color_picker=""
for(var/color_name in paint_colors)
var/color=paint_colors[color_name]
color_css += {"
a.color.[color_name] {
color: [color];
}
a.color.[color_name]:hover {
border:1px solid [color];
}
a.color.[color_name].selected {
background-color: [color];
}
"}
var/selected=""
if(color_name==paint_color)
selected = " selected"
color_picker += {"<a class="color [color_name][selected]" href="?src=[REF(src)];set_color=[color_name]">&bull;</a>"}
var/dirsel="<h2>Direction</h2>"
switch(p_conntype)
if(-1)
if(p_class==PAINT_MODE)
dirsel = "<h2>Color</h2>[color_picker]"
else
dirsel = ""
if(PIPE_STRAIGHT) // Straight, N-S, W-E
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "vertical.png")
user << browse_rsc(new /icon(preview, dir=EAST), "horizontal.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"vertical.png","Vertical")
dirsel += render_dir_img(EAST,"horizontal.png","Horizontal")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=[REF(src)];setdir=[NORTH]" title="vertical">&#8597;</a>
<a href="?src=[REF(src)];setdir=[EAST]" title="horizontal">&harr;</a>
</p>
"}
if(PIPE_BENDABLE) // Bent, N-W, N-E etc
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "vertical.png")
user << browse_rsc(new /icon(preview, dir=EAST), "horizontal.png")
user << browse_rsc(new /icon(preview, dir=NORTHWEST), "nw.png")
user << browse_rsc(new /icon(preview, dir=NORTHEAST), "ne.png")
user << browse_rsc(new /icon(preview, dir=SOUTHWEST), "sw.png")
user << browse_rsc(new /icon(preview, dir=SOUTHEAST), "se.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"vertical.png","Vertical")
dirsel += render_dir_img(EAST,"horizontal.png","Horizontal")
dirsel += "<br />"
dirsel += render_dir_img(NORTHWEST,"nw.png","West to North")
dirsel += render_dir_img(NORTHEAST,"ne.png","North to East")
dirsel += "<br />"
dirsel += render_dir_img(SOUTHWEST,"sw.png","South to West")
dirsel += render_dir_img(SOUTHEAST,"se.png","East to South")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=[REF(src)];setdir=[NORTH]" title="vertical">&#8597;</a>
<a href="?src=[REF(src)];setdir=[EAST]" title="horizontal">&harr;</a>
<br />
<a href="?src=[REF(src)];setdir=[NORTHWEST]" title="West to North">&#9565;</a>
<a href="?src=[REF(src)];setdir=[NORTHEAST]" title="North to East">&#9562;</a>
<br />
<a href="?src=[REF(src)];setdir=[SOUTHWEST]" title="South to West">&#9559;</a>
<a href="?src=[REF(src)];setdir=[SOUTHEAST]" title="East to South">&#9556;</a>
</p>
"}
if(PIPE_TRINARY) // Manifold
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "s.png")
user << browse_rsc(new /icon(preview, dir=EAST), "w.png")
user << browse_rsc(new /icon(preview, dir=SOUTH), "n.png")
user << browse_rsc(new /icon(preview, dir=WEST), "e.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"s.png","West South East")
dirsel += render_dir_img(EAST,"w.png","North West South")
dirsel += "<br />"
dirsel += render_dir_img(SOUTH,"n.png","East North West")
dirsel += render_dir_img(WEST,"e.png","South East North")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=[REF(src)];setdir=[NORTH]" title="West, South, East">&#9574;</a>
<a href="?src=[REF(src)];setdir=[EAST]" title="North, West, South">&#9571;</a>
<br />
<a href="?src=[REF(src)];setdir=[SOUTH]" title="East, North, West">&#9577;</a>
<a href="?src=[REF(src)];setdir=[WEST]" title="South, East, North">&#9568;</a>
</p>
"}
if(PIPE_TRIN_M) // Mirrored ones
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "s.png")
user << browse_rsc(new /icon(preview, dir=EAST), "w.png")
user << browse_rsc(new /icon(preview, dir=SOUTH), "n.png")
user << browse_rsc(new /icon(preview, dir=WEST), "e.png")
user << browse_rsc(new /icon(preview, dir=SOUTHEAST), "sm.png") //each mirror icon is 45 anticlockwise from it's real direction
user << browse_rsc(new /icon(preview, dir=NORTHEAST), "wm.png")
user << browse_rsc(new /icon(preview, dir=NORTHWEST), "nm.png")
user << browse_rsc(new /icon(preview, dir=SOUTHWEST), "em.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"s.png","West South East")
dirsel += render_dir_img(EAST,"w.png","North West South")
dirsel += "<br />"
dirsel += render_dir_img(SOUTH,"n.png","East North West")
dirsel += render_dir_img(WEST,"e.png","South East North")
dirsel += "<br />"
dirsel += render_dir_img(SOUTHEAST,"sm.png","West South East", 1)
dirsel += render_dir_img(NORTHEAST,"wm.png","North West South", 1)
dirsel += "<br />"
dirsel += render_dir_img(NORTHWEST,"nm.png","East North West", 1)
dirsel += render_dir_img(SOUTHWEST,"em.png","South East North", 1)
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=[REF(src)];setdir=[NORTH]" title="West, South, East">&#9574;</a>
<a href="?src=[REF(src)];setdir=[EAST]" title="North, West, South">&#9571;</a>
<br />
<a href="?src=[REF(src)];setdir=[SOUTH]" title="East, North, West">&#9577;</a>
<a href="?src=[REF(src)];setdir=[WEST]" title="South, East, North">&#9568;</a>
<br />
<a href="?src=[REF(src)];setdir=[SOUTHEAST];flipped=1" title="West, South, East">&#9574;</a>
<a href="?src=[REF(src)];setdir=[NORTHEAST];flipped=1" title="North, West, South">&#9571;</a>
<br />
<a href="?src=[REF(src)];setdir=[NORTHWEST];flipped=1" title="East, North, West">&#9577;</a>
<a href="?src=[REF(src)];setdir=[SOUTHWEST];flipped=1" title="South, East, North">&#9568;</a>
</p>
"}
if(PIPE_UNARY) // Stuff with four directions - includes pumps etc.
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "n.png")
user << browse_rsc(new /icon(preview, dir=EAST), "e.png")
user << browse_rsc(new /icon(preview, dir=SOUTH), "s.png")
user << browse_rsc(new /icon(preview, dir=WEST), "w.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"n.png","North")
dirsel += render_dir_img(EAST, "e.png","East")
dirsel += render_dir_img(SOUTH,"s.png","South")
dirsel += render_dir_img(WEST, "w.png","West")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=[REF(src)];setdir=[NORTH]" title="North">&uarr;</a>
<a href="?src=[REF(src)];setdir=[EAST]" title="East">&rarr;</a>
<a href="?src=[REF(src)];setdir=[SOUTH]" title="South">&darr;</a>
<a href="?src=[REF(src)];setdir=[WEST]" title="West">&larr;</a>
</p>
"}
if(PIPE_ONEDIR) // Single icon_state (eg 4-way manifolds)
if(preview)
user << browse_rsc(new /icon(preview), "pipe.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"pipe.png","Pipe")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=[REF(src)];setdir=[NORTH]" title="Pipe">&#8597;</a>
</p>
"}
var/datsytle = {"
<style type="text/css">
a.imglink {
padding: none;
text-decoration:none;
border-style:none;
background:none;
margin: 1px;
}
a.imglink:hover {
background:none;
color:none;
}
a.imglink.selected img {
border: 1px solid #24722e;
background: #2f943c;
}
a img {
border: 1px solid #161616;
background: #40628a;
}
a.color {
padding: 5px 10px;
font-size: large;
font-weight: bold;
border: 1px solid #161616;
}
a.selected img,
a:hover {
background: #0066cc;
color: #ffffff;
}
[color_css]
</style>"}
dat = datsytle + dirsel + dat
var/datum/browser/popup = new(user, "pipedispenser", name, 300, 550)
popup.set_content(dat)
popup.open()
return
/obj/item/pipe_dispenser/Topic(href, href_list)
if(!usr.canUseTopic(src))
usr << browse(null, "window=pipedispenser")
/obj/item/pipe_dispenser/ui_act(action, params)
if(..())
return
usr.set_machine(src)
add_fingerprint(usr)
if(href_list["screen"])
screen = text2num(href_list["screen"])
show_menu(usr)
if(href_list["setdir"])
p_dir = text2num(href_list["setdir"])
if(href_list["flipped"])
p_flipped = text2num(href_list["flipped"])
else
p_flipped = FALSE
show_menu(usr)
if(href_list["setlayer"])
if(!isnum(href_list["setlayer"]))
piping_layer = text2num(href_list["setlayer"])
else
piping_layer = href_list["setlayer"]
show_menu(usr)
if(href_list["eatpipes"])
p_class = EATING_MODE
p_conntype = -1
p_dir = 1
if(!usr.canUseTopic(src))
return
var/playeffect = TRUE
switch(action)
if("color")
paint_color = params["paint_color"]
if("mode")
mode = text2num(params["mode"])
if("screen")
if(mode == screen)
mode = text2num(params["screen"])
screen = text2num(params["screen"])
recipe = screen == DISPOSALS_MODE ? first_disposal : first_atmos
p_dir = NORTH
playeffect = FALSE
if("piping_layer")
piping_layer = text2num(params["piping_layer"])
playeffect = FALSE
if("pipe_type")
var/static/list/recipes
if(!recipes)
recipes = GLOB.disposal_pipe_recipes + GLOB.atmos_pipe_recipes
recipe = recipes[params["category"]][text2num(params["pipe_type"])]
p_dir = NORTH
if("setdir")
p_dir = text2dir(params["dir"])
p_flipped = text2num(params["flipped"])
playeffect = FALSE
if(playeffect)
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["paintpipes"])
p_class = PAINT_MODE
p_conntype = -1
p_dir = 1
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["set_color"])
paint_color = href_list["set_color"]
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["makepipe"])
p_type = text2path(href_list["makepipe"])
var/obj/item/pipe/path = text2path(href_list["type"])
p_conntype = initial(path.RPD_type)
p_dir = NORTH
p_class = ATMOS_MODE
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["makemeter"])
p_class = METER_MODE
p_type = text2num(href_list["makemeter"])
p_conntype = text2num(href_list["type"])
p_dir = NORTH
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["dmake"])
p_type = text2path(href_list["dmake"])
p_conntype = text2num(href_list["type"])
p_dir = NORTH
p_class = DISPOSALS_MODE
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
/obj/item/pipe_dispenser/pre_attackby(atom/A, mob/user)
if(!user.IsAdvancedToolUser() || istype(A, /turf/open/space/transit))
return ..()
var/atmos_piping_mode = p_class == ATMOS_MODE || p_class == METER_MODE
var/atmos_piping_mode = mode == ATMOS_MODE || mode == METER_MODE
var/temp_piping_layer
if(atmos_piping_mode)
if(istype(A, /obj/machinery/atmospherics))
@@ -569,16 +290,20 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
temp_piping_layer = AM.piping_layer
A = get_turf(user)
var/static/list/make_pipe_whitelist
if(!make_pipe_whitelist)
make_pipe_whitelist = list(/obj/structure/lattice, /obj/structure/girder, /obj/item/pipe)
//make sure what we're clicking is valid for the current mode
var/can_make_pipe = ((atmos_piping_mode || p_class == DISPOSALS_MODE) && (isturf(A)) || istype(A, /obj/structure/lattice) || istype(A, /obj/structure/girder))
var/can_make_pipe = (atmos_piping_mode || mode == DISPOSALS_MODE) && (isturf(A) || is_type_in_list(A, make_pipe_whitelist))
//So that changing the menu settings doesn't affect the pipes already being built.
var/queued_p_type = p_type
var/queued_p_type = recipe.id
var/queued_p_dir = p_dir
var/queued_p_flipped = p_flipped
. = FALSE
switch(p_class) //if we've gotten this var, the target is valid
switch(mode) //if we've gotten this var, the target is valid
if(PAINT_MODE) //Paint pipes
if(!istype(A, /obj/machinery/atmospherics/pipe))
return ..()
@@ -620,6 +345,7 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
P.setPipingLayer(temp_piping_layer)
else
P.setPipingLayer(piping_layer)
P.add_atom_colour(paint_colors[paint_color], FIXED_COLOUR_PRIORITY)
if(METER_MODE) //Making pipe meters
if(!can_make_pipe)
+2 -2
View File
@@ -505,7 +505,7 @@ Code:
menu += "<h4>Located Cleanbots:</h4>"
ldat = null
for (var/mob/living/simple_animal/bot/cleanbot/B in GLOB.living_mob_list)
for (var/mob/living/simple_animal/bot/cleanbot/B in GLOB.alive_mob_list)
var/turf/bl = get_turf(B)
if(bl)
@@ -715,7 +715,7 @@ Code:
var/turf/current_turf = get_turf(src)
var/zlevel = current_turf.z
var/botcount = 0
for(Bot in GLOB.living_mob_list) //Git da botz
for(Bot in GLOB.alive_mob_list) //Git da botz
if(!Bot.on || Bot.z != zlevel || Bot.remote_disabled || !(bot_access_flags & Bot.bot_type)) //Only non-emagged bots on the same Z-level are detected!
continue //Also, the PDA must have access to the bot type.
menu += "<A href='byond://?src=[REF(src)];op=control;bot=[REF(Bot)]'><b>[Bot.name]</b> ([Bot.get_mode()])<BR>"
+1 -2
View File
@@ -103,7 +103,7 @@
var/list/name_counts = list()
var/list/names = list()
for(var/mob/living/carbon/human/H in GLOB.mob_list)
for(var/mob/living/carbon/human/H in GLOB.carbon_list)
if(!trackable(H))
continue
@@ -147,4 +147,3 @@
return PROCESS_KILL
scan_for_target()
update_icon()
+1
View File
@@ -201,6 +201,7 @@
/obj/vv_get_dropdown()
. = ..()
.["Delete all of type"] = "?_src_=vars;[HrefToken()];delall=[REF(src)]"
.["Osay"] = "?_src_=vars;[HrefToken()];osay[REF(src)]"
/obj/examine(mob/user)
..()
+2 -1
View File
@@ -700,7 +700,8 @@
/datum/admins/proc/output_ai_laws()
var/ai_number = 0
for(var/mob/living/silicon/S in GLOB.mob_list)
for(var/i in GLOB.silicon_mobs)
var/mob/living/silicon/S = i
ai_number++
if(isAI(S))
to_chat(usr, "<b>AI [key_name(S, usr)]'s laws:</b>")
+6 -6
View File
@@ -253,7 +253,7 @@
return
var/dat = "<B>Showing DNA from blood.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>DNA</th><th>Blood Type</th></tr>"
for(var/mob/living/carbon/human/H in GLOB.mob_list)
for(var/mob/living/carbon/human/H in GLOB.carbon_list)
if(H.ckey)
dat += "<tr><td>[H]</td><td>[H.dna.unique_enzymes]</td><td>[H.dna.blood_type]</td></tr>"
dat += "</table>"
@@ -263,7 +263,7 @@
return
var/dat = "<B>Showing Fingerprints.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>Fingerprints</th></tr>"
for(var/mob/living/carbon/human/H in GLOB.mob_list)
for(var/mob/living/carbon/human/H in GLOB.carbon_list)
if(H.ckey)
dat += "<tr><td>[H]</td><td>[md5(H.dna.uni_identity)]</td></tr>"
dat += "</table>"
@@ -273,7 +273,7 @@
if(!check_rights(R_FUN))
return
SSblackbox.add_details("admin_secrets_fun_used","Monkeyize All Humans")
for(var/mob/living/carbon/human/H in GLOB.mob_list)
for(var/mob/living/carbon/human/H in GLOB.carbon_list)
spawn(0)
H.monkeyize()
ok = 1
@@ -287,7 +287,7 @@
log_admin("[key_name(usr)] turned all humans into [result]", 1)
message_admins("\blue [key_name_admin(usr)] turned all humans into [result]")
var/newtype = GLOB.species_list[result]
for(var/mob/living/carbon/human/H in GLOB.mob_list)
for(var/mob/living/carbon/human/H in GLOB.carbon_list)
H.set_species(newtype)
if("tripleAI")
@@ -380,7 +380,7 @@
return
SSblackbox.add_details("admin_secrets_fun_used","Chinese Cartoons")
message_admins("[key_name_admin(usr)] made everything kawaii.")
for(var/mob/living/carbon/human/H in GLOB.mob_list)
for(var/mob/living/carbon/human/H in GLOB.carbon_list)
SEND_SOUND(H, sound('sound/ai/animes.ogg'))
if(H.dna.species.id == "human")
@@ -505,7 +505,7 @@
if(!check_rights(R_FUN))
return
SSblackbox.add_details("admin_secrets_fun_used","Dwarf Beards")
for(var/mob/living/carbon/human/B in GLOB.mob_list)
for(var/mob/living/carbon/human/B in GLOB.carbon_list)
B.facial_hair_style = "Dward Beard"
B.update_hair()
message_admins("[key_name_admin(usr)] activated dorf mode")
+1 -1
View File
@@ -741,7 +741,7 @@ GLOBAL_PROTECT(LastAdminCalledProc)
if("Mobs")
to_chat(usr, jointext(GLOB.mob_list,","))
if("Living Mobs")
to_chat(usr, jointext(GLOB.living_mob_list,","))
to_chat(usr, jointext(GLOB.alive_mob_list,","))
if("Dead Mobs")
to_chat(usr, jointext(GLOB.dead_mob_list,","))
if("Clients")
+2 -2
View File
@@ -1006,7 +1006,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
if(confirm != "Yes")
return
for(var/mob/living/carbon/human/H in GLOB.mob_list)
for(var/mob/living/carbon/human/H in GLOB.carbon_list)
new /obj/item/organ/zombie_infection(H)
message_admins("[key_name_admin(usr)] added a latent zombie infection to all humans.")
@@ -1043,7 +1043,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
if(confirm != "Yes")
return
var/list/mobs = shuffle(GLOB.living_mob_list.Copy()) // might change while iterating
var/list/mobs = shuffle(GLOB.alive_mob_list.Copy()) // might change while iterating
var/who_did_it = key_name_admin(usr)
message_admins("[key_name_admin(usr)] started polymorphed all living mobs.")
@@ -17,9 +17,12 @@ GLOBAL_LIST_INIT(hardcoded_gases, list(/datum/gas/oxygen, /datum/gas/nitrogen, /
/proc/gas_id2path(id)
var/list/meta_gas = GLOB.meta_gas_info
if(id in meta_gas)
return id
for(var/path in meta_gas)
if(meta_gas[path][META_GAS_ID] == id)
return path
return ""
/*||||||||||||||/----------\||||||||||||||*\
||||||||||||||||[GAS DATUMS]||||||||||||||||
@@ -277,11 +277,7 @@
"power" = info["power"],
"scrubbing" = info["scrubbing"],
"widenet" = info["widenet"],
"filter_co2" = info["filter_co2"],
"filter_toxins" = info["filter_toxins"],
"filter_n2o" = info["filter_n2o"],
"filter_rare" = info["filter_rare"],
"filter_water_vapor" = info["filter_water_vapor"]
"filter_types" = info["filter_types"]
))
data["mode"] = mode
data["modes"] = list()
@@ -337,8 +333,8 @@
if(usr.has_unlimited_silicon_privilege && !wires.is_cut(WIRE_IDSCAN))
locked = !locked
. = TRUE
if("power", "co2_scrub", "tox_scrub", "n2o_scrub", "rare_scrub","water_vapor_scrub", "widenet", "scrubbing")
send_signal(device_id, list("[action]" = text2num(params["val"])))
if("power", "toggle_filter", "widenet", "scrubbing")
send_signal(device_id, list("[action]" = params["val"]))
. = TRUE
if("excheck")
send_signal(device_id, list("checks" = text2num(params["val"])^1))
@@ -124,7 +124,7 @@
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "atmos_filter", name, 475, 180, master_ui, state)
ui = new(user, src, ui_key, "atmos_filter", name, 475, 195, master_ui, state)
ui.open()
/obj/machinery/atmospherics/components/trinary/filter/ui_data()
@@ -133,13 +133,11 @@
data["pressure"] = round(target_pressure)
data["max_pressure"] = round(MAX_OUTPUT_PRESSURE)
if(filter_type) //ui code is garbage and this is needed for it to work grr
if(ispath(filter_type)) //we need to send the gas ID. if it's a path, get it from the metainfo list...
data["filter_type"] = GLOB.meta_gas_info[filter_type][META_GAS_ID]
else //...otherwise, it's already in the form we need.
data["filter_type"] = filter_type
else
data["filter_type"] = "none"
data["filter_types"] = list()
data["filter_types"] += list(list("name" = "Nothing", "path" = "", "selected" = !filter_type))
for(var/path in GLOB.meta_gas_info)
var/list/gas = GLOB.meta_gas_info[path]
data["filter_types"] += list(list("name" = gas[META_GAS_NAME], "id" = gas[META_GAS_ID], "selected" = (path == gas_id2path(filter_type))))
return data
@@ -169,7 +167,7 @@
if("filter")
filter_type = null
var/filter_name = "nothing"
var/gas = text2path(params["mode"]) || gas_id2path(params["mode"])
var/gas = gas_id2path(params["mode"])
if(gas in GLOB.meta_gas_info)
filter_type = gas
filter_name = GLOB.meta_gas_info[gas][META_GAS_NAME]
@@ -17,12 +17,7 @@
var/on = FALSE
var/scrubbing = SCRUBBING //0 = siphoning, 1 = scrubbing
var/scrub_CO2 = TRUE
var/scrub_Toxins = FALSE
var/scrub_N2O = FALSE
var/scrub_Rare = FALSE
var/scrub_WaterVapor = FALSE
var/filter_types = list(/datum/gas/carbon_dioxide)
var/volume_rate = 200
var/widenet = 0 //is this scrubber acting on the 3x3 area around it.
@@ -64,16 +59,7 @@
var/amount = idle_power_usage
if(scrubbing & SCRUBBING)
if(scrub_CO2)
amount += idle_power_usage
if(scrub_Toxins)
amount += idle_power_usage
if(scrub_N2O)
amount += idle_power_usage
if(scrub_Rare)
amount += idle_power_usage
if(scrub_WaterVapor)
amount += idle_power_usage
amount += idle_power_usage * length(filter_types)
else //scrubbing == SIPHONING
amount = active_power_usage
@@ -115,6 +101,12 @@
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
var/list/f_types = list()
for(var/path in GLOB.meta_gas_info)
var/list/gas = GLOB.meta_gas_info[path]
f_types += list(list("gas_id" = gas[META_GAS_ID], "gas_name" = gas[META_GAS_NAME], "enabled" = (path in filter_types)))
signal.data = list(
"tag" = id_tag,
"frequency" = frequency,
@@ -123,11 +115,7 @@
"power" = on,
"scrubbing" = scrubbing,
"widenet" = widenet,
"filter_co2" = scrub_CO2,
"filter_toxins" = scrub_Toxins,
"filter_n2o" = scrub_N2O,
"filter_rare" =scrub_Rare,
"filter_water_vapor" = scrub_WaterVapor,
"filter_types" = f_types,
"sigtype" = "status"
)
@@ -190,55 +178,10 @@
var/list/filtered_gases = filtered_out.gases
filtered_out.temperature = removed.temperature
if(scrub_Toxins && removed_gases[/datum/gas/plasma])
ADD_GAS(/datum/gas/plasma, filtered_gases)
filtered_gases[/datum/gas/plasma][MOLES] = removed_gases[/datum/gas/plasma][MOLES]
removed_gases[/datum/gas/plasma][MOLES] = 0
if(scrub_CO2 && removed_gases[/datum/gas/carbon_dioxide])
ADD_GAS(/datum/gas/carbon_dioxide, filtered_gases)
filtered_gases[/datum/gas/carbon_dioxide][MOLES] = removed_gases[/datum/gas/carbon_dioxide][MOLES]
removed_gases[/datum/gas/carbon_dioxide][MOLES] = 0
if(scrub_N2O && removed_gases[/datum/gas/nitrous_oxide])
ADD_GAS(/datum/gas/nitrous_oxide, filtered_gases)
filtered_gases[/datum/gas/nitrous_oxide][MOLES] = removed_gases[/datum/gas/nitrous_oxide][MOLES]
removed_gases[/datum/gas/nitrous_oxide][MOLES] = 0
if(scrub_Rare && removed_gases[/datum/gas/bz])
ADD_GAS(/datum/gas/bz, filtered_gases)
filtered_gases[/datum/gas/bz][MOLES] = removed_gases[/datum/gas/bz][MOLES]
removed_gases[/datum/gas/bz][MOLES] = 0
if(scrub_Rare && removed_gases[/datum/gas/hypernoblium])
ADD_GAS(/datum/gas/hypernoblium, filtered_gases)
filtered_gases[/datum/gas/hypernoblium][MOLES] = removed_gases[/datum/gas/hypernoblium][MOLES]
removed_gases[/datum/gas/hypernoblium][MOLES] = 0
if(scrub_Rare && removed_gases[/datum/gas/stimulum])
ADD_GAS(/datum/gas/stimulum, filtered_gases)
filtered_gases[/datum/gas/stimulum][MOLES] = removed_gases[/datum/gas/stimulum][MOLES]
removed_gases[/datum/gas/stimulum][MOLES] = 0
if(scrub_Rare && removed_gases[/datum/gas/pluoxium])
ADD_GAS(/datum/gas/pluoxium, filtered_gases)
filtered_gases[/datum/gas/pluoxium][MOLES] = removed_gases[/datum/gas/pluoxium][MOLES]
removed_gases[/datum/gas/pluoxium][MOLES] = 0
if(scrub_Rare && removed_gases[/datum/gas/nitryl])
ADD_GAS(/datum/gas/nitryl, filtered_gases)
filtered_gases[/datum/gas/nitryl][MOLES] = removed_gases[/datum/gas/nitryl][MOLES]
removed_gases[/datum/gas/nitryl][MOLES] = 0
if(scrub_Rare && removed_gases[/datum/gas/tritium])
ADD_GAS(/datum/gas/tritium, filtered_gases)
filtered_gases[/datum/gas/tritium][MOLES] = removed_gases[/datum/gas/tritium][MOLES]
removed_gases[/datum/gas/tritium][MOLES] = 0
if(scrub_WaterVapor && removed_gases[/datum/gas/water_vapor])
ADD_GAS(/datum/gas/water_vapor, filtered_gases)
filtered_gases[/datum/gas/water_vapor][MOLES] = removed_gases[/datum/gas/water_vapor][MOLES]
removed_gases[/datum/gas/water_vapor][MOLES] = 0
for(var/gas in filter_types & removed_gases)
ADD_GAS(gas, filtered_gases)
filtered_gases[gas][MOLES] = removed_gases[gas][MOLES]
removed_gases[gas][MOLES] = 0
removed.garbage_collect()
@@ -296,30 +239,8 @@
if("toggle_scrubbing" in signal.data)
scrubbing = !scrubbing
if("co2_scrub" in signal.data)
scrub_CO2 = text2num(signal.data["co2_scrub"])
if("toggle_co2_scrub" in signal.data)
scrub_CO2 = !scrub_CO2
if("tox_scrub" in signal.data)
scrub_Toxins = text2num(signal.data["tox_scrub"])
if("toggle_tox_scrub" in signal.data)
scrub_Toxins = !scrub_Toxins
if("n2o_scrub" in signal.data)
scrub_N2O = text2num(signal.data["n2o_scrub"])
if("toggle_n2o_scrub" in signal.data)
scrub_N2O = !scrub_N2O
if("rare_scrub" in signal.data)
scrub_Rare = text2num(signal.data["rare_scrub"])
if("toggle_rare_scrub" in signal.data)
scrub_Rare = !scrub_Rare
if("water_vapor_scrub" in signal.data)
scrub_WaterVapor = text2num(signal.data["water_vapor_scrub"])
if("toggle_water_vapor_scrub" in signal.data)
scrub_WaterVapor = !scrub_WaterVapor
if("toggle_filter" in signal.data)
filter_types ^= gas_id2path(signal.data["toggle_filter"])
if("init" in signal.data)
name = signal.data["init"]
@@ -66,7 +66,7 @@
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "portable_scrubber", name, 420, 335, master_ui, state)
ui = new(user, src, ui_key, "portable_scrubber", name, 420, 435, master_ui, state)
ui.open()
/obj/machinery/portable_atmospherics/scrubber/ui_data()
@@ -75,6 +75,12 @@
data["connected"] = connected_port ? 1 : 0
data["pressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0)
data["id_tag"] = -1 //must be defined in order to reuse code between portable and vent scrubbers
data["filter_types"] = list()
for(var/path in GLOB.meta_gas_info)
var/list/gas = GLOB.meta_gas_info[path]
data["filter_types"] += list(list("gas_id" = gas[META_GAS_ID], "gas_name" = gas[META_GAS_NAME], "enabled" = (path in scrubbing)))
if(holding)
data["holding"] = list()
data["holding"]["name"] = holding.name
@@ -93,6 +99,9 @@
holding.loc = get_turf(src)
holding = null
. = TRUE
if("toggle_filter")
scrubbing ^= gas_id2path(params["val"])
. = TRUE
update_icon()
/obj/machinery/portable_atmospherics/scrubber/huge
@@ -32,7 +32,7 @@
////////// wildwest papers
/obj/item/paper/fluff/awaymissions/wildwest/grinder
info = "meat grinder requires sacri"
@@ -124,7 +124,7 @@
if("Peace")
to_chat(user, "<B>Whatever alien sentience that the Wish Granter possesses is satisfied with your wish. There is a distant wailing as the last of the Faithless begin to die, then silence.</B>")
to_chat(user, "You feel as if you just narrowly avoided a terrible fate...")
for(var/mob/living/simple_animal/hostile/faithless/F in GLOB.mob_list)
for(var/mob/living/simple_animal/hostile/faithless/F in GLOB.mob_living_list)
F.death()
+33 -12
View File
@@ -180,7 +180,7 @@ GLOBAL_LIST_EMPTY(asset_datums)
//Generates assets based on iconstates of a single icon
/datum/asset/simple/icon_states
var/icon
var/direction = SOUTH
var/list/directions = list(SOUTH)
var/frame = 1
var/movement_states = FALSE
@@ -189,19 +189,26 @@ GLOBAL_LIST_EMPTY(asset_datums)
verify = FALSE
/datum/asset/simple/icon_states/register()
for(var/icon_state_name in icon_states(icon))
var/asset = icon(icon, icon_state_name, direction, frame, movement_states)
if (!asset)
continue
asset = fcopy_rsc(asset) //dedupe
var/asset_name = sanitize_filename("[prefix].[icon_state_name].png")
if (generic_icon_names)
asset_name = "[generate_asset_name(asset)].png"
/datum/asset/simple/icon_states/register(_icon = icon)
for(var/icon_state_name in icon_states(_icon))
for(var/direction in directions)
var/asset = icon(_icon, icon_state_name, direction, frame, movement_states)
if (!asset)
continue
asset = fcopy_rsc(asset) //dedupe
var/prefix2 = (directions.len > 1) ? "[dir2text(direction)]." : ""
var/asset_name = sanitize_filename("[prefix].[prefix2][icon_state_name].png")
if (generic_icon_names)
asset_name = "[generate_asset_name(asset)].png"
assets[asset_name] = asset
register_asset(asset_name, asset)
..()
/datum/asset/simple/icon_states/multiple_icons
var/list/icons
/datum/asset/simple/icon_states/multiple_icons/register()
for(var/i in icons)
..(i)
//DEFINITIONS FOR ASSET DATUMS START HERE.
@@ -351,3 +358,17 @@ GLOBAL_LIST_EMPTY(asset_datums)
/datum/asset/simple/icon_states/emojis
icon = 'icons/emoji.dmi'
generic_icon_names = TRUE
/datum/asset/simple/icon_states/multiple_icons/pipes
icons = list('icons/obj/atmospherics/pipes/pipe_item.dmi', 'icons/obj/atmospherics/pipes/disposal.dmi')
prefix = "pipe"
/datum/asset/simple/icon_states/multiple_icons/pipes/New()
directions = GLOB.alldirs
..()
/datum/asset/simple/icon_states/multiple_icons/pipes/register()
..()
var/meter = icon('icons/obj/atmospherics/pipes/simple.dmi', "meterX", SOUTH, frame, movement_states)
if(meter)
register_asset(sanitize_filename("[prefix].south.meterX.png"), fcopy_rsc(meter))
@@ -80,6 +80,12 @@
item_state = "overalls"
body_parts_covered = CHEST|GROIN|LEGS
/obj/item/clothing/suit/apron/purple_bartender
name = "purple bartender apron"
desc = "A fancy purple apron for a stylish person."
icon_state = "purplebartenderapron"
item_state = "purplebartenderapron"
body_parts_covered = CHEST|GROIN|LEGS
/obj/item/clothing/suit/syndicatefake
name = "black and red space suit replica"
@@ -8,6 +8,13 @@
item_color = "barman"
alt_covers_chest = 1
/obj/item/clothing/under/rank/bartender/purple
desc = "It looks like it has lots of flair!"
name = "purple bartender's uniform"
icon_state = "purplebartender"
item_state = "purplebartender"
alt_covers_chest = 1
/obj/item/clothing/under/rank/captain //Alright, technically not a 'civilian' but its better then giving a .dm file for a single define.
desc = "It's a blue jumpsuit with some gold markings denoting the rank of \"Captain\"."
name = "captain's jumpsuit"
+1 -1
View File
@@ -21,7 +21,7 @@
if(!virus_type)
virus_type = pick(/datum/disease/dnaspread, /datum/disease/advance/flu, /datum/disease/advance/cold, /datum/disease/brainrot, /datum/disease/magnitis)
for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list))
for(var/mob/living/carbon/human/H in shuffle(GLOB.alive_mob_list))
var/turf/T = get_turf(H)
if(!T)
continue
+3 -3
View File
@@ -8,14 +8,14 @@
/datum/round_event/spooky/start()
..()
for(var/mob/living/carbon/human/H in GLOB.mob_list)
for(var/mob/living/carbon/human/H in GLOB.carbon_list)
var/obj/item/storage/backpack/b = locate() in H.contents
if(b)
new /obj/item/storage/spooky(b)
for(var/mob/living/simple_animal/pet/dog/corgi/Ian/Ian in GLOB.mob_list)
for(var/mob/living/simple_animal/pet/dog/corgi/Ian/Ian in GLOB.mob_living_list)
Ian.place_on_head(new /obj/item/bedsheet(Ian))
for(var/mob/living/simple_animal/parrot/Poly/Poly in GLOB.mob_list)
for(var/mob/living/simple_animal/parrot/Poly/Poly in GLOB.mob_living_list)
new /mob/living/simple_animal/parrot/Poly/ghost(Poly.loc)
qdel(Poly)
+1 -1
View File
@@ -14,7 +14,7 @@
/datum/round_event/valentines/start()
..()
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
H.put_in_hands(new /obj/item/valentine)
var/obj/item/storage/backpack/b = locate() in H.contents
new /obj/item/reagent_containers/food/snacks/candyheart(b)
+1 -1
View File
@@ -30,7 +30,7 @@
for(var/turf/open/floor/T in orange(1,xmas))
for(var/i=1,i<=rand(1,5),i++)
new /obj/item/a_gift(T)
for(var/mob/living/simple_animal/pet/dog/corgi/Ian/Ian in GLOB.mob_list)
for(var/mob/living/simple_animal/pet/dog/corgi/Ian/Ian in GLOB.mob_living_list)
Ian.place_on_head(new /obj/item/clothing/head/helmet/space/santahat(Ian))
for(var/obj/machinery/computer/security/telescreen/entertainment/Monitor in GLOB.machines)
Monitor.icon_state = "entertainment_xmas"
+2 -2
View File
@@ -32,7 +32,7 @@
/datum/round_event/ion_storm/start()
//AI laws
for(var/mob/living/silicon/ai/M in GLOB.living_mob_list)
for(var/mob/living/silicon/ai/M in GLOB.alive_mob_list)
M.laws_sanity_check()
if(M.stat != DEAD && M.see_in_dark != 0)
if(prob(replaceLawsetChance))
@@ -55,7 +55,7 @@
M.post_lawchange()
if(botEmagChance)
for(var/mob/living/simple_animal/bot/bot in GLOB.living_mob_list)
for(var/mob/living/simple_animal/bot/bot in GLOB.alive_mob_list)
if(prob(botEmagChance))
bot.emag_act()
+1 -1
View File
@@ -9,5 +9,5 @@
fakeable = FALSE
/datum/round_event/mass_hallucination/start()
for(var/mob/living/carbon/C in GLOB.living_mob_list)
for(var/mob/living/carbon/C in GLOB.alive_mob_list)
C.hallucination += rand(20, 50)
+1 -1
View File
@@ -28,7 +28,7 @@
// find our chosen mob to breathe life into
// Mobs have to be simple animals, mindless and on station
var/list/potential = list()
for(var/mob/living/simple_animal/L in GLOB.living_mob_list)
for(var/mob/living/simple_animal/L in GLOB.alive_mob_list)
var/turf/T = get_turf(L)
if(!(T.z in GLOB.station_z_levels))
continue
@@ -10,7 +10,7 @@
fakeable = FALSE
/datum/round_event/spontaneous_appendicitis/start()
for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list))
for(var/mob/living/carbon/human/H in shuffle(GLOB.alive_mob_list))
if(!H.client)
continue
if(H.stat == DEAD)
+4 -2
View File
@@ -9,7 +9,8 @@
/datum/round_event/wizard/robelesscasting/start()
for(var/mob/living/L in GLOB.mob_list) //Hey if a corgi has magic missle he should get the same benifit as anyone
for(var/i in GLOB.mob_living_list) //Hey if a corgi has magic missle he should get the same benifit as anyone
var/mob/living/L = i
if(L.mind && L.mind.spell_list.len != 0)
var/spell_improved = FALSE
for(var/obj/effect/proc_holder/spell/S in L.mind.spell_list)
@@ -29,7 +30,8 @@
earliest_start = 0
/datum/round_event/wizard/improvedcasting/start()
for(var/mob/living/L in GLOB.mob_list)
for(var/i in GLOB.mob_living_list)
var/mob/living/L = i
if(L.mind && L.mind.spell_list.len != 0)
for(var/obj/effect/proc_holder/spell/S in L.mind.spell_list)
S.name = initial(S.name)
+2 -2
View File
@@ -37,7 +37,7 @@
ruins_spaceworthiness = 1
ruins_wizard_loadout = 1
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(ruins_spaceworthiness && !(H.z in GLOB.station_z_levels) || isspaceturf(H.loc) || isplasmaman(H))
continue //#savetheminers
if(ruins_wizard_loadout && iswizard(H))
@@ -54,7 +54,7 @@
I.flags_1 |= NODROP_1
I.name = "cursed " + I.name
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(0, H.loc)
smoke.start()
@@ -35,7 +35,7 @@
nation += pick("stan", "topia", "land", "nia", "ca", "tova", "dor", "ador", "tia", "sia", "ano", "tica", "tide", "cis", "marea", "co", "taoide", "slavia", "stotzka")
for(var/mob/living/carbon/human/H in GLOB.mob_list)
for(var/mob/living/carbon/human/H in GLOB.carbon_list)
if(H.mind)
var/datum/mind/M = H.mind
if(M.assigned_role && !(M in SSticker.mode.traitors))
+2 -1
View File
@@ -83,7 +83,8 @@
. = ..()
GLOB.poi_list.Remove(src)
for(var/mob/M in GLOB.mob_list)
for(var/i in GLOB.player_list)
var/mob/M = i
var/message = "<span class='warning'>A dark temptation has passed from this world"
if(M in color_altered_mobs)
message += " and you're finally able to forgive yourself"
+1 -1
View File
@@ -7,6 +7,6 @@
/datum/round_event/wizard/invincible/start()
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
H.reagents.add_reagent("adminordrazine", 40) //100 ticks of absolute invinciblity (barring gibs)
to_chat(H, "<span class='notice'>You feel invincible, nothing can hurt you!</span>")
+2 -2
View File
@@ -7,7 +7,7 @@
var/mobs_to_dupe = 0
/datum/round_event_control/wizard/petsplosion/preRunEvent()
for(var/mob/living/simple_animal/F in GLOB.living_mob_list)
for(var/mob/living/simple_animal/F in GLOB.alive_mob_list)
if(!ishostile(F) && (F.z in GLOB.station_z_levels))
mobs_to_dupe++
if(mobs_to_dupe > 100 || !mobs_to_dupe)
@@ -23,7 +23,7 @@
/datum/round_event/wizard/petsplosion/tick()
if(activeFor >= 30 * countdown) // 0 seconds : 2 animals | 30 seconds : 4 animals | 1 minute : 8 animals
countdown += 1
for(var/mob/living/simple_animal/F in GLOB.living_mob_list) //If you cull the heard before the next replication, things will be easier for you
for(var/mob/living/simple_animal/F in GLOB.alive_mob_list) //If you cull the heard before the next replication, things will be easier for you
if(!ishostile(F) && (F.z in GLOB.station_z_levels))
new F.type(F.loc)
mobs_duped++
+1 -1
View File
@@ -20,7 +20,7 @@
if(prob(50))
all_the_same = 1
for(var/mob/living/carbon/human/H in GLOB.mob_list) //yes, even the dead
for(var/mob/living/carbon/human/H in GLOB.carbon_list) //yes, even the dead
H.set_species(new_species)
H.real_name = new_species.random_name(H.gender,1)
H.dna.unique_enzymes = H.dna.generate_unique_enzymes()
+6 -6
View File
@@ -12,7 +12,7 @@
var/list/moblocs = list()
var/list/mobs = list()
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(!(H.z in GLOB.station_z_levels))
continue //lets not try to strand people in space or stuck in the wizards den
moblocs += H.loc
@@ -30,7 +30,7 @@
do_teleport(H, moblocs[moblocs.len])
moblocs.len -= 1
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(0, H.loc)
smoke.start()
@@ -48,7 +48,7 @@
var/list/mobnames = list()
var/list/mobs = list()
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
mobnames += H.real_name
mobs += H
@@ -64,7 +64,7 @@
H.real_name = mobnames[mobnames.len]
mobnames.len -= 1
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(0, H.loc)
smoke.start()
@@ -81,7 +81,7 @@
/datum/round_event/wizard/shuffleminds/start()
var/list/mobs = list()
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(H.stat || !H.mind || iswizard(H))
continue //the wizard(s) are spared on this one
mobs += H
@@ -98,7 +98,7 @@
swapper.cast(list(H), mobs[mobs.len], 1)
mobs -= mobs[mobs.len]
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(0, H.loc)
smoke.start()
+3 -3
View File
@@ -460,7 +460,7 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
var/image/A = null
var/kind = force_kind ? force_kind : pick("monkey","corgi","carp","skeleton","demon","zombie")
feedback_details += "Type: [kind]"
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(H == target)
continue
if(skip_nearby && (H in view(target)))
@@ -538,7 +538,7 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
var/mob/living/carbon/human/clone = null
var/clone_weapon = null
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(H.stat || H.lying)
continue
clone = H
@@ -769,7 +769,7 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
target.client.images.Remove(speech_overlay)
else // Radio talk
var/list/humans = list()
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
humans += H
person = pick(humans)
var/message = target.compose_message(person,understood_language,pick(radio_messages),"1459",person.get_spans(),face_name = TRUE)
+2 -2
View File
@@ -527,8 +527,8 @@
// You're an idiot for thinking that one of the most corrosive and deadly gasses would be beneficial
if(S.has_reagent("fluorine", 1))
adjustHealth(-round(S.get_reagent_amount("fluorine") * 2))
adjustToxic(round(S.get_reagent_amount("flourine") * 2.5))
adjustWater(-round(S.get_reagent_amount("flourine") * 0.5))
adjustToxic(round(S.get_reagent_amount("fluorine") * 2.5))
adjustWater(-round(S.get_reagent_amount("fluorine") * 0.5))
adjustWeeds(-rand(1,4))
// You're an idiot for thinking that one of the most corrosive and deadly gasses would be beneficial
@@ -480,6 +480,10 @@
name = "Long Hair 2"
icon_state = "hair_long2"
/datum/sprite_accessory/hair/long3
name = "Long Hair 3"
icon_state = "hair_long3"
/datum/sprite_accessory/hair/pixie
name = "Pixie Cut"
icon_state = "hair_pixie"
+1 -1
View File
@@ -566,7 +566,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set desc= "Take over the body of a mindless creature!"
var/list/possessible = list()
for(var/mob/living/L in GLOB.living_mob_list)
for(var/mob/living/L in GLOB.alive_mob_list)
if(!(L in GLOB.player_list) && !L.mind)
possessible += L
+2 -2
View File
@@ -63,7 +63,7 @@
if(!newbrain.damaged_brain) // the brain organ hasn't been beaten to death.
brainmob.stat = CONSCIOUS //we manually revive the brain mob
GLOB.dead_mob_list -= brainmob
GLOB.living_mob_list += brainmob
GLOB.alive_mob_list += brainmob
brainmob.reset_perspective()
brain = newbrain
@@ -95,7 +95,7 @@
brainmob.stat = DEAD
brainmob.emp_damage = 0
brainmob.reset_perspective() //so the brainmob follows the brain organ instead of the mmi. And to update our vision
GLOB.living_mob_list -= brainmob //Get outta here
GLOB.alive_mob_list -= brainmob //Get outta here
GLOB.dead_mob_list += brainmob
brain.brainmob = brainmob //Set the brain to use the brainmob
brainmob = null //Set mmi brainmob var to null
+1 -1
View File
@@ -126,7 +126,7 @@ GLOBAL_VAR(posibrain_notify_cooldown)
brainmob.mind.assigned_role = new_role
brainmob.stat = CONSCIOUS
GLOB.dead_mob_list -= brainmob
GLOB.living_mob_list += brainmob
GLOB.alive_mob_list += brainmob
visible_message(new_mob_message)
check_success()
@@ -110,11 +110,12 @@ Des: Gives the client of the alien an image on each infected mob.
----------------------------------------*/
/mob/living/carbon/alien/proc/AddInfectionImages()
if (client)
for (var/mob/living/C in GLOB.mob_list)
if(C.status_flags & XENO_HOST)
var/obj/item/organ/body_egg/alien_embryo/A = C.getorgan(/obj/item/organ/body_egg/alien_embryo)
for (var/i in GLOB.mob_living_list)
var/mob/living/L = i
if(L.status_flags & XENO_HOST)
var/obj/item/organ/body_egg/alien_embryo/A = L.getorgan(/obj/item/organ/body_egg/alien_embryo)
if(A)
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[A.stage]")
var/I = image('icons/mob/alien.dmi', loc = L, icon_state = "infected[A.stage]")
client.images += I
return
@@ -1,23 +1,23 @@
/mob/living/carbon/alien/humanoid/death(gibbed)
if(stat == DEAD)
return
. = ..()
update_canmove()
update_icons()
status_flags |= CANPUSH
//When the alien queen dies, all others must pay the price for letting her die.
/mob/living/carbon/alien/humanoid/royal/queen/death(gibbed)
if(stat == DEAD)
return
for(var/mob/living/carbon/C in GLOB.living_mob_list)
if(C == src) //Make sure not to proc it on ourselves.
continue
var/obj/item/organ/alien/hivenode/node = C.getorgan(/obj/item/organ/alien/hivenode)
if(istype(node)) // just in case someone would ever add a diffirent node to hivenode slot
node.queen_death()
return ..()
/mob/living/carbon/alien/humanoid/death(gibbed)
if(stat == DEAD)
return
. = ..()
update_canmove()
update_icons()
status_flags |= CANPUSH
//When the alien queen dies, all others must pay the price for letting her die.
/mob/living/carbon/alien/humanoid/royal/queen/death(gibbed)
if(stat == DEAD)
return
for(var/mob/living/carbon/C in GLOB.alive_mob_list)
if(C == src) //Make sure not to proc it on ourselves.
continue
var/obj/item/organ/alien/hivenode/node = C.getorgan(/obj/item/organ/alien/hivenode)
if(istype(node)) // just in case someone would ever add a diffirent node to hivenode slot
node.queen_death()
return ..()
@@ -111,7 +111,7 @@
//For alien evolution/promotion/queen finder procs. Checks for an active alien of that type
/proc/get_alien_type(var/alienpath)
for(var/mob/living/carbon/alien/humanoid/A in GLOB.living_mob_list)
for(var/mob/living/carbon/alien/humanoid/A in GLOB.alive_mob_list)
if(!istype(A, alienpath))
continue
if(!A.key || A.stat == DEAD) //Only living aliens with a ckey are valid.
@@ -46,7 +46,7 @@
/mob/living/carbon/alien/humanoid/royal/queen/Initialize()
//there should only be one queen
for(var/mob/living/carbon/alien/humanoid/royal/queen/Q in GLOB.living_mob_list)
for(var/mob/living/carbon/alien/humanoid/royal/queen/Q in GLOB.carbon_list)
if(Q == src)
continue
if(Q.stat == DEAD)
+3 -1
View File
@@ -2,9 +2,10 @@
blood_volume = BLOOD_VOLUME_NORMAL
/mob/living/carbon/Initialize()
. = ..()
create_reagents(1000)
update_body_parts() //to update the carbon's new bodyparts appearance
..()
GLOB.carbon_list += src
/mob/living/carbon/Destroy()
//This must be done first, so the mob ghosts correctly before DNA etc is nulled
@@ -16,6 +17,7 @@
QDEL_LIST(implants)
remove_from_all_data_huds()
QDEL_NULL(dna)
GLOB.carbon_list -= src
/mob/living/carbon/relaymove(mob/user, direction)
if(user in src.stomach_contents)
+1 -1
View File
@@ -57,7 +57,7 @@
deadchat_broadcast(rendered, follow_target = src, turf_target = T, message_type=DEADCHAT_DEATHRATTLE)
if(mind)
mind.store_memory("Time of death: [tod]", 0)
GLOB.living_mob_list -= src
GLOB.alive_mob_list -= src
if(!gibbed)
GLOB.dead_mob_list += src
set_drugginess(0)
+3 -1
View File
@@ -16,6 +16,7 @@
var/datum/atom_hud/data/human/medical/advanced/medhud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
medhud.add_to_hud(src)
faction += "[REF(src)]"
GLOB.mob_living_list += src
/mob/living/prepare_huds()
@@ -47,6 +48,7 @@
qdel(I)
staticOverlays.len = 0
remove_from_all_data_huds()
GLOB.mob_living_list -= src
return ..()
@@ -368,7 +370,7 @@
fully_heal(admin_revive)
if(stat == DEAD && can_be_revived()) //in some cases you can't revive (e.g. no brain)
GLOB.dead_mob_list -= src
GLOB.living_mob_list += src
GLOB.alive_mob_list += src
suiciding = 0
stat = UNCONSCIOUS //the mob starts unconscious,
blind_eyes(1)
+3 -3
View File
@@ -404,14 +404,14 @@
if(call_bot_cooldown > world.time)
to_chat(src, "<span class='danger'>Error: Your last call bot command is still processing, please wait for the bot to finish calculating a route.</span>")
return
Bot = locate(href_list["callbot"]) in GLOB.living_mob_list
Bot = locate(href_list["callbot"]) in GLOB.alive_mob_list
if(!Bot || Bot.remote_disabled || src.control_disabled)
return //True if there is no bot found, the bot is manually emagged, or the AI is carded with wireless off.
waypoint_mode = 1
to_chat(src, "<span class='notice'>Set your waypoint by clicking on a valid location free of obstructions.</span>")
return
if(href_list["interface"]) //Remotely connect to a bot!
Bot = locate(href_list["interface"]) in GLOB.living_mob_list
Bot = locate(href_list["interface"]) in GLOB.alive_mob_list
if(!Bot || Bot.remote_disabled || src.control_disabled)
return
Bot.attack_ai(src)
@@ -468,7 +468,7 @@
d += "<A HREF=?src=[REF(src)];botrefresh=1>Query network status</A><br>"
d += "<table width='100%'><tr><td width='40%'><h3>Name</h3></td><td width='30%'><h3>Status</h3></td><td width='30%'><h3>Location</h3></td><td width='10%'><h3>Control</h3></td></tr>"
for (Bot in GLOB.living_mob_list)
for (Bot in GLOB.alive_mob_list)
if(Bot.z == ai_Zlevel && !Bot.remote_disabled) //Only non-emagged bots on the same Z-level are detected!
bot_area = get_area(Bot)
var/bot_mode = Bot.get_mode()
+1 -1
View File
@@ -9,6 +9,6 @@
clear_fullscreens()
//New pAI's get a brand new mind to prevent meta stuff from their previous life. This new mind causes problems down the line if it's not deleted here.
GLOB.living_mob_list -= src
GLOB.alive_mob_list -= src
ghostize()
qdel(src)
@@ -172,7 +172,7 @@
if(mmi.brainmob.stat == DEAD)
mmi.brainmob.stat = CONSCIOUS
GLOB.dead_mob_list -= mmi.brainmob
GLOB.living_mob_list += mmi.brainmob
GLOB.alive_mob_list += mmi.brainmob
mind.transfer_to(mmi.brainmob)
mmi.update_icon()
else
@@ -18,17 +18,19 @@
//Base proc for anything to call
/proc/_alert_drones(msg, dead_can_hear = 0, atom/source, mob/living/faction_checked_mob, exact_faction_match)
for(var/W in GLOB.mob_list)
var/mob/living/simple_animal/drone/M = W
if(istype(M) && M.stat != DEAD)
if(faction_checked_mob)
if(M.faction_check_mob(faction_checked_mob, exact_faction_match))
to_chat(M, msg)
else
to_chat(M, msg)
if(dead_can_hear && source && (M in GLOB.dead_mob_list))
if (dead_can_hear && source)
for (var/mob/M in GLOB.dead_mob_list)
var/link = FOLLOW_LINK(M, source)
to_chat(M, "[link] [msg]")
for(var/i in GLOB.drones_list)
var/mob/living/simple_animal/drone/D = i
if(istype(D) && D.stat != DEAD)
if(faction_checked_mob)
if(D.faction_check_mob(faction_checked_mob, exact_faction_match))
to_chat(D, msg)
else
to_chat(D, msg)
//Wrapper for drones to handle factions
@@ -150,7 +150,8 @@
staticOverlays.len = 0
if(seeStatic)
for(var/mob/living/L in GLOB.mob_list)
for(var/i in GLOB.mob_living_list)
var/mob/living/L = i
if(isdrone(L))
continue
var/image/chosen
@@ -106,7 +106,7 @@ Difficulty: Hard
/mob/living/simple_animal/hostile/megafauna/bubblegum/Initialize()
. = ..()
for(var/mob/living/simple_animal/hostile/megafauna/bubblegum/B in GLOB.mob_list)
for(var/mob/living/simple_animal/hostile/megafauna/bubblegum/B in GLOB.mob_living_list)
if(B != src)
return INITIALIZE_HINT_QDEL //There can be only one
var/obj/effect/proc_holder/spell/bloodcrawl/bloodspell = new
@@ -129,7 +129,7 @@ Difficulty: Medium
visible_message("<span class='boldannounce'>[src] splits in twain!</span>")
else
var/last_legion = TRUE
for(var/mob/living/simple_animal/hostile/megafauna/legion/other in GLOB.mob_list)
for(var/mob/living/simple_animal/hostile/megafauna/legion/other in GLOB.mob_living_list)
if(other != src)
last_legion = FALSE
break
@@ -50,7 +50,7 @@
#define MEDAL_PREFIX "Tendril"
/mob/living/simple_animal/hostile/spawner/lavaland/death()
var/last_tendril = TRUE
for(var/mob/living/simple_animal/hostile/spawner/lavaland/other in GLOB.mob_list)
for(var/mob/living/simple_animal/hostile/spawner/lavaland/other in GLOB.mob_living_list)
if(other != src)
last_tendril = FALSE
break
@@ -185,7 +185,7 @@
range = 10
/obj/effect/proc_holder/spell/aoe_turf/blindness/cast(list/targets,mob/user = usr)
for(var/mob/living/L in GLOB.living_mob_list)
for(var/mob/living/L in GLOB.alive_mob_list)
var/turf/T = get_turf(L.loc)
if(T && T in targets)
L.blind_eyes(4)
+4 -4
View File
@@ -4,7 +4,7 @@
/mob/Destroy()//This makes sure that mobs with clients/keys are not just deleted from the game.
GLOB.mob_list -= src
GLOB.dead_mob_list -= src
GLOB.living_mob_list -= src
GLOB.alive_mob_list -= src
GLOB.all_clockwork_mobs -= src
GLOB.mob_directory -= tag
for (var/alert in alerts)
@@ -29,7 +29,7 @@
if(stat == DEAD)
GLOB.dead_mob_list += src
else
GLOB.living_mob_list += src
GLOB.alive_mob_list += src
prepare_huds()
for(var/v in GLOB.active_alternate_appearances)
if(!v)
@@ -926,9 +926,9 @@
if("stat")
if((stat == DEAD) && (var_value < DEAD))//Bringing the dead back to life
GLOB.dead_mob_list -= src
GLOB.living_mob_list += src
GLOB.alive_mob_list += src
if((stat < DEAD) && (var_value == DEAD))//Kill he
GLOB.living_mob_list -= src
GLOB.alive_mob_list -= src
GLOB.dead_mob_list += src
. = ..()
switch(var_name)
+2 -1
View File
@@ -274,7 +274,8 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
/proc/findname(msg)
if(!istext(msg))
msg = "[msg]"
for(var/mob/M in GLOB.mob_list)
for(var/i in GLOB.mob_list)
var/mob/M = i
if(M.real_name == msg)
return M
return 0
+2 -1
View File
@@ -369,7 +369,8 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
/obj/machinery/gravity_generator/main/proc/shake_everyone()
var/turf/T = get_turf(src)
var/sound/alert_sound = sound('sound/effects/alert.ogg')
for(var/mob/M in GLOB.mob_list)
for(var/i in GLOB.mob_list)
var/mob/M = i
if(M.z != z)
continue
M.update_gravity(M.mob_has_gravity())
+1 -1
View File
@@ -140,7 +140,7 @@
acquire(enemy)
return
for(var/mob/living/carbon/food in GLOB.living_mob_list) //we don't care about constructs or cult-Ians or whatever. cult-monkeys are fair game i guess
for(var/mob/living/carbon/food in GLOB.alive_mob_list) //we don't care about constructs or cult-Ians or whatever. cult-monkeys are fair game i guess
var/turf/pos = get_turf(food)
if(!pos || (pos.z != z))
continue
@@ -229,7 +229,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
/obj/machinery/power/supermatter_shard/proc/explode()
var/turf/T = get_turf(src)
for(var/mob/M in GLOB.mob_list)
for(var/mob/M in GLOB.player_list)
if(M.z == z)
SEND_SOUND(M, 'sound/magic/charge.ogg')
to_chat(M, "<span class='boldannounce'>You feel reality distort for a moment...</span>")
@@ -427,7 +427,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
radio.talk_into(src, "Warning: Critical coolant mass reached.", engineering_channel, get_spans(), get_default_language())
if(damage > explosion_point)
for(var/mob in GLOB.living_mob_list)
for(var/mob in GLOB.alive_mob_list)
var/mob/living/L = mob
if(istype(L) && L.z == z)
if(ishuman(mob))
@@ -466,7 +466,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
investigate_log("Supermatter shard consumed by singularity.", INVESTIGATE_SINGULO)
message_admins("Singularity has consumed a supermatter shard and can now become stage six.")
visible_message("<span class='userdanger'>[src] is consumed by the singularity!</span>")
for(var/mob/M in GLOB.mob_list)
for(var/mob/M in GLOB.player_list)
if(M.z == z)
SEND_SOUND(M, 'sound/effects/supermatter.ogg') //everyone goan know bout this
to_chat(M, "<span class='boldannounce'>A horrible screeching fills your ears, and a wave of dread washes over you...</span>")
+2 -2
View File
@@ -86,8 +86,8 @@
/obj/machinery/r_n_d/experimentor/Initialize()
. = ..()
trackedIan = locate(/mob/living/simple_animal/pet/dog/corgi/Ian) in GLOB.mob_list
trackedRuntime = locate(/mob/living/simple_animal/pet/cat/Runtime) in GLOB.mob_list
trackedIan = locate(/mob/living/simple_animal/pet/dog/corgi/Ian) in GLOB.mob_living_list
trackedRuntime = locate(/mob/living/simple_animal/pet/cat/Runtime) in GLOB.mob_living_list
SetTypeReactions()
/obj/machinery/r_n_d/experimentor/RefreshParts()

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