From 28c8cd1d81d1043d76968741847fd06b8f602ba0 Mon Sep 17 00:00:00 2001 From: Chinsky Date: Tue, 2 Jun 2015 13:13:44 +0300 Subject: [PATCH 01/22] Fixes #9623 Also added a nullcheck for icons to prevent potential client crash. --- code/modules/client/preferences.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index fcbd8902638..e14884ec1bd 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -236,8 +236,9 @@ datum/preferences /datum/preferences/proc/ShowChoices(mob/user) if(!user || !user.client) return update_preview_icon() - user << browse_rsc(preview_icon_front, "previewicon.png") - user << browse_rsc(preview_icon_side, "previewicon2.png") + if(preview_icon_front && preview_icon_side) + user << browse_rsc(preview_icon_front, "previewicon.png") + user << browse_rsc(preview_icon_side, "previewicon2.png") var/dat = "
" if(path) @@ -1671,6 +1672,7 @@ datum/preferences var/status = organ_data[name] var/obj/item/organ/external/O = character.organs_by_name[name] if(O) + O.status = 0 if(status == "amputated") character.organs_by_name[O.limb_name] = null character.organs -= O From 87c32af3dc80591dd26ff6e0a9bc744a2596b16d Mon Sep 17 00:00:00 2001 From: Chinsky Date: Tue, 2 Jun 2015 14:00:39 +0300 Subject: [PATCH 02/22] Fixes #9545 --- code/game/machinery/computer3/laptop.dm | 30 +++++++++---------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/code/game/machinery/computer3/laptop.dm b/code/game/machinery/computer3/laptop.dm index 484db524625..4d7c406dfac 100644 --- a/code/game/machinery/computer3/laptop.dm +++ b/code/game/machinery/computer3/laptop.dm @@ -55,19 +55,11 @@ qdel(src) return - if(!stored_computer.manipulating) - stored_computer.manipulating = 1 - stored_computer.loc = loc - stored_computer.stat &= ~MAINT - stored_computer.update_icon() - loc = null - usr << "You open \the [src]." - - spawn(5) - stored_computer.manipulating = 0 - qdel(src) - else - usr << "\red You are already opening the computer!" + stored_computer.loc = loc + stored_computer.stat &= ~MAINT + stored_computer.update_icon() + loc = stored_computer + usr << "You open \the [src]." AltClick() @@ -117,7 +109,6 @@ pixel_y = -3 show_keyboard = 0 - var/manipulating = 0 // To prevent disappearing bug var/obj/item/device/laptop/portable = null New(var/L, var/built = 0) @@ -157,12 +148,11 @@ portable=new portable.stored_computer = src - if(!manipulating) - portable.loc = loc - loc = portable - stat |= MAINT - if(user) - user << "You close \the [src]." + portable.loc = loc + loc = portable + stat |= MAINT + if(user) + user << "You close \the [src]." auto_use_power() if(stat&MAINT) From c873825a424648599ac6607e66e0ebf5bfdcf148 Mon Sep 17 00:00:00 2001 From: Chinsky Date: Tue, 2 Jun 2015 14:27:16 +0300 Subject: [PATCH 03/22] Fixes #6029 --- code/game/machinery/computer3/laptop.dm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/game/machinery/computer3/laptop.dm b/code/game/machinery/computer3/laptop.dm index 4d7c406dfac..65864b0b700 100644 --- a/code/game/machinery/computer3/laptop.dm +++ b/code/game/machinery/computer3/laptop.dm @@ -74,12 +74,10 @@ if(stored_computer) stored_computer.eject_id() - /obj/machinery/computer3/laptop/verb/eject_id() set category = "Object" set name = "Eject ID Card" set src in oview(1) - var/obj/item/part/computer/cardslot/C = locate() in src.contents if(!C) @@ -96,7 +94,7 @@ return usr << "You remove [card] from the laptop." - C.remove(card) + C.remove(4) /obj/machinery/computer3/laptop From 4a69d0a4f7a29db090049521cd10a327f5acf44c Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Tue, 2 Jun 2015 13:40:53 +0200 Subject: [PATCH 04/22] More MayRespawn checks. Astral projecting wizards/cultists may no longer respawn as something else. --- code/modules/mob/dead/observer/observer.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 5f1c1cb7b77..e9f000eb3f2 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -620,6 +620,12 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp return 1 mob/dead/observer/MayRespawn(var/feedback = 0) + if(!client || !mind) + return 0 + if(mind.current && mind.current.stat != DEAD) + if(feedback) + src << "Your non-dead body prevent you from respawning." + return 0 if(config.antag_hud_restricted && has_enabled_antagHUD == 1) if(feedback) src << "antagHUD restrictions prevent you from respawning." From 971308f42bc5e914a6be35f11c9a1e13701f1d2b Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Tue, 2 Jun 2015 13:41:56 +0200 Subject: [PATCH 05/22] Changelog entry. --- html/changelogs/PsiOmegaDelta-MayRespawn.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 html/changelogs/PsiOmegaDelta-MayRespawn.yml diff --git a/html/changelogs/PsiOmegaDelta-MayRespawn.yml b/html/changelogs/PsiOmegaDelta-MayRespawn.yml new file mode 100644 index 00000000000..eff6f0e298f --- /dev/null +++ b/html/changelogs/PsiOmegaDelta-MayRespawn.yml @@ -0,0 +1,5 @@ +author: PsiOmegaDelta +delete-after: True + +changes: + - bugfix: "Astral projecting mobs, such as wizards or cultists, may no longer respawn as something else while their body lives." From fcb08416468f40c9be85c0c363021715fca1f5cb Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Tue, 2 Jun 2015 14:20:14 +0200 Subject: [PATCH 06/22] Reduction of admin right-click verbs. Removes verbs which only works on specific mob types from the admin right-click context. Fixes #9627. Fixes #9628. --- code/__HELPERS/global_lists.dm | 2 + code/modules/admin/admin.dm | 5 +- code/modules/admin/admin_verbs.dm | 70 ++++++++++--------- code/modules/admin/verbs/debug.dm | 9 +-- code/modules/mob/living/carbon/human/human.dm | 2 + code/modules/mob/living/silicon/silicon.dm | 2 + 6 files changed, 53 insertions(+), 37 deletions(-) diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index 55b1b23a9f9..09e6f845c86 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -7,6 +7,8 @@ var/list/directory = list() //list of all ckeys with associated client var/global/list/player_list = list() //List of all mobs **with clients attached**. Excludes /mob/new_player var/global/list/mob_list = list() //List of all mobs, including clientless +var/global/list/human_mob_list = list() //List of all human mobs and sub-types, including clientless +var/global/list/silicon_mob_list = list() //List of all silicon mobs, including clientless var/global/list/living_mob_list = list() //List of all alive mobs, including clientless. Excludes /mob/new_player var/global/list/dead_mob_list = list() //List of all dead mobs, including clientless. Excludes /mob/new_player diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 6158c59bc80..cd6dfda8db3 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1236,7 +1236,7 @@ var/global/floorIsLava = 0 if(!ai_number) usr << "No AIs located" //Just so you know the thing is actually working and not just ignoring you. -/datum/admins/proc/show_skills(var/mob/living/carbon/human/M as mob in world) +/datum/admins/proc/show_skills() set category = "Admin" set name = "Show Skills" @@ -1246,6 +1246,9 @@ var/global/floorIsLava = 0 usr << "Error: you are not an admin!" return + var/mob/living/carbon/human/M = input("Select mob.", "Select mob.") as null|anything in human_mob_list + if(!M) return + show_skill_window(usr, M) return diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 41acc7894b2..076ad95b45e 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -708,66 +708,70 @@ var/list/admin_verbs_mentor = list( if(holder) src.holder.output_ai_laws() -/client/proc/rename_silicon(mob/living/silicon/S in mob_list) +/client/proc/rename_silicon() set name = "Rename Silicon" set category = "Admin" - if(!istype(S)) - return + if(!check_rights(R_ADMIN)) return - if(holder) - var/new_name = sanitizeSafe(input(src, "Enter new name. Leave blank or as is to cancel.", "Enter new silicon name", S.real_name)) - if(new_name && new_name != S.real_name) - admin_log_and_message_admins("has renamed the silicon '[S.real_name]' to '[new_name]'") - S.SetName(new_name) + var/mob/living/silicon/S = input("Select silicon.", "Rename Silicon.") as null|anything in silicon_mob_list + if(!S) return + + var/new_name = sanitizeSafe(input(src, "Enter new name. Leave blank or as is to cancel.", "[S.real_name] - Enter new silicon name", S.real_name)) + if(new_name && new_name != S.real_name) + admin_log_and_message_admins("has renamed the silicon '[S.real_name]' to '[new_name]'") + S.SetName(new_name) feedback_add_details("admin_verb","RAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/manage_silicon_laws(mob/living/silicon/S in mob_list) +/client/proc/manage_silicon_laws() set name = "Manage Silicon Laws" set category = "Admin" - if(!istype(S)) - return + if(!check_rights(R_ADMIN)) return - if(holder) - var/obj/nano_module/law_manager/L = new(S) - L.ui_interact(usr, state = admin_state) + var/mob/living/silicon/S = input("Select silicon.", "Manage Silicon Laws") as null|anything in silicon_mob_list + if(!S) return + + var/obj/nano_module/law_manager/L = new(S) + L.ui_interact(usr, state = admin_state) admin_log_and_message_admins("has opened [S]'s law manager.") feedback_add_details("admin_verb","MSL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/change_human_appearance_admin(mob/living/carbon/human/H in world) +/client/proc/change_human_appearance_admin() set name = "Change Mob Appearance - Admin" set desc = "Allows you to change the mob appearance" set category = "Admin" - if(!istype(H)) - return + if(!check_rights(R_FUN)) return - if(holder) - admin_log_and_message_admins("is altering the appearance of [H].") - H.change_appearance(APPEARANCE_ALL, usr, usr, check_species_whitelist = 0, state = admin_state) + var/mob/living/carbon/human/H = input("Select mob.", "Change Mob Appearance - Admin") as null|anything in human_mob_list + if(!H) return + + admin_log_and_message_admins("is altering the appearance of [H].") + H.change_appearance(APPEARANCE_ALL, usr, usr, check_species_whitelist = 0, state = admin_state) feedback_add_details("admin_verb","CHAA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/change_human_appearance_self(mob/living/carbon/human/H in mob_list) +/client/proc/change_human_appearance_self() set name = "Change Mob Appearance - Self" set desc = "Allows the mob to change its appearance" set category = "Admin" - if(!istype(H)) - return + if(!check_rights(R_FUN)) return + + var/mob/living/carbon/human/H = input("Select mob.", "Change Mob Appearance - Self") as null|anything in human_mob_list + if(!H) return if(!H.client) usr << "Only mobs with clients can alter their own appearance." return - if(holder) - switch(alert("Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel")) - if("Yes") - admin_log_and_message_admins("has allowed [H] to change \his appearance, without whitelisting of races.") - H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 0) - if("No") - admin_log_and_message_admins("has allowed [H] to change \his appearance, with whitelisting of races.") - H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 1) + switch(alert("Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel")) + if("Yes") + admin_log_and_message_admins("has allowed [H] to change \his appearance, without whitelisting of races.") + H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 0) + if("No") + admin_log_and_message_admins("has allowed [H] to change \his appearance, with whitelisting of races.") + H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 1) feedback_add_details("admin_verb","CMAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/change_security_level() @@ -792,12 +796,14 @@ var/list/admin_verbs_mentor = list( // feedback_add_details("admin_verb","MP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return -/client/proc/editappear(mob/living/carbon/human/M as mob in mob_list) +/client/proc/editappear() set name = "Edit Appearance" set category = "Fun" if(!check_rights(R_FUN)) return + var/mob/living/carbon/human/M = input("Select mob.", "Edit Appearance") as null|anything in human_mob_list + if(!istype(M, /mob/living/carbon/human)) usr << "\red You can only do this to humans!" return diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 9ab952de64b..0552892f21b 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -516,12 +516,13 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that for(var/areatype in areas_without_camera) world << "* [areatype]" -/client/proc/cmd_admin_dress(var/mob/living/carbon/human/M in mob_list) +/client/proc/cmd_admin_dress() set category = "Fun" set name = "Select equipment" - if(!ishuman(M)) - alert("Invalid mob") - return + + var/mob/living/carbon/human/M = input("Select mob.", "Select equipment.") as null|anything in human_mob_list + if(!M) return + //log_admin("[key_name(src)] has alienized [M.key].") var/list/dresspacks = list( "strip", diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 4ca3cecda8c..36af219aee7 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -37,6 +37,7 @@ hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank") hud_list[STATUS_HUD_OOC] = image('icons/mob/hud.dmi', src, "hudhealthy") + human_mob_list |= src ..() if(dna) @@ -44,6 +45,7 @@ make_blood() /mob/living/carbon/human/Destroy() + human_mob_list -= src for(var/organ in organs) qdel(organ) return ..() diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index d2e30953e77..d7a006b41c2 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -27,11 +27,13 @@ #define MED_HUD 2 //Medical HUD mode /mob/living/silicon/New() + silicon_mob_list |= src ..() add_language("Galactic Common") init_subsystems() /mob/living/silicon/Destroy() + silicon_mob_list -= src for(var/datum/alarm_handler/AH in alarm_manager.all_handlers) AH.unregister(src) ..() From 3f26eeac99064e4c0255e9f60071ec05e99cfbf7 Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Tue, 2 Jun 2015 14:48:08 +0200 Subject: [PATCH 07/22] Allows all synths to view the alternative law sets. This does not include laws such as the syndicate, spider clan, etc. laws. Makes it less of a headache for a synth to state the standard NT laws while subverted, etc. --- code/modules/mob/living/silicon/say.dm | 4 ++-- code/modules/nano/modules/law_manager.dm | 22 ++-------------------- nano/templates/law_manager.tmpl | 20 ++++++++++---------- 3 files changed, 14 insertions(+), 32 deletions(-) diff --git a/code/modules/mob/living/silicon/say.dm b/code/modules/mob/living/silicon/say.dm index ec6ddefe1cd..1fefa272e56 100644 --- a/code/modules/mob/living/silicon/say.dm +++ b/code/modules/mob/living/silicon/say.dm @@ -185,7 +185,7 @@ This is another way of saying that we won't bother dealing with them.*/ else src << "No holopad connected." - return + return 0 return 1 /mob/living/silicon/ai/proc/holopad_emote(var/message) //This is called when the AI uses the 'me' verb while using a holopad. @@ -206,7 +206,7 @@ M.show_message(rendered, 2) else //This shouldn't occur, but better safe then sorry. src << "No holopad connected." - return + return 0 return 1 /mob/living/silicon/ai/emote(var/act, var/type, var/message) diff --git a/code/modules/nano/modules/law_manager.dm b/code/modules/nano/modules/law_manager.dm index 93caa4c48ba..98c2cdc9054 100644 --- a/code/modules/nano/modules/law_manager.dm +++ b/code/modules/nano/modules/law_manager.dm @@ -34,10 +34,7 @@ return 1 if(href_list["set_view"]) - if(is_malf(usr) || owner.is_ai_malf()) - current_view = text2num(href_list["set_view"]) - else - current_view = 0 + current_view = text2num(href_list["set_view"]) return 1 if(href_list["law_channel"]) @@ -170,12 +167,8 @@ data["isAI"] = owner.isAI() data["isMalf"] = is_malf(user) - data["isAIMalf"] = owner.is_ai_malf() data["isSlaved"] = owner.is_slaved() data["isAdmin"] = is_admin(user) - - if(!(data["isMalf"] || data["isAIMalf"])) - current_view = 0 data["view"] = current_view var/channels[0] @@ -183,9 +176,7 @@ channels[++channels.len] = list("channel" = ch_name) data["channel"] = owner.lawchannel data["channels"] = channels - - if(data["isMalf"] || data["isAIMalf"]) - data["law_sets"] = package_multiple_laws(data["isAdmin"] ? admin_laws : player_laws) + data["law_sets"] = package_multiple_laws(data["isAdmin"] ? admin_laws : player_laws) ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) @@ -216,15 +207,6 @@ /obj/nano_module/law_manager/proc/is_malf(var/mob/user) return (is_admin(user) && !owner.is_slaved()) || owner.is_malf_or_traitor() -/mob/living/silicon/proc/is_ai_malf() - return 0 - -/mob/living/silicon/robot/is_ai_malf() - return is_slaved() && connected_ai.is_malf_or_traitor() - -/mob/living/silicon/ai/is_ai_malf() - return 0 - /mob/living/silicon/proc/is_slaved() return 0 diff --git a/nano/templates/law_manager.tmpl b/nano/templates/law_manager.tmpl index d4860c2b908..fa91140881e 100644 --- a/nano/templates/law_manager.tmpl +++ b/nano/templates/law_manager.tmpl @@ -41,18 +41,16 @@ } -{{if data.isSlaved && data.isAdmin}} - This unit is law synced to {{:data.isSlaved}}. +{{if data.isSlaved}} +
Law synced to {{:data.isSlaved}}.
{{/if}} -{{if data.isMalf || data.isAIMalf}} -
-
- {{:helper.link('Law Management', null, {'set_view' : 0}, data.view == 0 ? 'selected' : null)}} - {{:helper.link('Law Sets', null, {'set_view' : 1}, data.view == 1 ? 'selected' : null)}} -
+
+
+ {{:helper.link('Law Management', null, {'set_view' : 0}, data.view == 0 ? 'selected' : null)}} + {{:helper.link('Law Sets', null, {'set_view' : 1}, data.view == 1 ? 'selected' : null)}}
-{{/if}} +
{{if data.view == 0}} {{if data.has_ion_laws}} @@ -196,6 +194,8 @@
{{/if}} {{else data.view == 1}} +
Remember: Stating laws other than those currently loaded may be grounds for decommissioning - NanoTrasen
+ {{for data.law_sets}}
@@ -246,7 +246,7 @@

- {{:helper.link('Load Laws', null, {'transfer_laws' : value.ref}, data.isSlaved ? 'disabled' : null)}}{{:helper.link('State Laws', null, {'state_law_set' : value.ref})}} + {{:helper.link('Load Laws', null, {'transfer_laws' : value.ref}, data.isMalf ? null : 'disabled')}}{{:helper.link('State Laws', null, {'state_law_set' : value.ref})}}
{{/for}} From de97e18e5f017660dc46e9d39ee7f8848758b055 Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Tue, 2 Jun 2015 15:41:14 +0200 Subject: [PATCH 08/22] Eye mobs are now listed in the observer tracking list. Fixes #9636. --- code/__HELPERS/unsorted.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 3564c5e15fc..d97ade5286e 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -444,6 +444,8 @@ Turf and target are seperate in case you want to teleport some distance from a t /proc/sortmobs() var/list/moblist = list() var/list/sortmob = sortAtom(mob_list) + for(var/mob/eye/M in sortmob) + moblist.Add(M) for(var/mob/living/silicon/ai/M in sortmob) moblist.Add(M) for(var/mob/living/silicon/pai/M in sortmob) From 9f76386a7a7615bfbb523c314b154e3d06dd3fc7 Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Tue, 2 Jun 2015 15:42:22 +0200 Subject: [PATCH 09/22] Changelog entry- --- html/changelogs/PsiOmegaDelta-EyeTracking.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 html/changelogs/PsiOmegaDelta-EyeTracking.yml diff --git a/html/changelogs/PsiOmegaDelta-EyeTracking.yml b/html/changelogs/PsiOmegaDelta-EyeTracking.yml new file mode 100644 index 00000000000..085ae37cb27 --- /dev/null +++ b/html/changelogs/PsiOmegaDelta-EyeTracking.yml @@ -0,0 +1,5 @@ +author: PsiOmegaDelta +delete-after: True + +changes: + - rscadd: "AI eyes can now be found in the observer follow list." From 1a74b536d72df3c4155718e2627c16ba84ca18bd Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Tue, 2 Jun 2015 10:04:47 +0200 Subject: [PATCH 10/22] Active role counting tweak. The number of Any players now properly respects activity. Borgs should now properly increase the number of players for a given job. --- code/modules/events/event_dynamic.dm | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/code/modules/events/event_dynamic.dm b/code/modules/events/event_dynamic.dm index 0dbe3a5017c..3539130c275 100644 --- a/code/modules/events/event_dynamic.dm +++ b/code/modules/events/event_dynamic.dm @@ -188,28 +188,35 @@ var/list/event_last_fired = list() active_with_role["Cyborg"] = 0 active_with_role["Janitor"] = 0 active_with_role["Gardener"] = 0 - active_with_role["Any"] = player_list.len for(var/mob/M in player_list) - if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive + if(!M.mind || !M.client || M.client.is_afk(10 MINUTES)) // longer than 10 minutes AFK counts them as inactive continue - if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "engineering robot module") - active_with_role["Engineer"]++ - if(M.mind.assigned_role in list("Chief Engineer", "Station Engineer")) + active_with_role["Any"]++ + + if(istype(M, /mob/living/silicon/robot)) + var/mob/living/silicon/robot/R = M + if(R.module) + if(istype(R.module, /obj/item/weapon/robot_module/engineering)) + active_with_role["Engineer"]++ + else if(istype(R.module, /obj/item/weapon/robot_module/security)) + active_with_role["Security"]++ + else if(istype(R.module, /obj/item/weapon/robot_module/medical)) + active_with_role["Medical"]++ + else if(istype(R.module, /obj/item/weapon/robot_module/research)) + active_with_role["Scientist"]++ + + if(M.mind.assigned_role in engineering_positions) active_with_role["Engineer"]++ - if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "medical robot module") - active_with_role["Medical"]++ if(M.mind.assigned_role in medical_positions) active_with_role["Medical"]++ - if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "security robot module") - active_with_role["Security"]++ if(M.mind.assigned_role in security_positions) active_with_role["Security"]++ - if(M.mind.assigned_role in list("Research Director", "Scientist")) + if(M.mind.assigned_role in science_positions) active_with_role["Scientist"]++ if(M.mind.assigned_role == "AI") From d2cfcdf9d9cda992c69ce41bd3f38513c2071354 Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Tue, 2 Jun 2015 14:53:18 +0200 Subject: [PATCH 11/22] Changelog entry. --- html/changelogs/PsiOmegaDelta-LawSets.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 html/changelogs/PsiOmegaDelta-LawSets.yml diff --git a/html/changelogs/PsiOmegaDelta-LawSets.yml b/html/changelogs/PsiOmegaDelta-LawSets.yml new file mode 100644 index 00000000000..aef3d7f04ea --- /dev/null +++ b/html/changelogs/PsiOmegaDelta-LawSets.yml @@ -0,0 +1,6 @@ +author: PsiOmegaDelta +delete-after: True + +changes: + - rscadd: "Synths can now review all law modules that can be found on the station from their law manager." + - rscadd: "Synths can state these laws if desired, however this is strongly discouraged unless subverted/malfunctioning." From 5ed365d96b89780cce8a58c04effd7361307b4ee Mon Sep 17 00:00:00 2001 From: Chinsky Date: Tue, 2 Jun 2015 18:34:47 +0300 Subject: [PATCH 12/22] Saves rank and time too in cryopod logs. It's usually very hard to guess who all those people are on pure name list, and purging records screws over investigations enough as it is :< --- code/game/machinery/cryopod.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 9e7e82c0c3c..95b7b500e66 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -393,7 +393,7 @@ occupant.ckey = null //Make an announcement and log the person entering storage. - control_computer.frozen_crew += "[occupant.real_name]" + control_computer.frozen_crew += "[occupant.real_name], [occupant.mind.assigned_role] - [worldtime2text()]" announce.autosay("[occupant.real_name] [on_store_message]", "[on_store_name]") visible_message("\The [initial(name)] hums and hisses as it moves [occupant.real_name] into storage.", 3) From f8cfd491f72012ce37e7bc794612fd8101fed880 Mon Sep 17 00:00:00 2001 From: Chinsky Date: Tue, 2 Jun 2015 18:38:49 +0300 Subject: [PATCH 13/22] Now with radios --- code/game/machinery/cryopod.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 95b7b500e66..4de14cf246a 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -395,7 +395,7 @@ //Make an announcement and log the person entering storage. control_computer.frozen_crew += "[occupant.real_name], [occupant.mind.assigned_role] - [worldtime2text()]" - announce.autosay("[occupant.real_name] [on_store_message]", "[on_store_name]") + announce.autosay("[occupant.real_name], [occupant.mind.assigned_role] [on_store_message]", "[on_store_name]") visible_message("\The [initial(name)] hums and hisses as it moves [occupant.real_name] into storage.", 3) // Delete the mob. From 24adb8eb42ae842ffed50bc262c8068dacb5fdca Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Tue, 2 Jun 2015 16:56:10 +0100 Subject: [PATCH 14/22] Fixes vine/infestation events not working with new lighting Also adds a helper for finding whether there are any simulated atoms on a turf --- code/__HELPERS/turfs.dm | 6 ++++++ code/modules/events/infestation.dm | 6 +----- code/modules/hydroponics/spreading/spreading.dm | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/code/__HELPERS/turfs.dm b/code/__HELPERS/turfs.dm index b9b4225a414..3ee4e26a7a8 100644 --- a/code/__HELPERS/turfs.dm +++ b/code/__HELPERS/turfs.dm @@ -11,3 +11,9 @@ /proc/isfloor(turf/T) return (istype(T, /turf/simulated/floor) || istype(T, /turf/unsimulated/floor) || istype(T, /turf/simulated/shuttle/floor)) + +/proc/turf_clear(turf/T) + for(var/atom/A in T) + if(A.simulated) + return 0 + return 1 diff --git a/code/modules/events/infestation.dm b/code/modules/events/infestation.dm index 629579f7946..c88472688fa 100644 --- a/code/modules/events/infestation.dm +++ b/code/modules/events/infestation.dm @@ -58,14 +58,10 @@ spawn_area_type = /area/security/tactical locstring = "tactical equipment storage" - //world << "looking for [spawn_area_type]" for(var/areapath in typesof(spawn_area_type)) - //world << " checking [areapath]" var/area/A = locate(areapath) - //world << " A: [A], contents.len: [A.contents.len]" - //world << " B: [B], contents.len: [B.contents.len]" for(var/turf/simulated/floor/F in A.contents) - if(!F.contents.len) + if(turf_clear(F)) turfs += F var/list/spawn_types = list() diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index 2d088658acd..b3bb0010b4b 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -7,7 +7,7 @@ for(var/areapath in typesof(/area/hallway)) var/area/A = locate(areapath) for(var/turf/simulated/floor/F in A.contents) - if(!F.contents.len) + if(turf_clear(F)) turfs += F if(turfs.len) //Pick a turf to spawn at if we can From 5a2933bb4ff3b04b100992f114d8bf7698e84c85 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Tue, 2 Jun 2015 20:39:03 +0100 Subject: [PATCH 15/22] Fixes #9645 --- code/modules/economy/EFTPOS.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/economy/EFTPOS.dm b/code/modules/economy/EFTPOS.dm index 8758613f8d8..b1db16a40fa 100644 --- a/code/modules/economy/EFTPOS.dm +++ b/code/modules/economy/EFTPOS.dm @@ -100,7 +100,7 @@ else dat += "Lock in new transaction

" - dat += "Transaction purpose: [transaction_purpose]
" + dat += "Transaction purpose: [transaction_purpose]
" dat += "Value: $[transaction_amount]
" dat += "Linked account: [linked_account ? linked_account.owner_name : "None"]
" dat += "Change access code
" From 0777f9c9982ad18817e9559b44ff9c6c72af1467 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Tue, 2 Jun 2015 21:40:30 -0400 Subject: [PATCH 16/22] Fixes #9648 Robotic limbs are no longer able to mutate. --- code/modules/organs/organ_external.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 065b38fc499..a92219c7339 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -877,11 +877,14 @@ Note that amputating the affected organ does in fact remove the infection from t dislocated = -1 //TODO, make robotic limbs a separate type, remove snowflake cannot_break = 1 get_icon() + unmutate() for (var/obj/item/organ/external/T in children) if(T) T.robotize() /obj/item/organ/external/proc/mutate() + if(src.status & ORGAN_ROBOT) + return src.status |= ORGAN_MUTATED owner.update_body() From 45d60ab5513201514e37a1563b5b5dda4061ee75 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Tue, 2 Jun 2015 21:53:07 -0400 Subject: [PATCH 17/22] Fixes #9640 --- code/game/objects/items/weapons/storage/boxes.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 0f8cbcc10fe..e98ac5fc5b6 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -24,7 +24,7 @@ desc = "It's just an ordinary box." icon_state = "box" item_state = "syringe_kit" - var/foldable = null // BubbleWrap - if set, can be folded (when empty) into a sheet of cardboard + var/foldable = /obj/item/stack/material/cardboard // BubbleWrap - if set, can be folded (when empty) into a sheet of cardboard // BubbleWrap - A box can be folded up to make card /obj/item/weapon/storage/box/attack_self(mob/user as mob) @@ -598,7 +598,6 @@ icon_state = "light" desc = "This box is shaped on the inside so that only light tubes and bulbs fit." item_state = "syringe_kit" - foldable = /obj/item/stack/material/cardboard //BubbleWrap storage_slots=21 can_hold = list(/obj/item/weapon/light/tube, /obj/item/weapon/light/bulb) max_storage_space = 42 //holds 21 items of w_class 2 From bf231a2925a7174802854a5d358f88cc5764e3a4 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Tue, 2 Jun 2015 22:33:26 -0400 Subject: [PATCH 18/22] Fixes #9600 All atmos machines now reset last_flow_rate and last_power_draw when processing. --- code/ATMOSPHERICS/atmospherics.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index 7237cccbca3..9ae50b11af8 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -85,6 +85,9 @@ obj/machinery/atmospherics/proc/check_connect_types(obj/machinery/atmospherics/a return node.pipe_color /obj/machinery/atmospherics/process() + last_flow_rate = 0 + last_power_draw = 0 + build_network() /obj/machinery/atmospherics/proc/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference) From 17008aa7edb5318f3a1cfbb26732e24e7d7479e5 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Tue, 2 Jun 2015 22:51:45 -0400 Subject: [PATCH 19/22] Copies vent pump hibernation over to scrubbers --- code/ATMOSPHERICS/components/unary/vent_scrubber.dm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm index 63a0549acc8..17fd823dcca 100644 --- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm @@ -17,6 +17,7 @@ var/frequency = 1439 var/datum/radio_frequency/radio_connection + var/hibernate = 0 //Do we even process? var/scrubbing = 1 //0 = siphoning, 1 = scrubbing var/list/scrubbing_gas = list("carbon_dioxide") @@ -125,8 +126,8 @@ /obj/machinery/atmospherics/unary/vent_scrubber/process() ..() - last_power_draw = 0 - last_flow_rate = 0 + if (hibernate) + return 1 if (!node) use_power = 0 @@ -148,6 +149,12 @@ power_draw = pump_gas(src, environment, air_contents, transfer_moles, power_rating) + if(scrubbing && power_draw < 0 && controller_iteration > 10) //99% of all scrubbers + //Fucking hibernate because you ain't doing shit. + hibernate = 1 + spawn(rand(100,200)) //hibernate for 10 or 20 seconds randomly + hibernate = 0 + if (power_draw >= 0) last_power_draw = power_draw use_power(power_draw) From 61469d312ad4659416c7925751d9b670ced6d174 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Tue, 2 Jun 2015 22:52:35 -0400 Subject: [PATCH 20/22] Fixes scrubber power draw --- code/ATMOSPHERICS/_atmospherics_helpers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ATMOSPHERICS/_atmospherics_helpers.dm b/code/ATMOSPHERICS/_atmospherics_helpers.dm index 5ea54e7a56d..47bd739a952 100644 --- a/code/ATMOSPHERICS/_atmospherics_helpers.dm +++ b/code/ATMOSPHERICS/_atmospherics_helpers.dm @@ -130,7 +130,7 @@ var/total_specific_power = 0 //the power required to remove one mole of filterable gas for (var/g in filtering) var/ratio = source.gas[g]/total_filterable_moles //this converts the specific power per mole of pure gas to specific power per mole of scrubbed gas - total_specific_power = specific_power_gas[g]*ratio + total_specific_power += specific_power_gas[g]*ratio //Figure out how much of each gas to filter if (isnull(total_transfer_moles)) From 086517f988fd462aed649b2760881f78e1f3c203 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Wed, 3 Jun 2015 17:57:57 +0200 Subject: [PATCH 21/22] Closes a span class. Has somehow gone unnoticed until now. --- code/modules/admin/verbs/adminpm.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 2c0889f3b26..2c9f0057779 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -136,7 +136,7 @@ send2adminirc("PlayerPM from [key_name(src)]: [html_decode(msg)]") - src << "" + create_text_tag("pm_out_alt", "", src) + " to : [msg]" + src << "" + create_text_tag("pm_out_alt", "", src) + " to Admin IRC: [msg]" log_admin("PM: [key_name(src)]->IRC: [msg]") for(var/client/X in admins) From 094ba6a1fca99c0e6234be4cf75ae406ac865ba5 Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Thu, 4 Jun 2015 08:11:44 +0200 Subject: [PATCH 22/22] Changelog update. --- html/changelog.html | 9 +++++++++ html/changelogs/.all_changelog.yml | 9 +++++++++ html/changelogs/PsiOmegaDelta-EyeTracking.yml | 5 ----- html/changelogs/PsiOmegaDelta-LawSets.yml | 6 ------ html/changelogs/PsiOmegaDelta-MayRespawn.yml | 5 ----- 5 files changed, 18 insertions(+), 16 deletions(-) delete mode 100644 html/changelogs/PsiOmegaDelta-EyeTracking.yml delete mode 100644 html/changelogs/PsiOmegaDelta-LawSets.yml delete mode 100644 html/changelogs/PsiOmegaDelta-MayRespawn.yml diff --git a/html/changelog.html b/html/changelog.html index 518709a83b4..01820bee35b 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,15 @@ -->
+

04 June 2015

+

PsiOmegaDelta updated:

+
    +
  • AI eyes can now be found in the observer follow list.
  • +
  • Synths can now review all law modules that can be found on the station from their law manager.
  • +
  • Synths can state these laws if desired, however this is strongly discouraged unless subverted/malfunctioning.
  • +
  • Astral projecting mobs, such as wizards or cultists, may no longer respawn as something else while their body lives.
  • +
+

02 June 2015

Techhead updated:

    diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 0b48f165458..499233b5a8b 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -1870,3 +1870,12 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. 2015-06-02: Techhead: - rscadd: Re-adds extended capacity emergency oxygen tanks to relevant jobs. +2015-06-04: + PsiOmegaDelta: + - rscadd: AI eyes can now be found in the observer follow list. + - rscadd: Synths can now review all law modules that can be found on the station + from their law manager. + - rscadd: Synths can state these laws if desired, however this is strongly discouraged + unless subverted/malfunctioning. + - bugfix: Astral projecting mobs, such as wizards or cultists, may no longer respawn + as something else while their body lives. diff --git a/html/changelogs/PsiOmegaDelta-EyeTracking.yml b/html/changelogs/PsiOmegaDelta-EyeTracking.yml deleted file mode 100644 index 085ae37cb27..00000000000 --- a/html/changelogs/PsiOmegaDelta-EyeTracking.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: PsiOmegaDelta -delete-after: True - -changes: - - rscadd: "AI eyes can now be found in the observer follow list." diff --git a/html/changelogs/PsiOmegaDelta-LawSets.yml b/html/changelogs/PsiOmegaDelta-LawSets.yml deleted file mode 100644 index aef3d7f04ea..00000000000 --- a/html/changelogs/PsiOmegaDelta-LawSets.yml +++ /dev/null @@ -1,6 +0,0 @@ -author: PsiOmegaDelta -delete-after: True - -changes: - - rscadd: "Synths can now review all law modules that can be found on the station from their law manager." - - rscadd: "Synths can state these laws if desired, however this is strongly discouraged unless subverted/malfunctioning." diff --git a/html/changelogs/PsiOmegaDelta-MayRespawn.yml b/html/changelogs/PsiOmegaDelta-MayRespawn.yml deleted file mode 100644 index eff6f0e298f..00000000000 --- a/html/changelogs/PsiOmegaDelta-MayRespawn.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: PsiOmegaDelta -delete-after: True - -changes: - - bugfix: "Astral projecting mobs, such as wizards or cultists, may no longer respawn as something else while their body lives."