From 4e6b316a9e524db2d563610a4f5c3e59350d90fd Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Thu, 2 Jul 2015 09:26:10 +0100 Subject: [PATCH 001/178] Improved VV and callproc implementation --- baystation12.dme | 5 +- code/js/view_variables.js | 33 ++ code/modules/admin/admin_verbs.dm | 3 + code/modules/admin/callproc/callproc.dm | 152 +++++++ code/modules/admin/verbs/debug.dm | 116 +---- code/modules/admin/view_variables/helpers.dm | 93 ++++ .../admin/view_variables/topic.dm} | 426 +----------------- .../admin/view_variables/view_variables.dm | 160 +++++++ 8 files changed, 454 insertions(+), 534 deletions(-) create mode 100644 code/js/view_variables.js create mode 100644 code/modules/admin/callproc/callproc.dm create mode 100644 code/modules/admin/view_variables/helpers.dm rename code/{datums/datumvars.dm => modules/admin/view_variables/topic.dm} (53%) create mode 100644 code/modules/admin/view_variables/view_variables.dm diff --git a/baystation12.dme b/baystation12.dme index 92d393a37e..2fdcefbb42 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -144,7 +144,6 @@ #include "code\datums\browser.dm" #include "code\datums\computerfiles.dm" #include "code\datums\datacore.dm" -#include "code\datums\datumvars.dm" #include "code\datums\disease.dm" #include "code\datums\mind.dm" #include "code\datums\mixed.dm" @@ -832,6 +831,7 @@ #include "code\modules\admin\player_panel.dm" #include "code\modules\admin\topic.dm" #include "code\modules\admin\ToRban.dm" +#include "code\modules\admin\callproc\callproc.dm" #include "code\modules\admin\DB ban\functions.dm" #include "code\modules\admin\permissionverbs\permissionedit.dm" #include "code\modules\admin\verbs\adminhelp.dm" @@ -864,6 +864,9 @@ #include "code\modules\admin\verbs\striketeam.dm" #include "code\modules\admin\verbs\ticklag.dm" #include "code\modules\admin\verbs\tripAI.dm" +#include "code\modules\admin\view_variables\helpers.dm" +#include "code\modules\admin\view_variables\topic.dm" +#include "code\modules\admin\view_variables\view_variables.dm" #include "code\modules\alarm\alarm.dm" #include "code\modules\alarm\alarm_handler.dm" #include "code\modules\alarm\atmosphere_alarm.dm" diff --git a/code/js/view_variables.js b/code/js/view_variables.js new file mode 100644 index 0000000000..86ca8cadc6 --- /dev/null +++ b/code/js/view_variables.js @@ -0,0 +1,33 @@ +function updateSearch() { + var filter_text = document.getElementById('filter'); + var filter = filter_text.value.toLowerCase(); + + var vars_ol = document.getElementById('vars'); + var lis = vars_ol.children; + // the above line can be changed to vars_ol.getElementsByTagName("li") to filter child lists too + // potential todo: implement a per-admin toggle for this + + for(var i = 0; i < lis.length; i++) { + var li = lis[i]; + if(filter == "" || li.innerText.toLowerCase().indexOf(filter) != -1) { + li.style.display = "block"; + } else { + li.style.display = "none"; + } + } +} + +function selectTextField() { + var filter_text = document.getElementById('filter'); + filter_text.focus(); + filter_text.select(); +} + +function loadPage(list) { + if(list.options[list.selectedIndex].value == "") { + return; + } + + location.href=list.options[list.selectedIndex].value; + list.selectedIndex = 0; +} diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index ef4fa997c8..88a52ff85c 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -174,6 +174,7 @@ var/list/admin_verbs_debug = list( /client/proc/show_plant_genes, /client/proc/enable_debug_verbs, /client/proc/callproc, + /client/proc/callproc_target, /client/proc/toggledebuglogs, /client/proc/SDQL_query, /client/proc/SDQL2_query, @@ -181,6 +182,7 @@ var/list/admin_verbs_debug = list( var/list/admin_verbs_paranoid_debug = list( /client/proc/callproc, + /client/proc/callproc_target, /client/proc/debug_controller ) @@ -250,6 +252,7 @@ var/list/admin_verbs_hideable = list( /client/proc/restart_controller, /client/proc/cmd_admin_list_open_jobs, /client/proc/callproc, + /client/proc/callproc_target, /client/proc/Debug2, /client/proc/reload_admins, /client/proc/kill_air, diff --git a/code/modules/admin/callproc/callproc.dm b/code/modules/admin/callproc/callproc.dm new file mode 100644 index 0000000000..a416905e7b --- /dev/null +++ b/code/modules/admin/callproc/callproc.dm @@ -0,0 +1,152 @@ + +/client/proc/callproc() + set category = "Debug" + set name = "Advanced ProcCall" + + if(!check_rights(R_DEBUG)) return + if(config.debugparanoid && !check_rights(R_ADMIN)) return + + var/target = null + var/targetselected = 0 + + switch(alert("Proc owned by something?",, "Yes", "No", "Cancel")) + if("Yes") + targetselected=1 + switch(input("Proc owned by...", "Owner", null) as null|anything in list("Obj", "Mob", "Area or Turf", "Client")) + if("Obj") + target = input("Select target:", "Target") as null|obj in world + if("Mob") + target = input("Select target:", "Target", usr) as null|mob in world + if("Area or Turf") + target = input("Select target:", "Target", get_turf(usr)) as null|area|turf in world + if("Client") + target = input("Select target:", "Target", usr.client) as null|anything in clients + else + return + if(!target) + usr << "Proc call cancelled." + return + if("Cancel") + return + if("No") + ; // BYOND apparently doesn't have 'break' in switch statements. + + callproc_targetpicked(targetselected, target) + +/client/proc/callproc_target(atom/A in world) + set category = "Debug" + set name = "Advanced ProcCall Target" + + if(!check_rights(R_DEBUG)) return + if(config.debugparanoid && !check_rights(R_ADMIN)) return + + callproc_targetpicked(1, A) + +/client/proc/callproc_targetpicked(hastarget, datum/target) + + // this needs checking again here because VV's 'Call Proc' option directly calls this proc with the target datum + if(!check_rights(R_DEBUG)) return + if(config.debugparanoid && !check_rights(R_ADMIN)) return + + var/returnval = null + + var/procname = input("Proc name", "Proc") as null|text + if(!procname) return + + if(hastarget) + if(!target) + usr << "Your callproc target no longer exists." + return + if(!hascall(target, procname)) + usr << "\The [target] has no call [procname]()" + return + + var/list/arguments = list() + var/done = 0 + var/current = null + + while(!done) + if(hastarget && !target) + usr << "Your callproc target no longer exists." + return + switch(input("Type of [arguments.len+1]\th variable", "argument [arguments.len+1]") as null|anything in list( + "finished", "null", "text", "num", "type", "obj reference", "mob reference", + "area/turf reference", "icon", "file", "client", "mob's area", "marked datum")) + if(null) + return + + if("finished") + done = 1 + + if("null") + current = null + + if("text") + current = input("Enter text for [arguments.len+1]\th argument") as null|text + if(isnull(current)) return + + if("num") + current = input("Enter number for [arguments.len+1]\th argument") as null|num + if(isnull(current)) return + + if("type") + current = input("Select type for [arguments.len+1]\th argument") as null|anything in typesof(/obj, /mob, /area, /turf) + if(isnull(current)) return + + if("obj reference") + current = input("Select object for [arguments.len+1]\th argument") as null|obj in world + if(isnull(current)) return + + if("mob reference") + current = input("Select mob for [arguments.len+1]\th argument") as null|mob in world + if(isnull(current)) return + + if("area/turf reference") + current = input("Select area/turf for [arguments.len+1]\th argument") as null|area|turf in world + if(isnull(current)) return + + if("icon") + current = input("Provide icon for [arguments.len+1]\th argument") as null|icon + if(isnull(current)) return + + if("client") + current = input("Select client for [arguments.len+1]\th argument") as null|anything in clients + if(isnull(current)) return + + if("mob's area") + var/mob/M = input("Select mob to take area for [arguments.len+1]\th argument") as null|mob in world + if(!M) return + current = get_area(M) + if(!current) + switch(alert("\The [M] appears to not have an area; do you want to pass null instead?",, "Yes", "Cancel")) + if("Yes") + ; + if("Cancel") + return + + if("marked datum") + current = holder.marked_datum + if(!current) + switch(alert("You do not currently have a marked datum; do you want to pass null instead?",, "Yes", "Cancel")) + if("Yes") + ; + if("Cancel") + return + if(!done) + arguments += current + + if(hastarget) + if(!target) + usr << "Your callproc target no longer exists." + return + log_admin("[key_name(src)] called [target]'s [procname]() with [arguments.len ? "the arguments [list2params(arguments)]" : "no arguments"].") + if(arguments.len) + returnval = call(target, procname)(arglist(arguments)) + else + returnval = call(target, procname)() + else + log_admin("[key_name(src)] called [procname]() with [arguments.len ? "the arguments [list2params(arguments)]" : "no arguments"].") + returnval = call(procname)(arglist(arguments)) + + usr << "[procname]() returned: [isnull(returnval) ? "null" : returnval]" + feedback_add_details("admin_verb","APC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 63eae8e994..7469e333ae 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -14,121 +14,7 @@ feedback_add_details("admin_verb","DG2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - - -/* 21st Sept 2010 -Updated by Skie -- Still not perfect but better! -Stuff you can't do: -Call proc /mob/proc/make_dizzy() for some player -Because if you select a player mob as owner it tries to do the proc for -/mob/living/carbon/human/ instead. And that gives a run-time error. -But you can call procs that are of type /mob/living/carbon/human/proc/ for that player. -*/ - -/client/proc/callproc() - set category = "Debug" - set name = "Advanced ProcCall" - - if(!check_rights(R_DEBUG)) return - if(config.debugparanoid && !check_rights(R_ADMIN)) return - - spawn(0) - var/target = null - var/targetselected = 0 - var/lst[] // List reference - lst = new/list() // Make the list - var/returnval = null - var/class = null - - switch(alert("Proc owned by something?",,"Yes","No")) - if("Yes") - targetselected = 1 - class = input("Proc owned by...","Owner",null) as null|anything in list("Obj","Mob","Area or Turf","Client") - switch(class) - if("Obj") - target = input("Enter target:","Target",usr) as obj in world - if("Mob") - target = input("Enter target:","Target",usr) as mob in world - if("Area or Turf") - target = input("Enter target:","Target",usr.loc) as area|turf in world - if("Client") - var/list/keys = list() - for(var/client/C) - keys += C - target = input("Please, select a player!", "Selection", null, null) as null|anything in keys - else - return - if("No") - target = null - targetselected = 0 - - var/procname = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null - if(!procname) return - - var/argnum = input("Number of arguments","Number:",0) as num|null - if(!argnum && (argnum!=0)) return - - lst.len = argnum // Expand to right length - //TODO: make a list to store whether each argument was initialised as null. - //Reason: So we can abort the proccall if say, one of our arguments was a mob which no longer exists - //this will protect us from a fair few errors ~Carn - - var/i - for(i=1, iError: callproc(): owner of proc no longer exists." - return - if(!hascall(target,procname)) - usr << "Error: callproc(): target has no such call [procname]." - return - log_admin("[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].") - returnval = call(target,procname)(arglist(lst)) // Pass the lst as an argument list to the proc - else - //this currently has no hascall protection. wasn't able to get it working. - log_admin("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].") - returnval = call(procname)(arglist(lst)) // Pass the lst as an argument list to the proc - - usr << "[procname] returned: [returnval ? returnval : "null"]" - feedback_add_details("admin_verb","APC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +// callproc moved to code/modules/admin/callproc /client/proc/Cell() set category = "Debug" diff --git a/code/modules/admin/view_variables/helpers.dm b/code/modules/admin/view_variables/helpers.dm new file mode 100644 index 0000000000..5ff47b3968 --- /dev/null +++ b/code/modules/admin/view_variables/helpers.dm @@ -0,0 +1,93 @@ + +// Keep these two together, they *must* be defined on both +// If /client ever becomes /datum/client or similar, they can be merged +/client/proc/get_view_variables_header() + return "[src]" +/datum/proc/get_view_variables_header() + return "[src]" + +/atom/get_view_variables_header() + return {" + [src] +
+ << + [dir2text(dir)] + >> + + "} + +/mob/living/get_view_variables_header() + return {" + [src] +
<< [dir2text(dir)] >> +
[ckey ? ckey : "No ckey"] / [real_name ? real_name : "No real name"] +
+ BRUTE:[getBruteLoss()] + FIRE:[getFireLoss()] + TOXIN:[getToxLoss()] + OXY:[getOxyLoss()] + CLONE:[getCloneLoss()] + BRAIN:[getBrainLoss()] +
+ "} + +// Same for these as for get_view_variables_header() above +/client/proc/get_view_variables_options() + return "" +/datum/proc/get_view_variables_options() + return "" + +/mob/get_view_variables_options() + return ..() + {" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "} + +/mob/living/carbon/human/get_view_variables_options() + return ..() + {" + + + + + + + "} + +/obj/get_view_variables_options() + return ..() + {" + + + + "} + +/turf/get_view_variables_options() + return ..() + {" + + + "} diff --git a/code/datums/datumvars.dm b/code/modules/admin/view_variables/topic.dm similarity index 53% rename from code/datums/datumvars.dm rename to code/modules/admin/view_variables/topic.dm index 7e9fc0cd04..022eccd932 100644 --- a/code/datums/datumvars.dm +++ b/code/modules/admin/view_variables/topic.dm @@ -1,416 +1,3 @@ - -// reference: /client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0) - -client - proc/debug_variables(datum/D in world) - set category = "Debug" - set name = "View Variables" - //set src in world - - - if(!usr.client || !usr.client.holder) - usr << "You need to be an administrator to access this." - return - - - var/title = "" - var/body = "" - - if(!D) return - if(istype(D, /atom)) - var/atom/A = D - title = "[A.name] (\ref[A]) = [A.type]" - - #ifdef VARSICON - if (A.icon) - body += debug_variable("icon", new/icon(A.icon, A.icon_state, A.dir), 0) - #endif - - var/icon/sprite - - if(istype(D,/atom)) - var/atom/AT = D - if(AT.icon && AT.icon_state) - sprite = new /icon(AT.icon, AT.icon_state) - usr << browse_rsc(sprite, "view_vars_sprite.png") - - title = "[D] (\ref[D]) = [D.type]" - - body += {" "} - - body += "" - - body += "
" - - if(sprite) - body += "" - - body += "
" - else - body += "
" - - body += "
" - - if(istype(D,/atom)) - var/atom/A = D - if(isliving(A)) - body += "[D]" - if(A.dir) - body += "
<< [dir2text(A.dir)] >>" - var/mob/living/M = A - body += "
[M.ckey ? M.ckey : "No ckey"] / [M.real_name ? M.real_name : "No real name"]" - body += {" -
- BRUTE:[M.getBruteLoss()] - FIRE:[M.getFireLoss()] - TOXIN:[M.getToxLoss()] - OXY:[M.getOxyLoss()] - CLONE:[M.getCloneLoss()] - BRAIN:[M.getBrainLoss()] - - - - "} - else - body += "[D]" - if(A.dir) - body += "
<< [dir2text(A.dir)] >>" - else - body += "[D]" - - body += "
" - - body += "
" - - var/formatted_type = text("[D.type]") - if(length(formatted_type) > 25) - var/middle_point = length(formatted_type) / 2 - var/splitpoint = findtext(formatted_type,"/",middle_point) - if(splitpoint) - formatted_type = "[copytext(formatted_type,1,splitpoint)]
[copytext(formatted_type,splitpoint)]" - else - formatted_type = "Type too long" //No suitable splitpoint (/) found. - - body += "
[formatted_type]" - - if(src.holder && src.holder.marked_datum && src.holder.marked_datum == D) - body += "
Marked Object" - - body += "
" - - body += "
Refresh" - - //if(ismob(D)) - // body += "
Show player panel

" - - body += {"
-
" - - body += "

" - - body += "E - Edit, tries to determine the variable type by itself.
" - body += "C - Change, asks you for the var type first.
" - body += "M - Mass modify: changes this variable for all objects of this type.

" - - body += "
Search:

" - - body += "
    " - - var/list/names = list() - for (var/V in D.vars) - names += V - - names = sortList(names) - - for (var/V in names) - body += debug_variable(V, D.vars[V], 0, D) - - body += "
" - - var/html = "" - if (title) - html += "[title]" - html += {""} - html += "" - html += body - - html += {" - - "} - - html += "" - - usr << browse(html, "window=variables\ref[D];size=475x650") - - return - - proc/debug_variable(name, value, level, var/datum/DA = null) - var/html = "" - - if(DA) - html += "
  • (E) (C) (M) " - else - html += "
  • " - - if (isnull(value)) - html += "[name] = null" - - else if (istext(value)) - html += "[name] = \"[value]\"" - - else if (isicon(value)) - #ifdef VARSICON - var/icon/I = new/icon(value) - var/rnd = rand(1,10000) - var/rname = "tmp\ref[I][rnd].png" - usr << browse_rsc(I, rname) - html += "[name] = ([value]) " - #else - html += "[name] = /icon ([value])" - #endif - -/* else if (istype(value, /image)) - #ifdef VARSICON - var/rnd = rand(1, 10000) - var/image/I = value - - src << browse_rsc(I.icon, "tmp\ref[value][rnd].png") - html += "[name] = " - #else - html += "[name] = /image ([value])" - #endif -*/ - else if (isfile(value)) - html += "[name] = '[value]'" - - else if (istype(value, /datum)) - var/datum/D = value - html += "[name] \ref[value] = [D.type]" - - else if (istype(value, /client)) - var/client/C = value - html += "[name] \ref[value] = [C] [C.type]" - // - else if (istype(value, /list)) - var/list/L = value - html += "[name] = /list ([L.len])" - - if (L.len > 0 && !(name == "underlays" || name == "overlays" || name == "vars" || L.len > 500)) - // not sure if this is completely right... - if(0) //(L.vars.len > 0) - html += "
      " - html += "
    " - else - html += "
      " - var/index = 1 - for (var/entry in L) - if(istext(entry)) - html += debug_variable(entry, L[entry], level + 1) - //html += debug_variable("[index]", L[index], level + 1) - else - html += debug_variable(index, L[index], level + 1) - index++ - html += "
    " - - else - html += "[name] = [value]" - - html += "
  • " - - return html - /client/proc/view_var_Topic(href, href_list, hsrc) //This should all be moved over to datum/admins/Topic() or something ~Carn if( (usr.client != src) || !src.holder ) @@ -866,7 +453,7 @@ client return new new_organ(M) - + else if(href_list["remorgan"]) if(!check_rights(R_SPAWN)) return @@ -945,11 +532,14 @@ client message_admins("[key_name(usr)] dealt [amount] amount of [Text] damage to [L]") href_list["datumrefresh"] = href_list["mobToDamage"] + else if(href_list["call_proc"]) + var/datum/D = locate(href_list["call_proc"]) + if(istype(D) || istype(D, /client)) // can call on clients too, not just datums + callproc_targetpicked(1, D) + if(href_list["datumrefresh"]) var/datum/DAT = locate(href_list["datumrefresh"]) - if(!istype(DAT, /datum)) - return - src.debug_variables(DAT) + if(istype(DAT, /datum) || istype(DAT, /client)) + debug_variables(DAT) return - diff --git a/code/modules/admin/view_variables/view_variables.dm b/code/modules/admin/view_variables/view_variables.dm new file mode 100644 index 0000000000..e624d2df05 --- /dev/null +++ b/code/modules/admin/view_variables/view_variables.dm @@ -0,0 +1,160 @@ + +// Variables to not even show in the list. +// step_* and bound_* are here because they literally break the game and do nothing else. +// parent_type is here because it's pointless to show in VV. +/var/list/view_variables_hide_vars = list("bound_x", "bound_y", "bound_height", "bound_width", "bounds", "parent_type", "step_x", "step_y", "step_size") +// Variables not to expand the lists of. Vars is pointless to expand, and overlays/underlays cannot be expanded. +/var/list/view_variables_dont_expand = list("overlays", "underlays", "vars") + +/client/proc/debug_variables(datum/D in world) + set category = "Debug" + set name = "View Variables" + + if(!check_rights(0)) + return + + if(!D) + return + + var/icon/sprite + if(istype(D, /atom)) + var/atom/A = D + if(A.icon && A.icon_state) + sprite = icon(A.icon, A.icon_state) + usr << browse_rsc(sprite, "view_vars_sprite.png") + + usr << browse_rsc('code/js/view_variables.js', "view_variables.js") + + var/html = {" + + + + [D] (\ref[D] - [D.type]) + + + +
    + + + +
    + + [sprite ? "" : ""] + +
    [D.get_view_variables_header()]
    +
    + [replacetext("[D.type]", "/", "/")] + [holder.marked_datum == D ? "
    Marked Object" : ""] +
    +
    +
    + Refresh +
    + +
    +
    +
    +
    +
    + + E - Edit, tries to determine the variable type by itself.
    + C - Change, asks you for the var type first.
    + M - Mass modify: changes this variable for all objects of this type.
    +
    +
    + + + +
    +
    + Search: +
    +
    + +
    +
    +
      + [make_view_variables_var_list(D)] +
    + + + "} + + usr << browse(html, "window=variables\ref[D];size=475x650") + + +/proc/make_view_variables_var_list(datum/D) + . = "" + var/list/variables = list() + for(var/x in D.vars) + if(x in view_variables_hide_vars) + continue + variables += x + variables = sortList(variables) + for(var/x in variables) + . += make_view_variables_var_entry(D, x, D.vars[x]) + +/proc/make_view_variables_var_entry(datum/D, varname, value, level=0) + var/ecm = null + var/vtext = null + var/extra = null + + if(D) + ecm = {" + (E) + (C) + (M) + "} + + if(isnull(value)) + vtext = "null" + else if(istext(value)) + vtext = "\"[value]\"" + else if(isicon(value)) + vtext = "[value]" + else if(isfile(value)) + vtext = "'[value]'" + else if(istype(value, /datum)) + var/datum/DA = value + if("[DA]" == "[DA.type]" || !"[DA]") + vtext = "\ref[DA] - [DA.type]" + else + vtext = "\ref[DA] - [DA] ([DA.type])" + else if(istype(value, /client)) + var/client/C = value + vtext = "\ref[C] - [C] ([C.type])" + else if(islist(value)) + var/list/L = value + vtext = "/list ([L.len])" + if(!(varname in view_variables_dont_expand) && L.len > 0 && L.len < 100) + extra = "" + else + vtext = "[value]" + + return "
  • [ecm][varname] = [vtext][extra]
  • " From 688b8b52f77f829c4c85164e39ffb3a1d71bc30a Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Wed, 22 Jul 2015 11:14:27 +0200 Subject: [PATCH 002/178] Makes it possible to define multiple tag pairs to check for. --- tools/TagMatcher/tag-matcher.py | 108 +++++++++++++++++++++++++------- 1 file changed, 85 insertions(+), 23 deletions(-) diff --git a/tools/TagMatcher/tag-matcher.py b/tools/TagMatcher/tag-matcher.py index 00f205c6b7..91ad5efb04 100644 --- a/tools/TagMatcher/tag-matcher.py +++ b/tools/TagMatcher/tag-matcher.py @@ -1,40 +1,102 @@ +''' +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +''' import argparse, re, sys from os import path, walk opt = argparse.ArgumentParser() -opt.add_argument('dir', help='The directory to scan for files with non-matching spans') - +opt.add_argument('dir', help='The directory to scan for *.dm files with non-matching spans') args = opt.parse_args() if(not path.isdir(args.dir)): print('Not a directory') sys.exit(1) -pair_of_tags = [('','')] -mismatches = { } +# These tuples are expected to be ordered as: +# A unique human readable name (henceforth referred to as tuple name), a regex pattern matching an opening tag, a regex pattern matching a closing tag +tag_tuples = [ ('', re.compile('', re.IGNORECASE), re.compile('', re.IGNORECASE)), + ('', re.compile('', re.IGNORECASE), re.compile('', re.IGNORECASE)), + ('
    ', re.compile('
    ', re.IGNORECASE), re.compile('
    ', re.IGNORECASE)), + ('', re.compile('', re.IGNORECASE), re.compile('', re.IGNORECASE)), + ('', re.compile('', re.IGNORECASE), re.compile('', re.IGNORECASE))] +# The keys of this dictionary will be the file path of each parsed *.dm file +# The values of this dictionary will be in the format provided by populate_match_list(). +matches = { } + +# Support def for setting up a dictionary, populating it with all defined tuple names as key with each being assigned the value 0. +# One such dictionary is created for each parsed file. +def populate_match_list(): + match_list = { } + for tag_tuple in tag_tuples: + match_list[tag_tuple[0]] = 0 + return match_list + +# This def shall be provided by a dictionary in the format given by populate_match_list() and a line of text. +# It loops over all defined tag tuples, adding the number of open tags found and subtracting the number of close tag found to the corresponding tuple name in the match list. +# This def is currently run with the same match_list for a given file and for all lines of that file. +def get_tag_matches(match_list, line): + for tag_tuple in tag_tuples: + match_list[tag_tuple[0]] += len(tag_tuple[1].findall(line)) + match_list[tag_tuple[0]] -= len(tag_tuple[2].findall(line)) + return + +# Support def that simply checks if a given dictionary in the format given by populate_match_list() contains any value that is non-zero. +# That is, a tag which had a non-equal amount of open/closing tags. +def has_mismatch(match_list): + for tag, match_number in match_list.iteritems(): + if(match_number != 0): + return 1 + return 0 + +# This section parses all *.dm files in the given directory, recursively. for root, subdirs, files in walk(args.dir): for filename in files: if filename.endswith('.dm'): - open_match = 0 - close_match = 0 file_path = path.join(root, filename) with open(file_path, 'r') as f: - open_span = re.compile(pair_of_tags[0][0], re.IGNORECASE) - close_span = re.compile(pair_of_tags[0][1], re.IGNORECASE) - for x in f: - open_match += len(open_span.findall(x)) - close_match += len(close_span.findall(x)) - - if open_match != close_match: - if not pair_of_tags[0][0] in mismatches.keys(): - mismatches[pair_of_tags[0][0]] = [] - mismatches[pair_of_tags[0][0]].append('{0} - {1}/{2}'.format(file_path, open_match, close_match)) + # For each file, generate the match dictionary. + matches[file_path] = populate_match_list() + for x in f: + # Then for each line in the file, conduct the tuple open/close matching. + get_tag_matches(matches[file_path], x) -for mismatch_key in mismatches.keys(): - print(mismatch_key) - for mismatch_value in mismatches[mismatch_key]: - print('\t{0}').format(mismatch_value) - -if len(mismatches.keys()) > 0: - sys.exit(1) +# Pretty printing section. +# Loops over all matches and checks if there is a mismatch of tags. +# If so, then and only then is the corresponding file path printed along with the number of unmatched open/close tags. +total_mismatch = 0 +for file, match_list in matches.iteritems(): + if(has_mismatch(match_list)): + print(file) + for tag, match_number in match_list.iteritems(): + # A positive number means an excess of opening tag, a negative number means an excess of closing tags. + if(match_number > 0): + total_mismatch += match_number + print('\t{0} - Excess of {1} opening tag(s)'.format(tag, match_number)) + elif (match_number < 0): + total_mismatch -= match_number + print('\t{0} - Excess of {1} closing tag(s)'.format(tag, -match_number)) + +# Simply prints the total number of mismatches found and if so returns 1 to, for example, fail Travis builds. +if(total_mismatch == 0): + print('No mismatches found.') +else: + print('') + print('Total number of mismatches: {0}'.format(total_mismatch)) + sys.exit(1) From 0ba7643217c37a45b015518332ab1bec04a04f95 Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Mon, 27 Jul 2015 09:32:51 +0200 Subject: [PATCH 003/178] Updates files as necessary to adhere to the new standard. --- code/ZAS/Controller.dm | 10 +- code/controllers/voting.dm | 6 +- code/datums/datumvars.dm | 14 +- code/datums/mind.dm | 2 +- code/game/antagonist/antagonist_objectives.dm | 4 +- code/game/antagonist/antagonist_print.dm | 2 +- code/game/dna/dna_modifier.dm | 2 +- .../gamemodes/changeling/modularchangling.dm | 1012 ++++++++--------- code/game/gamemodes/epidemic/epidemic.dm | 4 +- code/game/gamemodes/game_mode.dm | 6 +- code/game/gamemodes/sandbox/h_sandbox.dm | 2 +- code/game/machinery/Sleeper.dm | 12 +- code/game/machinery/adv_med.dm | 26 +- code/game/machinery/alarm.dm | 2 +- code/game/machinery/computer/arcade.dm | 7 +- code/game/machinery/computer/lockdown.dm | 153 --- code/game/machinery/computer/message.dm | 2 +- .../computer3/computers/HolodeckControl.dm | 12 +- .../machinery/computer3/computers/arcade.dm | 5 +- .../machinery/computer3/computers/card.dm | 2 +- .../machinery/computer3/computers/crew.dm | 2 +- .../machinery/computer3/computers/prisoner.dm | 2 +- code/game/machinery/computer3/lapvend.dm | 12 +- code/game/machinery/newscaster.dm | 2 +- code/game/machinery/suit_storage_unit.dm | 10 +- code/game/machinery/telecomms/logbrowser.dm | 16 +- .../telecomms/machine_interactions.dm | 38 +- code/game/machinery/telecomms/telemonitor.dm | 10 +- .../machinery/telecomms/traffic_control.dm | 10 +- code/game/mecha/combat/marauder.dm | 2 +- .../effects/decals/Cleanable/humans.dm | 2 +- code/game/objects/items/devices/PDA/PDA.dm | 2 +- code/game/objects/items/devices/paicard.dm | 2 +- code/game/objects/items/devices/violin.dm | 2 +- code/game/objects/items/weapons/manuals.dm | 4 +- .../objects/items/weapons/swords_axes_etc.dm | 2 +- code/game/objects/structures/musician.dm | 2 +- code/game/response_team.dm | 2 +- code/modules/admin/DB ban/functions.dm | 4 +- code/modules/admin/admin.dm | 10 +- code/modules/admin/admin_report.dm | 360 +++--- code/modules/admin/admin_verbs.dm | 4 +- .../admin/permissionverbs/permissionedit.dm | 2 +- code/modules/admin/player_panel.dm | 2 +- code/modules/admin/topic.dm | 2 +- code/modules/admin/verbs/randomverbs.dm | 2 +- code/modules/client/preferences.dm | 2 +- code/modules/clothing/spacesuits/rig/rig.dm | 6 +- code/modules/events/comms_blackout.dm | 24 +- code/modules/mining/machine_processing.dm | 14 +- code/modules/mob/language/synthetic.dm | 2 +- .../mob/living/carbon/human/human_defense.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 2 +- .../silicon/robot/drone/drone_console.dm | 2 +- code/modules/mob/living/silicon/robot/laws.dm | 2 +- code/modules/mob/living/silicon/robot/life.dm | 4 +- .../simple_animal/constructs/constructs.dm | 2 +- code/modules/mob/login.dm | 4 +- code/modules/paperwork/carbonpaper.dm | 99 +- code/modules/paperwork/photocopier.dm | 4 +- code/modules/power/smes.dm | 2 +- code/modules/power/turbine.dm | 2 +- code/modules/projectiles/gun.dm | 2 +- .../artifact/artifact_unknown.dm | 4 +- .../effects/unknown_effect_badfeeling.dm | 140 +-- .../effects/unknown_effect_goodfeeling.dm | 136 +-- .../tools/suspension_generator.dm | 4 +- code/modules/scripting/IDE.dm | 50 +- .../scripting/Implementations/Telecomms.dm | 2 +- code/modules/shuttles/shuttles_multi.dm | 37 +- code/modules/virus2/curer.dm | 2 +- 71 files changed, 1097 insertions(+), 1246 deletions(-) delete mode 100644 code/game/machinery/computer/lockdown.dm diff --git a/code/ZAS/Controller.dm b/code/ZAS/Controller.dm index 922275bcc9..37935a0ceb 100644 --- a/code/ZAS/Controller.dm +++ b/code/ZAS/Controller.dm @@ -109,13 +109,13 @@ Class Procs: simulated_turf_count++ S.update_air_properties() - admin_notice({"Geometry initialized in [round(0.1*(world.timeofday-start_time),0.1)] seconds. + admin_notice({"Geometry initialized in [round(0.1*(world.timeofday-start_time),0.1)] seconds. Total Simulated Turfs: [simulated_turf_count] Total Zones: [zones.len] Total Edges: [edges.len] Total Active Edges: [active_edges.len ? "[active_edges.len]" : "None"] -Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_count] +Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_count] "}, R_DEBUG) @@ -154,18 +154,18 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun #ifdef ZASDBG var/updated = 0 #endif - + //defer updating of self-zone-blocked turfs until after all other turfs have been updated. //this hopefully ensures that non-self-zone-blocked turfs adjacent to self-zone-blocked ones //have valid zones when the self-zone-blocked turfs update. var/list/deferred = list() - + for(var/turf/T in updating) //check if the turf is self-zone-blocked if(T.c_airblock(T) & ZONE_BLOCKED) deferred += T continue - + T.update_air_properties() T.post_update_air_properties() T.needs_air_update = 0 diff --git a/code/controllers/voting.dm b/code/controllers/voting.dm index 54f59204fb..44309b83d9 100644 --- a/code/controllers/voting.dm +++ b/code/controllers/voting.dm @@ -289,7 +289,7 @@ datum/controller/vote else . += "

    Vote: [capitalize(mode)]

    " . += "Time Left: [time_remaining] s
    " . += "" - if(capitalize(mode) == "Gamemode") .+= "" + if(capitalize(mode) == "Gamemode") .+= "" for(var/i = 1, i <= choices.len, i++) var/votes = choices[choices[i]] @@ -299,12 +299,12 @@ datum/controller/vote if(current_votes[C.ckey] == i) . += "" else - . += "" + . += "" else if(current_votes[C.ckey] == i) . += "" else - . += "" + . += "" if (additional_text.len >= i) . += additional_text[i] . += "" diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 7e9fc0cd04..75ffcba6e8 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -180,12 +180,12 @@ client body += "
    [M.ckey ? M.ckey : "No ckey"] / [M.real_name ? M.real_name : "No real name"]" body += {"
    - BRUTE:[M.getBruteLoss()] - FIRE:[M.getFireLoss()] - TOXIN:[M.getToxLoss()] - OXY:[M.getOxyLoss()] - CLONE:[M.getCloneLoss()] - BRAIN:[M.getBrainLoss()] + BRUTE:[M.getBruteLoss()] + FIRE:[M.getFireLoss()] + TOXIN:[M.getToxLoss()] + OXY:[M.getOxyLoss()] + CLONE:[M.getCloneLoss()] + BRAIN:[M.getBrainLoss()] @@ -866,7 +866,7 @@ client return new new_organ(M) - + else if(href_list["remorgan"]) if(!check_rights(R_SPAWN)) return diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 19cf48961e..7e26f94456 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -314,7 +314,7 @@ if(I in organs.implants) qdel(I) break - H << "Your loyalty implant has been deactivated." + H << "Your loyalty implant has been deactivated." log_admin("[key_name_admin(usr)] has de-loyalty implanted [current].") if("add") H << "You somehow have become the recepient of a loyalty transplant, and it just activated!" diff --git a/code/game/antagonist/antagonist_objectives.dm b/code/game/antagonist/antagonist_objectives.dm index 432c3f6bbe..3492c0494c 100644 --- a/code/game/antagonist/antagonist_objectives.dm +++ b/code/game/antagonist/antagonist_objectives.dm @@ -24,9 +24,9 @@ if(!O.completed && !O.check_completion()) result = 0 if(result && victory_text) - world << "[victory_text]" + world << "[victory_text]" if(victory_feedback_tag) feedback_set_details("round_end_result","[victory_feedback_tag]") else if(loss_text) - world << "[loss_text]" + world << "[loss_text]" if(loss_feedback_tag) feedback_set_details("round_end_result","[loss_feedback_tag]") diff --git a/code/game/antagonist/antagonist_print.dm b/code/game/antagonist/antagonist_print.dm index 76110e2b13..d4a81bf303 100644 --- a/code/game/antagonist/antagonist_print.dm +++ b/code/game/antagonist/antagonist_print.dm @@ -28,7 +28,7 @@ text += "
    The [role_text] was successful!" if(global_objectives && global_objectives.len) - text += "
    Their objectives were:" + text += "
    Their objectives were:" var/num = 1 for(var/datum/objective/O in global_objectives) text += print_objective(O, num, 1) diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 120ee88046..1ac7d7baa6 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -164,7 +164,7 @@ if(!M.client && M.mind) for(var/mob/dead/observer/ghost in player_list) if(ghost.mind == M.mind) - ghost << "Your corpse has been placed into a cloning scanner. Return to your body if you want to be resurrected/cloned! (Verbs -> Ghost -> Re-enter corpse)" + ghost << "Your corpse has been placed into a cloning scanner. Return to your body if you want to be resurrected/cloned! (Verbs -> Ghost -> Re-enter corpse)" break return diff --git a/code/game/gamemodes/changeling/modularchangling.dm b/code/game/gamemodes/changeling/modularchangling.dm index 5048977789..abbe9cb988 100644 --- a/code/game/gamemodes/changeling/modularchangling.dm +++ b/code/game/gamemodes/changeling/modularchangling.dm @@ -1,506 +1,506 @@ -// READ: Don't use the apostrophe in name or desc. Causes script errors. - -var/list/powers = typesof(/datum/power/changeling) - /datum/power/changeling //needed for the badmin verb for now -var/list/datum/power/changeling/powerinstances = list() - -/datum/power //Could be used by other antags too - var/name = "Power" - var/desc = "Placeholder" - var/helptext = "" - var/isVerb = 1 // Is it an active power, or passive? - var/verbpath // Path to a verb that contains the effects. - -/datum/power/changeling - var/allowduringlesserform = 0 - var/genomecost = 500000 // Cost for the changling to evolve this power. - -/datum/power/changeling/absorb_dna - name = "Absorb DNA" - desc = "Permits us to syphon the DNA from a human. They become one with us, and we become stronger." - genomecost = 0 - verbpath = /mob/proc/changeling_absorb_dna - -/datum/power/changeling/transform - name = "Transform" - desc = "We take on the apperance and voice of one we have absorbed." - genomecost = 0 - verbpath = /mob/proc/changeling_transform - -/datum/power/changeling/change_species - name = "Change Species" - desc = "We take on the apperance of a species that we have absorbed." - genomecost = 0 - verbpath = /mob/proc/changeling_change_species - -/datum/power/changeling/fakedeath - name = "Regenerative Stasis" - desc = "We become weakened to a death-like state, where we will rise again from death." - helptext = "Can be used before or after death. Duration varies greatly." - genomecost = 0 - allowduringlesserform = 1 - verbpath = /mob/proc/changeling_fakedeath - -// Hivemind - -/datum/power/changeling/hive_upload - name = "Hive Channel" - desc = "We can channel a DNA into the airwaves, allowing our fellow changelings to absorb it and transform into it as if they acquired the DNA themselves." - helptext = "Allows other changelings to absorb the DNA you channel from the airwaves. Will not help them towards their absorb objectives." - genomecost = 0 - verbpath = /mob/proc/changeling_hiveupload - -/datum/power/changeling/hive_download - name = "Hive Absorb" - desc = "We can absorb a single DNA from the airwaves, allowing us to use more disguises with help from our fellow changelings." - helptext = "Allows you to absorb a single DNA and use it. Does not count towards your absorb objective." - genomecost = 0 - verbpath = /mob/proc/changeling_hivedownload - -/datum/power/changeling/lesser_form - name = "Lesser Form" - desc = "We debase ourselves and become lesser. We become a monkey." - genomecost = 4 - verbpath = /mob/proc/changeling_lesser_form - -/datum/power/changeling/deaf_sting - name = "Deaf Sting" - desc = "We silently sting a human, completely deafening them for a short time." - genomecost = 1 - allowduringlesserform = 1 - verbpath = /mob/proc/changeling_deaf_sting - -/datum/power/changeling/blind_sting - name = "Blind Sting" - desc = "We silently sting a human, completely blinding them for a short time." - genomecost = 2 - allowduringlesserform = 1 - verbpath = /mob/proc/changeling_blind_sting - -/datum/power/changeling/silence_sting - name = "Silence Sting" - desc = "We silently sting a human, completely silencing them for a short time." - helptext = "Does not provide a warning to a victim that they have been stung, until they try to speak and cannot." - genomecost = 3 - allowduringlesserform = 1 - verbpath = /mob/proc/changeling_silence_sting - -/datum/power/changeling/mimicvoice - name = "Mimic Voice" - desc = "We shape our vocal glands to sound like a desired voice." - helptext = "Will turn your voice into the name that you enter. We must constantly expend chemicals to maintain our form like this" - genomecost = 1 - verbpath = /mob/proc/changeling_mimicvoice - -/datum/power/changeling/extractdna - name = "Extract DNA" - desc = "We stealthily sting a target and extract the DNA from them." - helptext = "Will give you the DNA of your target, allowing you to transform into them. Does not count towards absorb objectives." - genomecost = 2 - allowduringlesserform = 1 - verbpath = /mob/proc/changeling_extract_dna_sting - -/datum/power/changeling/transformation_sting - name = "Transformation Sting" - desc = "We silently sting a human, injecting a retrovirus that forces them to transform into another." - helptext = "Does not provide a warning to others. The victim will transform much like a changeling would." - genomecost = 3 - verbpath = /mob/proc/changeling_transformation_sting - -/datum/power/changeling/paralysis_sting - name = "Paralysis Sting" - desc = "We silently sting a human, paralyzing them for a short time." - genomecost = 8 - verbpath = /mob/proc/changeling_paralysis_sting - -/datum/power/changeling/LSDSting - name = "Hallucination Sting" - desc = "We evolve the ability to sting a target with a powerful hallunicationary chemical." - helptext = "The target does not notice they have been stung. The effect occurs after 30 to 60 seconds." - genomecost = 3 - verbpath = /mob/proc/changeling_lsdsting - -/datum/power/changeling/DeathSting - name = "Death Sting" - desc = "We silently sting a human, filling him with potent chemicals. His rapid death is all but assured." - genomecost = 10 - verbpath = /mob/proc/changeling_DEATHsting - -///datum/power/changeling/unfat_sting -// name = "Unfat Sting" -// desc = "We silently sting a human, forcing them to rapidly metabolize their fat." -// genomecost = 1 -// verbpath = /mob/proc/changeling_unfat_sting - -/datum/power/changeling/boost_range - name = "Boost Range" - desc = "We evolve the ability to shoot our stingers at humans, with some preperation." - genomecost = 2 - allowduringlesserform = 1 - verbpath = /mob/proc/changeling_boost_range - -/datum/power/changeling/Epinephrine - name = "Epinephrine sacs" - desc = "We evolve additional sacs of adrenaline throughout our body." - helptext = "Gives the ability to instantly recover from stuns. High chemical cost." - genomecost = 3 - verbpath = /mob/proc/changeling_unstun - -/datum/power/changeling/ChemicalSynth - name = "Rapid Chemical-Synthesis" - desc = "We evolve new pathways for producing our necessary chemicals, permitting us to naturally create them faster." - helptext = "Doubles the rate at which we naturally recharge chemicals." - genomecost = 4 - isVerb = 0 - verbpath = /mob/proc/changeling_fastchemical -/* -/datum/power/changeling/AdvChemicalSynth - name = "Advanced Chemical-Synthesis" - desc = "We evolve new pathways for producing our necessary chemicals, permitting us to naturally create them faster." - helptext = "Doubles the rate at which we naturally recharge chemicals." - genomecost = 8 - isVerb = 0 - verbpath = /mob/proc/changeling_fastchemical -*/ -/datum/power/changeling/EngorgedGlands - name = "Engorged Chemical Glands" - desc = "Our chemical glands swell, permitting us to store more chemicals inside of them." - helptext = "Allows us to store an extra 25 units of chemicals." - genomecost = 4 - isVerb = 0 - verbpath = /mob/proc/changeling_engorgedglands - -/datum/power/changeling/DigitalCamoflague - name = "Digital Camoflauge" - desc = "We evolve the ability to distort our form and proprtions, defeating common altgorthms used to detect lifeforms on cameras." - helptext = "We cannot be tracked by camera while using this skill. However, humans looking at us will find us.. uncanny. We must constantly expend chemicals to maintain our form like this." - genomecost = 1 - allowduringlesserform = 1 - verbpath = /mob/proc/changeling_digitalcamo - -/datum/power/changeling/rapidregeneration - name = "Rapid Regeneration" - desc = "We evolve the ability to rapidly regenerate, negating the need for stasis." - helptext = "Heals a moderate amount of damage every tick." - genomecost = 7 - verbpath = /mob/proc/changeling_rapidregen - - - -// Modularchangling, totally stolen from the new player panel. YAYY -/datum/changeling/proc/EvolutionMenu()//The new one - set category = "Changeling" - set desc = "Level up!" - - if(!usr || !usr.mind || !usr.mind.changeling) return - src = usr.mind.changeling - - if(!powerinstances.len) - for(var/P in powers) - powerinstances += new P() - - var/dat = "Changling Evolution Menu" - - //javascript, the part that does most of the work~ - dat += {" - - - - - - - "} - - //body tag start + onload and onkeypress (onkeyup) javascript event calls - dat += "" - - //title + search bar - dat += {" - -
    ChoicesVotesMinimum Players
    Minimum Players
    [gamemode_names[choices[i]]][votes][gamemode_names[choices[i]]][votes][gamemode_names[choices[i]]][votes][choices[i]][votes][choices[i]][votes][choices[i]][votes]
    - - - - - - -
    - Changling Evolution Menu
    - Hover over a power to see more information
    - Current evolution points left to evolve with: [geneticpoints]
    - Absorb genomes to acquire more evolution points -

    -

    - Search: -
    - - "} - - //player table header - dat += {" - - "} - - var/i = 1 - for(var/datum/power/changeling/P in powerinstances) - var/ownsthis = 0 - - if(P in purchasedpowers) - ownsthis = 1 - - - var/color = "#e6e6e6" - if(i%2 == 0) - color = "#f2f2f2" - - - dat += {" - - - - - - "} - - i++ - - - //player table ending - dat += {" -
    - - - Evolve [P] - Cost: [ownsthis ? "Purchased" : P.genomecost] - -
    -
    -
    - - - - "} - - usr << browse(dat, "window=powers;size=900x480") - - -/datum/changeling/Topic(href, href_list) - ..() - if(!ismob(usr)) - return - - if(href_list["P"]) - var/datum/mind/M = usr.mind - if(!istype(M)) - return - purchasePower(M, href_list["P"]) - call(/datum/changeling/proc/EvolutionMenu)() - - - -/datum/changeling/proc/purchasePower(var/datum/mind/M, var/Pname, var/remake_verbs = 1) - if(!M || !M.changeling) - return - - var/datum/power/changeling/Thepower = Pname - - - for (var/datum/power/changeling/P in powerinstances) - //world << "[P] - [Pname] = [P.name == Pname ? "True" : "False"]" - if(P.name == Pname) - Thepower = P - break - - - if(Thepower == null) - M.current << "This is awkward. Changeling power purchase failed, please report this bug to a coder!" - return - - if(Thepower in purchasedpowers) - M.current << "We have already evolved this ability!" - return - - - if(geneticpoints < Thepower.genomecost) - M.current << "We cannot evolve this... yet. We must acquire more DNA." - return - - geneticpoints -= Thepower.genomecost - - purchasedpowers += Thepower - - if(!Thepower.isVerb && Thepower.verbpath) - call(M.current, Thepower.verbpath)() - else if(remake_verbs) - M.current.make_changeling() - +// READ: Don't use the apostrophe in name or desc. Causes script errors. + +var/list/powers = typesof(/datum/power/changeling) - /datum/power/changeling //needed for the badmin verb for now +var/list/datum/power/changeling/powerinstances = list() + +/datum/power //Could be used by other antags too + var/name = "Power" + var/desc = "Placeholder" + var/helptext = "" + var/isVerb = 1 // Is it an active power, or passive? + var/verbpath // Path to a verb that contains the effects. + +/datum/power/changeling + var/allowduringlesserform = 0 + var/genomecost = 500000 // Cost for the changling to evolve this power. + +/datum/power/changeling/absorb_dna + name = "Absorb DNA" + desc = "Permits us to syphon the DNA from a human. They become one with us, and we become stronger." + genomecost = 0 + verbpath = /mob/proc/changeling_absorb_dna + +/datum/power/changeling/transform + name = "Transform" + desc = "We take on the apperance and voice of one we have absorbed." + genomecost = 0 + verbpath = /mob/proc/changeling_transform + +/datum/power/changeling/change_species + name = "Change Species" + desc = "We take on the apperance of a species that we have absorbed." + genomecost = 0 + verbpath = /mob/proc/changeling_change_species + +/datum/power/changeling/fakedeath + name = "Regenerative Stasis" + desc = "We become weakened to a death-like state, where we will rise again from death." + helptext = "Can be used before or after death. Duration varies greatly." + genomecost = 0 + allowduringlesserform = 1 + verbpath = /mob/proc/changeling_fakedeath + +// Hivemind + +/datum/power/changeling/hive_upload + name = "Hive Channel" + desc = "We can channel a DNA into the airwaves, allowing our fellow changelings to absorb it and transform into it as if they acquired the DNA themselves." + helptext = "Allows other changelings to absorb the DNA you channel from the airwaves. Will not help them towards their absorb objectives." + genomecost = 0 + verbpath = /mob/proc/changeling_hiveupload + +/datum/power/changeling/hive_download + name = "Hive Absorb" + desc = "We can absorb a single DNA from the airwaves, allowing us to use more disguises with help from our fellow changelings." + helptext = "Allows you to absorb a single DNA and use it. Does not count towards your absorb objective." + genomecost = 0 + verbpath = /mob/proc/changeling_hivedownload + +/datum/power/changeling/lesser_form + name = "Lesser Form" + desc = "We debase ourselves and become lesser. We become a monkey." + genomecost = 4 + verbpath = /mob/proc/changeling_lesser_form + +/datum/power/changeling/deaf_sting + name = "Deaf Sting" + desc = "We silently sting a human, completely deafening them for a short time." + genomecost = 1 + allowduringlesserform = 1 + verbpath = /mob/proc/changeling_deaf_sting + +/datum/power/changeling/blind_sting + name = "Blind Sting" + desc = "We silently sting a human, completely blinding them for a short time." + genomecost = 2 + allowduringlesserform = 1 + verbpath = /mob/proc/changeling_blind_sting + +/datum/power/changeling/silence_sting + name = "Silence Sting" + desc = "We silently sting a human, completely silencing them for a short time." + helptext = "Does not provide a warning to a victim that they have been stung, until they try to speak and cannot." + genomecost = 3 + allowduringlesserform = 1 + verbpath = /mob/proc/changeling_silence_sting + +/datum/power/changeling/mimicvoice + name = "Mimic Voice" + desc = "We shape our vocal glands to sound like a desired voice." + helptext = "Will turn your voice into the name that you enter. We must constantly expend chemicals to maintain our form like this" + genomecost = 1 + verbpath = /mob/proc/changeling_mimicvoice + +/datum/power/changeling/extractdna + name = "Extract DNA" + desc = "We stealthily sting a target and extract the DNA from them." + helptext = "Will give you the DNA of your target, allowing you to transform into them. Does not count towards absorb objectives." + genomecost = 2 + allowduringlesserform = 1 + verbpath = /mob/proc/changeling_extract_dna_sting + +/datum/power/changeling/transformation_sting + name = "Transformation Sting" + desc = "We silently sting a human, injecting a retrovirus that forces them to transform into another." + helptext = "Does not provide a warning to others. The victim will transform much like a changeling would." + genomecost = 3 + verbpath = /mob/proc/changeling_transformation_sting + +/datum/power/changeling/paralysis_sting + name = "Paralysis Sting" + desc = "We silently sting a human, paralyzing them for a short time." + genomecost = 8 + verbpath = /mob/proc/changeling_paralysis_sting + +/datum/power/changeling/LSDSting + name = "Hallucination Sting" + desc = "We evolve the ability to sting a target with a powerful hallunicationary chemical." + helptext = "The target does not notice they have been stung. The effect occurs after 30 to 60 seconds." + genomecost = 3 + verbpath = /mob/proc/changeling_lsdsting + +/datum/power/changeling/DeathSting + name = "Death Sting" + desc = "We silently sting a human, filling him with potent chemicals. His rapid death is all but assured." + genomecost = 10 + verbpath = /mob/proc/changeling_DEATHsting + +///datum/power/changeling/unfat_sting +// name = "Unfat Sting" +// desc = "We silently sting a human, forcing them to rapidly metabolize their fat." +// genomecost = 1 +// verbpath = /mob/proc/changeling_unfat_sting + +/datum/power/changeling/boost_range + name = "Boost Range" + desc = "We evolve the ability to shoot our stingers at humans, with some preperation." + genomecost = 2 + allowduringlesserform = 1 + verbpath = /mob/proc/changeling_boost_range + +/datum/power/changeling/Epinephrine + name = "Epinephrine sacs" + desc = "We evolve additional sacs of adrenaline throughout our body." + helptext = "Gives the ability to instantly recover from stuns. High chemical cost." + genomecost = 3 + verbpath = /mob/proc/changeling_unstun + +/datum/power/changeling/ChemicalSynth + name = "Rapid Chemical-Synthesis" + desc = "We evolve new pathways for producing our necessary chemicals, permitting us to naturally create them faster." + helptext = "Doubles the rate at which we naturally recharge chemicals." + genomecost = 4 + isVerb = 0 + verbpath = /mob/proc/changeling_fastchemical +/* +/datum/power/changeling/AdvChemicalSynth + name = "Advanced Chemical-Synthesis" + desc = "We evolve new pathways for producing our necessary chemicals, permitting us to naturally create them faster." + helptext = "Doubles the rate at which we naturally recharge chemicals." + genomecost = 8 + isVerb = 0 + verbpath = /mob/proc/changeling_fastchemical +*/ +/datum/power/changeling/EngorgedGlands + name = "Engorged Chemical Glands" + desc = "Our chemical glands swell, permitting us to store more chemicals inside of them." + helptext = "Allows us to store an extra 25 units of chemicals." + genomecost = 4 + isVerb = 0 + verbpath = /mob/proc/changeling_engorgedglands + +/datum/power/changeling/DigitalCamoflague + name = "Digital Camoflauge" + desc = "We evolve the ability to distort our form and proprtions, defeating common altgorthms used to detect lifeforms on cameras." + helptext = "We cannot be tracked by camera while using this skill. However, humans looking at us will find us.. uncanny. We must constantly expend chemicals to maintain our form like this." + genomecost = 1 + allowduringlesserform = 1 + verbpath = /mob/proc/changeling_digitalcamo + +/datum/power/changeling/rapidregeneration + name = "Rapid Regeneration" + desc = "We evolve the ability to rapidly regenerate, negating the need for stasis." + helptext = "Heals a moderate amount of damage every tick." + genomecost = 7 + verbpath = /mob/proc/changeling_rapidregen + + + +// Modularchangling, totally stolen from the new player panel. YAYY +/datum/changeling/proc/EvolutionMenu()//The new one + set category = "Changeling" + set desc = "Level up!" + + if(!usr || !usr.mind || !usr.mind.changeling) return + src = usr.mind.changeling + + if(!powerinstances.len) + for(var/P in powers) + powerinstances += new P() + + var/dat = "Changling Evolution Menu" + + //javascript, the part that does most of the work~ + dat += {" + + + + + + + "} + + //body tag start + onload and onkeypress (onkeyup) javascript event calls + dat += "" + + //title + search bar + dat += {" + + + + + + + + +
    + Changling Evolution Menu
    + Hover over a power to see more information
    + Current evolution points left to evolve with: [geneticpoints]
    + Absorb genomes to acquire more evolution points +

    +

    + Search: +
    + + "} + + //player table header + dat += {" + + "} + + var/i = 1 + for(var/datum/power/changeling/P in powerinstances) + var/ownsthis = 0 + + if(P in purchasedpowers) + ownsthis = 1 + + + var/color = "#e6e6e6" + if(i%2 == 0) + color = "#f2f2f2" + + + dat += {" + + + + + + "} + + i++ + + + //player table ending + dat += {" +
    + + + Evolve [P] - Cost: [ownsthis ? "Purchased" : P.genomecost] + +
    +
    +
    + + + + "} + + usr << browse(dat, "window=powers;size=900x480") + + +/datum/changeling/Topic(href, href_list) + ..() + if(!ismob(usr)) + return + + if(href_list["P"]) + var/datum/mind/M = usr.mind + if(!istype(M)) + return + purchasePower(M, href_list["P"]) + call(/datum/changeling/proc/EvolutionMenu)() + + + +/datum/changeling/proc/purchasePower(var/datum/mind/M, var/Pname, var/remake_verbs = 1) + if(!M || !M.changeling) + return + + var/datum/power/changeling/Thepower = Pname + + + for (var/datum/power/changeling/P in powerinstances) + //world << "[P] - [Pname] = [P.name == Pname ? "True" : "False"]" + if(P.name == Pname) + Thepower = P + break + + + if(Thepower == null) + M.current << "This is awkward. Changeling power purchase failed, please report this bug to a coder!" + return + + if(Thepower in purchasedpowers) + M.current << "We have already evolved this ability!" + return + + + if(geneticpoints < Thepower.genomecost) + M.current << "We cannot evolve this... yet. We must acquire more DNA." + return + + geneticpoints -= Thepower.genomecost + + purchasedpowers += Thepower + + if(!Thepower.isVerb && Thepower.verbpath) + call(M.current, Thepower.verbpath)() + else if(remake_verbs) + M.current.make_changeling() + diff --git a/code/game/gamemodes/epidemic/epidemic.dm b/code/game/gamemodes/epidemic/epidemic.dm index c7a3851529..4f98bbcc2b 100644 --- a/code/game/gamemodes/epidemic/epidemic.dm +++ b/code/game/gamemodes/epidemic/epidemic.dm @@ -34,7 +34,7 @@ ///////////////////////////////////////////////////////// /datum/game_mode/epidemic/send_intercept() - var/intercepttext = "CONFIDENTIAL REPORT
    " + var/intercepttext = "CONFIDENTIAL REPORT
    " virus_name = "X-[rand(1,99)]™" intercepttext += "Warning: Pathogen [virus_name] has been detected on [station_name()].

    " intercepttext += "Code violet quarantine of [station_name()] put under immediate effect.
    " @@ -64,7 +64,7 @@ M << "[extra_law]" /datum/game_mode/epidemic/proc/announce_to_kill_crew() - var/intercepttext = "CONFIDENTIAL REPORT
    " + var/intercepttext = "CONFIDENTIAL REPORT
    " intercepttext += "PATHOGEN [virus_name] IS STILL PRESENT ON [station_name()]. IN COMPLIANCE WITH NANOTRASEN LAWS FOR INTERSTELLAR SAFETY, EMERGENCY SAFETY MEASURES HAVE BEEN AUTHORIZED. ALL INFECTED CREW MEMBERS ON [station_name()] ARE TO BE NEUTRALIZED AND DISPOSED OF IN A MANNER THAT WILL DESTROY ALL TRACES OF THE PATHOGEN. FAILURE TO COMPLY WILL RESULT IN IMMEDIATE DESTRUCTION OF [station_name].
    " intercepttext += "CRUISER WILL ARRIVE IN [round(cruiser_seconds()/60)] MINUTES
    " diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 9ae0320b67..6cca12d77f 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -323,10 +323,10 @@ var/global/list/additional_antag_types = list() var/text = "" if(surviving_total > 0) - text += "
    There [surviving_total>1 ? "were [surviving_total] survivors" : "was one survivor"]
    " - text += " ([escaped_total>0 ? escaped_total : "none"] [emergency_shuttle.evac ? "escaped" : "transferred"]) and [ghosts] ghosts.

    " + text += "
    There [surviving_total>1 ? "were [surviving_total] survivors" : "was one survivor"]" + text += " ([escaped_total>0 ? escaped_total : "none"] [emergency_shuttle.evac ? "escaped" : "transferred"]) and [ghosts] ghosts.
    " else - text += "There were no survivors ([ghosts] ghosts)." + text += "There were no survivors ([ghosts] ghosts)." world << text if(clients > 0) diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm index ad2abb2236..df75722aeb 100644 --- a/code/game/gamemodes/sandbox/h_sandbox.dm +++ b/code/game/gamemodes/sandbox/h_sandbox.dm @@ -105,7 +105,7 @@ datum/hSB hsb.req_access += A hsb.loc = usr.loc - usr << "Sandbox: Created an airlock." + usr << "Sandbox: Created an airlock." if("hsbcanister") var/list/hsbcanisters = typesof(/obj/machinery/portable_atmospherics/canister/) - /obj/machinery/portable_atmospherics/canister/ var/hsbcanister = input(usr, "Choose a canister to spawn.", "Sandbox:") in hsbcanisters + "Cancel" diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 35b1a15397..af13cc1ed0 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -71,14 +71,14 @@ if(2) t1 = "*dead*" else - dat += text("[]\tHealth %: [] ([])

    ", (occupant.health > 50 ? "" : ""), occupant.health, t1) + dat += text("[]\tHealth %: [] ([])
    ", (""), occupant.health, t1) if(iscarbon(occupant)) var/mob/living/carbon/C = occupant - dat += text("[]\t-Pulse, bpm: []
    ", (C.pulse == PULSE_NONE || C.pulse == PULSE_THREADY ? "" : ""), C.get_pulse(GETPULSE_TOOL)) - dat += text("[]\t-Brute Damage %: []
    ", (occupant.getBruteLoss() < 60 ? "" : ""), occupant.getBruteLoss()) - dat += text("[]\t-Respiratory Damage %: []
    ", (occupant.getOxyLoss() < 60 ? "" : ""), occupant.getOxyLoss()) - dat += text("[]\t-Toxin Content %: []
    ", (occupant.getToxLoss() < 60 ? "" : ""), occupant.getToxLoss()) - dat += text("[]\t-Burn Severity %: []
    ", (occupant.getFireLoss() < 60 ? "" : ""), occupant.getFireLoss()) + dat += text("[]\t-Pulse, bpm: []
    ", (""), C.get_pulse(GETPULSE_TOOL)) + dat += text("[]\t-Brute Damage %: []
    ", (""), occupant.getBruteLoss()) + dat += text("[]\t-Respiratory Damage %: []
    ", (""), occupant.getOxyLoss()) + dat += text("[]\t-Toxin Content %: []
    ", (""), occupant.getToxLoss()) + dat += text("[]\t-Burn Severity %: []
    ", (""), occupant.getFireLoss()) dat += text("
    Paralysis Summary %: [] ([] seconds left!)
    ", occupant.paralysis, round(occupant.paralysis / 4)) if(occupant.reagents) for(var/chemical in connected.available_chemicals) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 855e32a0a1..f3ce2f85bd 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -236,7 +236,7 @@ dat = format_occupant_data(src.connected.get_occupant_data()) dat += "
    Print
    " else - dat = " Error: No Body Scanner connected." + dat = "Error: No Body Scanner connected." dat += text("
    Close", user) user << browse(dat, "window=scanconsole;size=430x600") @@ -309,30 +309,30 @@ aux = "Unconscious" else aux = "Dead" - dat += text("[]\tHealth %: [] ([])

    ", (occ["health"] > 50 ? "" : ""), occ["health"], aux) + dat += text("[]\tHealth %: [] ([])
    ", ("Viral pathogen detected in blood stream.
    " - dat += text("[]\t-Brute Damage %: []

    ", (occ["bruteloss"] < 60 ? "" : ""), occ["bruteloss"]) - dat += text("[]\t-Respiratory Damage %: []
    ", (occ["oxyloss"] < 60 ? "" : ""), occ["oxyloss"]) - dat += text("[]\t-Toxin Content %: []
    ", (occ["toxloss"] < 60 ? "" : ""), occ["toxloss"]) - dat += text("[]\t-Burn Severity %: []

    ", (occ["fireloss"] < 60 ? "" : ""), occ["fireloss"]) + dat += text("[]\t-Brute Damage %: []
    ", (""), occ["bruteloss"]) + dat += text("[]\t-Respiratory Damage %: []
    ", (""), occ["oxyloss"]) + dat += text("[]\t-Toxin Content %: []
    ", (""), occ["toxloss"]) + dat += text("[]\t-Burn Severity %: []

    ", (""), occ["fireloss"]) - dat += text("[]\tRadiation Level %: []
    ", (occ["rads"] < 10 ?"" : ""), occ["rads"]) - dat += text("[]\tGenetic Tissue Damage %: []
    ", (occ["cloneloss"] < 1 ?"" : ""), occ["cloneloss"]) - dat += text("[]\tApprox. Brain Damage %: []
    ", (occ["brainloss"] < 1 ?"" : ""), occ["brainloss"]) + dat += text("[]\tRadiation Level %: []
    ", (""), occ["rads"]) + dat += text("[]\tGenetic Tissue Damage %: []
    ", (""), occ["cloneloss"]) + dat += text("[]\tApprox. Brain Damage %: []
    ", (""), occ["brainloss"]) dat += text("Paralysis Summary %: [] ([] seconds left!)
    ", occ["paralysis"], round(occ["paralysis"] / 4)) dat += text("Body Temperature: [occ["bodytemp"]-T0C]°C ([occ["bodytemp"]*1.8-459.67]°F)

    ") if(occ["borer_present"]) dat += "Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended.
    " - dat += text("[]\tBlood Level %: [] ([] units)

    ", (occ["blood_amount"] > 448 ?"" : ""), occ["blood_amount"]*100 / 560, occ["blood_amount"]) + dat += text("[]\tBlood Level %: [] ([] units)
    ", (""), occ["blood_amount"]*100 / 560, occ["blood_amount"]) dat += text("Inaprovaline: [] units
    ", occ["inaprovaline_amount"]) dat += text("Soporific: [] units
    ", occ["stoxin_amount"]) - dat += text("[]\tDermaline: [] units

    ", (occ["dermaline_amount"] < 30 ? "" : ""), occ["dermaline_amount"]) - dat += text("[]\tBicaridine: [] units
    ", (occ["bicaridine_amount"] < 30 ? "" : ""), occ["bicaridine_amount"]) - dat += text("[]\tDexalin: [] units
    ", (occ["dexalin_amount"] < 30 ? "" : ""), occ["dexalin_amount"]) + dat += text("[]\tDermaline: [] units
    ", (""), occ["dermaline_amount"]) + dat += text("[]\tBicaridine: [] units
    ", (""), occ["bicaridine_amount"]) + dat += text("[]\tDexalin: [] units
    ", (""), occ["dexalin_amount"]) for(var/datum/disease/D in occ["tg_diseases_list"]) if(!D.hidden[SCANNER]) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 95e043db28..faf8ed713d 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -1034,7 +1034,7 @@ FIRE ALARM d2 = text("Initiate Time Lock", src) var/second = round(src.time) % 60 var/minute = (round(src.time) - second) / 60 - var/dat = "Fire alarm [d1]\n
    The current alert level is: [get_security_level()]


    \nTimer System: [d2]
    \nTime Left: [(minute ? "[minute]:" : null)][second] - - + +\n
    " + var/dat = "Fire alarm [d1]\n
    The current alert level is: [get_security_level()]

    \nTimer System: [d2]
    \nTime Left: [(minute ? "[minute]:" : null)][second] - - + +\n
    " user << browse(dat, "window=firealarm") onclose(user, "firealarm") else diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index f579873701..da62da6f17 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -33,7 +33,7 @@ /obj/item/toy/prize/odysseus = 1, /obj/item/toy/prize/phazon = 1, /obj/item/toy/waterflower = 1, - /obj/random/action_figure = 1, + /obj/random/action_figure = 1, /obj/random/plushie = 1, /obj/item/toy/cultsword = 1 ) @@ -69,10 +69,11 @@ dat += "

    [src.temp]

    " dat += "
    Health: [src.player_hp] | Magic: [src.player_mp] | Enemy Health: [src.enemy_hp]
    " + dat += "
    " if (src.gameover) - dat += "
    New Game" + dat += "New Game" else - dat += "
    Attack | " + dat += "Attack | " dat += "Heal | " dat += "Recharge Power" diff --git a/code/game/machinery/computer/lockdown.dm b/code/game/machinery/computer/lockdown.dm deleted file mode 100644 index fd702e5510..0000000000 --- a/code/game/machinery/computer/lockdown.dm +++ /dev/null @@ -1,153 +0,0 @@ -//this computer displays status and remotely activates multiple shutters / blast doors -//todo: lock / electrify specified area doors? might be a bit gamebreaking - -/obj/machinery/computer/lockdown - //for reference - /*name = "lockdown control" - desc = "Used to control blast doors." - icon_state = "lockdown" - circuit = "/obj/item/weapon/circuitboard/lockdown" - var/connected_doors - var/department*/ - var/list/displayedNetworks - - New() - ..() - connected_doors = new/list() - displayedNetworks = new/list() - //only load blast doors for map-defined departments for the moment - //door networks are hardcoded here. - switch(department) - if("Engineering") - connected_doors.Add("Engineering") - //Antiqua Engineering - connected_doors.Add("Reactor core") - connected_doors.Add("Control Room") - connected_doors.Add("Vent Seal") - connected_doors.Add("Rig Storage") - connected_doors.Add("Fore Port Shutters") - connected_doors.Add("Fore Starboard Shutters") - connected_doors.Add("Electrical Storage Shutters") - connected_doors.Add("Locker Room Shutters") - connected_doors.Add("Breakroom Shutters") - connected_doors.Add("Observation Shutters") - //exodus engineering - if("Medbay") - //Exodus Medbay - connected_doors.Add("Genetics Outer Shutters") - connected_doors.Add("Genetics Inner Shutters") - connected_doors.Add("Chemistry Outer Shutters") - connected_doors.Add("Observation Shutters") - connected_doors.Add("Patient Room 1 Shutters") - connected_doors.Add("Patient Room 2 Shutters") - connected_doors.Add("Patient Room 3 Shutters") - - for(var/net in connected_doors) - connected_doors[net] = new/list() - - //loop through the world, grabbing all the relevant doors - spawn(1) - ConnectDoors() - - proc/ConnectDoors() - for(var/list/L in connected_doors) - for(var/item in L) - L.Remove(item) - // - for(var/obj/machinery/door/poddoor/D in world) - if(D.network in connected_doors) - var/list/L = connected_doors[D.network] - L.Add(D) - - attack_ai(mob/user) - attack_hand(user) - - attack_hand(mob/user) - add_fingerprint(user) - if(stat & (BROKEN|NOPOWER)) - return - - if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) ) - if (!istype(user, /mob/living/silicon)) - user.machine = null - user << browse(null, "window=lockdown") - return - - var/t = "Lockdown Control
    " - t += "Refresh
    " - t += "Close
    " - t += "" - var/empty = 1 - for(var/curNetId in connected_doors) - var/list/L = connected_doors[curNetId] - if(!L || L.len == 0) - continue - empty = 0 - t += "" - if(curNetId in displayedNetworks) - t += "" - t += "" - t += "" - - for(var/obj/machinery/door/poddoor/D in connected_doors[curNetId]) - t += "" - t += "" - - if(istype(D,/obj/machinery/door/poddoor/shutters)) - t += "" - else - t += "" - t += "" - t += "" - else - t += "" - t += "
    \[-\] " + curNetId + "Open all / Close all
    [D.id]Shutter ([D.density ? "Closed" : "Open"])Blast door ([D.density ? "Closed" : "Open"])Toggle
    \[+\] " + curNetId + "
    " - if(empty) - t += "No networks connected.
    " - t += "Refresh
    " - t += "Close
    " - user << browse(t, "window=lockdown;size=550x600") - onclose(user, "lockdown") - - Topic(href, href_list) - if(..()) return 1 - - if( href_list["close"] ) - usr << browse(null, "window=lockdown") - usr.machine = null - - if( href_list["show_net"] ) - displayedNetworks.Add(href_list["show_net"]) - updateDialog() - - if( href_list["hide_net"] ) - if(href_list["hide_net"] in displayedNetworks) - displayedNetworks.Remove(href_list["hide_net"]) - updateDialog() - - if( href_list["toggle_id"] ) - var/idTag = href_list["toggle_id"] - for(var/net in connected_doors) - for(var/obj/machinery/door/poddoor/D in connected_doors[net]) - if(D.id == idTag) - if(D.density) - D.open() - else - D.close() - break - - if( href_list["open_net"] ) - var/netTag = href_list["open_net"] - for(var/obj/machinery/door/poddoor/D in connected_doors[netTag]) - if(D.density) //for some reason, there's no var saying whether the door is open or not >.> - spawn(0) - D.open() - - if( href_list["close_net"] ) - var/netTag = href_list["close_net"] - for(var/obj/machinery/door/poddoor/D in connected_doors[netTag]) - if(!D.density) - spawn(0) - D.close() - - src.updateDialog() diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index 779e2a1460..10a3b6f9e0 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -213,7 +213,7 @@ [customjob] [customrecepient ? customrecepient.owner : "NONE"] [custommessage]"} - dat += "
    Send" + dat += "
    Send
    " //Request Console Logs if(4) diff --git a/code/game/machinery/computer3/computers/HolodeckControl.dm b/code/game/machinery/computer3/computers/HolodeckControl.dm index 99424b9685..fc781430c4 100644 --- a/code/game/machinery/computer3/computers/HolodeckControl.dm +++ b/code/game/machinery/computer3/computers/HolodeckControl.dm @@ -26,12 +26,12 @@ if(!interactable()) return var/dat = "

    Current Loaded Programs

    " - dat += "((Empty Court)
    )
    " - dat += "((Boxing Court)
    )
    " - dat += "((Basketball Court)
    )
    " - dat += "((Thunderdome Court)
    )
    " - dat += "((Beach)
    )
    " -// dat += "((Shutdown System)
    )
    " + dat += "((Empty Court))
    " + dat += "((Boxing Court))
    " + dat += "((Basketball Court))
    " + dat += "((Thunderdome Court))
    " + dat += "((Beach))
    " +// dat += "((Shutdown System))
    " dat += "Please ensure that only holographic weapons are used in the holodeck if a combat simulation has been loaded.
    " diff --git a/code/game/machinery/computer3/computers/arcade.dm b/code/game/machinery/computer3/computers/arcade.dm index 746551079b..33282ff192 100644 --- a/code/game/machinery/computer3/computers/arcade.dm +++ b/code/game/machinery/computer3/computers/arcade.dm @@ -75,11 +75,12 @@ dat += "

    [temp]

    " dat += "
    Health: [player_hp] | Magic: [player_mp] | Enemy Health: [enemy_hp]
    " + dat += "
    " if (gameover) - dat += "
    [topic_link(src,"newgame","New Game")]" + dat += "[topic_link(src,"newgame","New Game")]" else - dat += "
    [topic_link(src,"attack","Attack")] | [topic_link(src,"heal","Heal")] | [topic_link(src,"charge","Recharge Power")]" + dat += "[topic_link(src,"attack","Attack")] | [topic_link(src,"heal","Heal")] | [topic_link(src,"charge","Recharge Power")]" dat += "
    " diff --git a/code/game/machinery/computer3/computers/card.dm b/code/game/machinery/computer3/computers/card.dm index 3633252a46..a1a53ac769 100644 --- a/code/game/machinery/computer3/computers/card.dm +++ b/code/game/machinery/computer3/computers/card.dm @@ -35,7 +35,7 @@ var jobs_all = "" jobs_all += "" - jobs_all += ""//Captain in special because he is head of heads ~Intercross21 + jobs_all += ""//Captain in special because he is head of heads ~Intercross21 jobs_all += "" jobs_all += "" diff --git a/code/game/machinery/computer3/computers/crew.dm b/code/game/machinery/computer3/computers/crew.dm index 836500a344..2098d79f02 100644 --- a/code/game/machinery/computer3/computers/crew.dm +++ b/code/game/machinery/computer3/computers/crew.dm @@ -50,7 +50,7 @@ for(var/log in logs) t += log t += "
    Command
    Special
    SpecialCaptainCustom
    " - t += "
    " + t += "" popup.set_content(t) popup.open() diff --git a/code/game/machinery/computer3/computers/prisoner.dm b/code/game/machinery/computer3/computers/prisoner.dm index c1d7a664c6..0c7937d39a 100644 --- a/code/game/machinery/computer3/computers/prisoner.dm +++ b/code/game/machinery/computer3/computers/prisoner.dm @@ -49,7 +49,7 @@ if(T.malfunction) loc_display = pick(teleportlocs) dat += "ID: [T.id] | Location: [loc_display]
    " - dat += "(Send Message
    ) |
    " + dat += "(Send Message) |
    " dat += "********************************
    " dat += "
    Lock Console" diff --git a/code/game/machinery/computer3/lapvend.dm b/code/game/machinery/computer3/lapvend.dm index 0c038b6c87..be030b526a 100644 --- a/code/game/machinery/computer3/lapvend.dm +++ b/code/game/machinery/computer3/lapvend.dm @@ -67,14 +67,14 @@ var/dat = "
    [vendorname]


    " //display the name, and added a horizontal rule if(vendmode == 0) dat += "
    Please choose your laptop customization options

    " - dat += "
    Your comptuer will automatically be loaded with any programs you can use after the transaction is complete." + dat += "
    Your comptuer will automatically be loaded with any programs you can use after the transaction is complete.
    " dat += "
    Some programs will require additional components to be installed!


    " dat += "
    HDD (Required) : Added

    " - dat += "
    Card Reader : Single (50) | Dual (125)
    " - dat += "
    Floppy Drive: Add (50)
    " - dat += "
    Radio Network card Add (50)
    " - dat += "
    Camera Card Add (100)
    " - dat += "
    Network card Area (75) Adjacent (50)Powernet (25)
    " + dat += "
    Card Reader : Single (50) | Dual (125)

    " + dat += "
    Floppy Drive: Add (50)

    " + dat += "
    Radio Network card Add (50)

    " + dat += "
    Camera Card Add (100)

    " + dat += "
    Network card Area (75) Adjacent (50)Powernet (25)

    " dat += "
    Power source upgrade
    Extended (175) Unreal (250)" if(vendmode == 0 || vendmode == 1) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index ff974fbe19..adc8c99f6a 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -417,7 +417,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co dat+="Channel messages listed below. If you deem them dangerous to the station, you can Bestow a D-Notice upon the channel.
    " if(src.viewing_channel.censored) dat+="ATTENTION: This channel has been deemed as threatening to the welfare of the station, and marked with a Nanotrasen D-Notice.
    " - dat+="No further feed story additions are allowed while the D-Notice is in effect.

    " + dat+="No further feed story additions are allowed while the D-Notice is in effect.

    " else if( isemptylist(src.viewing_channel.messages) ) dat+="No feed messages found in channel...
    " diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index ac561009b6..63f13ebf75 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -99,8 +99,8 @@ if(src.panelopen) //The maintenance panel is open. Time for some shady stuff dat+= "Suit storage unit: Maintenance panel" dat+= "Maintenance panel controls
    " - dat+= "The panel is ridden with controls, button and meters, labeled in strange signs and symbols that
    you cannot understand. Probably the manufactoring world's language.
    Among other things, a few controls catch your eye.

    " - dat+= text("A small dial with a small lambda symbol on it. It's pointing towards a gauge that reads [].
    Turn towards []
    ",(src.issuperUV ? "15nm" : "185nm"),src,(src.issuperUV ? "185nm" : "15nm") ) + dat+= "The panel is ridden with controls, button and meters, labeled in strange signs and symbols that
    you cannot understand. Probably the manufactoring world's language.
    Among other things, a few controls catch your eye.


    " + dat+= text("A small dial with a small lambda symbol on it. It's pointing towards a gauge that reads [].
    Turn towards []
    ",(src.issuperUV ? "15nm" : "185nm"),src,(src.issuperUV ? "185nm" : "15nm") ) dat+= text("A thick old-style button, with 2 grimy LED lights next to it. The [] LED is on.
    Press button",(src.safetieson? "GREEN" : "RED"),src) dat+= text("

    Close panel", user) //user << browse(dat, "window=ssu_m_panel;size=400x500") @@ -116,7 +116,7 @@ if(!src.isbroken) dat+= "Suit storage unit" dat+= "U-Stor-It Suit Storage Unit, model DS1900
    " - dat+= "Welcome to the Unit control panel.
    " + dat+= "Welcome to the Unit control panel.

    " dat+= text("Helmet storage compartment: []
    ",(src.HELMET ? HELMET.name : "
    No helmet detected.") ) if(HELMET && src.isopen) dat+=text("Dispense helmet
    ",src) @@ -755,7 +755,7 @@ return ..() - + /obj/machinery/suit_cycler/emag_act(var/remaining_charges, var/mob/user) if(emagged) user << "The cycler has already been subverted." @@ -811,7 +811,7 @@ dat += "\[select power level\] \[begin decontamination cycle\]

    " dat += "

    Customisation

    " - dat += "Target product: [target_department], [target_species]." + dat += "Target product: [target_department], [target_species]." dat += "
    \[apply customisation routine\]


    " if(panel_open) diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm index 2f6165a733..ae9a4d7b09 100644 --- a/code/game/machinery/telecomms/logbrowser.dm +++ b/code/game/machinery/telecomms/logbrowser.dm @@ -92,7 +92,7 @@ else if(C.input_type == "Execution Error") - dat += "
  • [C.name] \[X\]
    " + dat += "
  • [C.name] \[X\]
    " dat += "Output: \"[C.parameters["message"]]\"
    " dat += "

  • " @@ -135,7 +135,7 @@ if("scan") if(servers.len > 0) - temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -" + temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -" else for(var/obj/machinery/telecomms/server/T in range(25, src)) @@ -143,9 +143,9 @@ servers.Add(T) if(!servers.len) - temp = "- FAILED: UNABLE TO LOCATE SERVERS IN \[[network]\] -" + temp = "- FAILED: UNABLE TO LOCATE SERVERS IN \[[network]\] -" else - temp = "- [servers.len] SERVERS PROBED & BUFFERED -" + temp = "- [servers.len] SERVERS PROBED & BUFFERED -" screen = 0 @@ -159,13 +159,13 @@ var/datum/comm_log_entry/D = SelectedServer.log_entries[text2num(href_list["delete"])] - temp = "- DELETED ENTRY: [D.name] -" + temp = "- DELETED ENTRY: [D.name] -" SelectedServer.log_entries.Remove(D) qdel(D) else - temp = "- FAILED: NO SELECTED MACHINE -" + temp = "- FAILED: NO SELECTED MACHINE -" if(href_list["network"]) @@ -173,14 +173,14 @@ if(newnet && ((usr in range(1, src) || issilicon(usr)))) if(length(newnet) > 15) - temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -" + temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -" else network = newnet screen = 0 servers = list() - temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -" + temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -" updateUsrDialog() return diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 15c627420f..2859083c9d 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -231,7 +231,7 @@ /obj/machinery/telecomms/processor/Options_Topic(href, href_list) if(href_list["process"]) - temp = "-% Processing mode changed. %-" + temp = "-% Processing mode changed. %-" src.process_mode = !src.process_mode */ @@ -249,18 +249,18 @@ if(href_list["receive"]) receiving = !receiving - temp = "-% Receiving mode changed. %-" + temp = "-% Receiving mode changed. %-" if(href_list["broadcast"]) broadcasting = !broadcasting - temp = "-% Broadcasting mode changed. %-" + temp = "-% Broadcasting mode changed. %-" if(href_list["change_listening"]) //Lock to the station OR lock to the current position! //You need at least two receivers and two broadcasters for this to work, this includes the machine. var/result = toggle_level() if(result) - temp = "-% [src]'s signal has been successfully changed." + temp = "-% [src]'s signal has been successfully changed." else - temp = "-% [src] could not lock it's signal onto the station. Two broadcasters or receivers required." + temp = "-% [src] could not lock it's signal onto the station. Two broadcasters or receivers required." // BUS @@ -279,10 +279,10 @@ newfreq *= 10 // shift the decimal one place if(newfreq < 10000) change_frequency = newfreq - temp = "-% New frequency to change to assigned: \"[newfreq] GHz\" %-" + temp = "-% New frequency to change to assigned: \"[newfreq] GHz\" %-" else change_frequency = 0 - temp = "-% Frequency changing deactivated %-" + temp = "-% Frequency changing deactivated %-" /obj/machinery/telecomms/Topic(href, href_list) @@ -302,27 +302,27 @@ if("toggle") src.toggled = !src.toggled - temp = "-% [src] has been [src.toggled ? "activated" : "deactivated"]." + temp = "-% [src] has been [src.toggled ? "activated" : "deactivated"]." update_power() /* if("hide") src.hide = !hide - temp = "-% Shadow Link has been [src.hide ? "activated" : "deactivated"]." + temp = "-% Shadow Link has been [src.hide ? "activated" : "deactivated"]." */ if("id") var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID for this machine", src, id) as null|text),1,MAX_MESSAGE_LEN) if(newid && canAccess(usr)) id = newid - temp = "-% New ID assigned: \"[id]\" %-" + temp = "-% New ID assigned: \"[id]\" %-" if("network") var/newnet = input(usr, "Specify the new network for this machine. This will break all current links.", src, network) as null|text if(newnet && canAccess(usr)) if(length(newnet) > 15) - temp = "-% Too many characters in new network tag %-" + temp = "-% Too many characters in new network tag %-" else for(var/obj/machinery/telecomms/T in links) @@ -330,7 +330,7 @@ network = newnet links = list() - temp = "-% New network tag assigned: \"[network]\" %-" + temp = "-% New network tag assigned: \"[network]\" %-" if("freq") @@ -340,21 +340,21 @@ newfreq *= 10 // shift the decimal one place if(!(newfreq in freq_listening) && newfreq < 10000) freq_listening.Add(newfreq) - temp = "-% New frequency filter assigned: \"[newfreq] GHz\" %-" + temp = "-% New frequency filter assigned: \"[newfreq] GHz\" %-" if(href_list["delete"]) // changed the layout about to workaround a pesky runtime -- Doohl var/x = text2num(href_list["delete"]) - temp = "-% Removed frequency filter [x] %-" + temp = "-% Removed frequency filter [x] %-" freq_listening.Remove(x) if(href_list["unlink"]) if(text2num(href_list["unlink"]) <= length(links)) var/obj/machinery/telecomms/T = links[text2num(href_list["unlink"])] - temp = "-% Removed \ref[T] [T.name] from linked entities. %-" + temp = "-% Removed \ref[T] [T.name] from linked entities. %-" // Remove link entries from both T and src. @@ -372,20 +372,20 @@ if(!(P.buffer in src.links)) src.links.Add(P.buffer) - temp = "-% Successfully linked with \ref[P.buffer] [P.buffer.name] %-" + temp = "-% Successfully linked with \ref[P.buffer] [P.buffer.name] %-" else - temp = "-% Unable to acquire buffer %-" + temp = "-% Unable to acquire buffer %-" if(href_list["buffer"]) P.buffer = src - temp = "-% Successfully stored \ref[P.buffer] [P.buffer.name] in buffer %-" + temp = "-% Successfully stored \ref[P.buffer] [P.buffer.name] in buffer %-" if(href_list["flush"]) - temp = "-% Buffer successfully flushed. %-" + temp = "-% Buffer successfully flushed. %-" P.buffer = null src.Options_Topic(href, href_list) diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm index 7dd30dd8c3..fbccf50687 100644 --- a/code/game/machinery/telecomms/telemonitor.dm +++ b/code/game/machinery/telecomms/telemonitor.dm @@ -92,7 +92,7 @@ if("probe") if(machinelist.len > 0) - temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -" + temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -" else for(var/obj/machinery/telecomms/T in range(25, src)) @@ -100,9 +100,9 @@ machinelist.Add(T) if(!machinelist.len) - temp = "- FAILED: UNABLE TO LOCATE NETWORK ENTITIES IN \[[network]\] -" + temp = "- FAILED: UNABLE TO LOCATE NETWORK ENTITIES IN \[[network]\] -" else - temp = "- [machinelist.len] ENTITIES LOCATED & BUFFERED -" + temp = "- [machinelist.len] ENTITIES LOCATED & BUFFERED -" screen = 0 @@ -112,13 +112,13 @@ var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text if(newnet && ((usr in range(1, src) || issilicon(usr)))) if(length(newnet) > 15) - temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -" + temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -" else network = newnet screen = 0 machinelist = list() - temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -" + temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -" updateUsrDialog() return diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm index 1123733103..cf56d0af9d 100644 --- a/code/game/machinery/telecomms/traffic_control.dm +++ b/code/game/machinery/telecomms/traffic_control.dm @@ -147,7 +147,7 @@ if("scan") if(servers.len > 0) - temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -" + temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -" else for(var/obj/machinery/telecomms/server/T in range(25, src)) @@ -155,9 +155,9 @@ servers.Add(T) if(!servers.len) - temp = "- FAILED: UNABLE TO LOCATE SERVERS IN \[[network]\] -" + temp = "- FAILED: UNABLE TO LOCATE SERVERS IN \[[network]\] -" else - temp = "- [servers.len] SERVERS PROBED & BUFFERED -" + temp = "- [servers.len] SERVERS PROBED & BUFFERED -" screen = 0 @@ -194,14 +194,14 @@ if(newnet && ((usr in range(1, src) || issilicon(usr)))) if(length(newnet) > 15) - temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -" + temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -" else network = newnet screen = 0 servers = list() - temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -" + temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -" updateUsrDialog() return diff --git a/code/game/mecha/combat/marauder.dm b/code/game/mecha/combat/marauder.dm index bf23e579f3..5b456e0900 100644 --- a/code/game/mecha/combat/marauder.dm +++ b/code/game/mecha/combat/marauder.dm @@ -136,7 +136,7 @@ if(get_charge() > 0) thrusters = !thrusters src.log_message("Toggled thrusters.") - src.occupant_message("Thrusters [thrusters?"en":"dis"]abled.") + src.occupant_message("Thrusters [thrusters?"en":"dis"]abled.") return diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index 1c723c04ad..6d3d7cd1df 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -153,7 +153,7 @@ var/global/list/image/splatter_cache=list() /obj/effect/decal/cleanable/blood/writing/examine(mob/user) ..(user) - user << "It reads: \"[message]\"" + user << "It reads: \"[message]\"" /obj/effect/decal/cleanable/blood/gibs name = "gibs" diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index fbdb7667a1..3b1056bfed 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -1238,7 +1238,7 @@ var/global/list/obj/item/device/pda/PDAs = list() for(var/datum/disease/D in C.viruses) if(!D.hidden[SCANNER]) - user.show_message("Warning: [D.form] Detected
    \nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]") + user.show_message("Warning: [D.form] Detected\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]") if(2) if (!istype(C:dna, /datum/dna)) diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index f7fa46678b..3d04e91aec 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -181,7 +181,7 @@
    "} - else + else //
    dat += "Radio Uplink
    " dat += "Radio firmware not loaded. Please install a pAI personality to load firmware.
    " dat += {" diff --git a/code/game/objects/items/devices/violin.dm b/code/game/objects/items/devices/violin.dm index e116689c9a..2286f78714 100644 --- a/code/game/objects/items/devices/violin.dm +++ b/code/game/objects/items/devices/violin.dm @@ -271,7 +271,7 @@ Notes are played by the names of the note, and optionally, the accidental, and/or the octave number.
    By default, every note is natural and in octave 3. Defining otherwise is remembered for each note.
    Example: C,D,E,F,G,A,B will play a C major scale.
    - After a note has an accidental placed, it will be remembered: C,C4,C,C3 is C3,C4,C4,C3
    + After a note has an accidental placed, it will be remembered: C,C4,C,C3 is C3,C4,C4,C3
    Chords can be played simply by seperating each note with a hyphon: A-C#,Cn-E,E-G#,Gn-B
    A pause may be denoted by an empty chord: C,E,,C,G
    To make a chord be a different time, end it with /x, where the chord length will be length
    diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm index a9ee95db52..df1513bdc7 100644 --- a/code/game/objects/items/weapons/manuals.dm +++ b/code/game/objects/items/weapons/manuals.dm @@ -373,7 +373,7 @@

    - Weyland-Yutani - Building Better Worlds + Weyland-Yutani - Building Better Worlds

    Autonomous Power Loader Unit \"Ripley\"

    Specifications:

    @@ -384,7 +384,7 @@
  • Height: 2.5m
  • Width: 1.8m
  • Top speed: 5km/hour
  • -
  • Operation in vacuum/hostile environment: Possible +
  • Operation in vacuum/hostile environment: Possible
  • Airtank volume: 500 liters
  • Devices:
      diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index 44be447393..afbb502c23 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -9,7 +9,7 @@ * Banhammer */ /obj/item/weapon/banhammer/attack(mob/M as mob, mob/user as mob) - M << " You have been banned FOR NO REISIN by [user]" + M << " You have been banned FOR NO REISIN by [user]" user << " You have BANNED [M]" /* diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm index d4930acea7..fa53637f88 100644 --- a/code/game/objects/structures/musician.dm +++ b/code/game/objects/structures/musician.dm @@ -291,7 +291,7 @@ Notes are played by the names of the note, and optionally, the accidental, and/or the octave number.
      By default, every note is natural and in octave 3. Defining otherwise is remembered for each note.
      Example: C,D,E,F,G,A,B will play a C major scale.
      - After a note has an accidental placed, it will be remembered: C,C4,C,C3 is C3,C4,C4,C3

      + After a note has an accidental placed, it will be remembered: C,C4,C,C3 is C3,C4,C4,C3
      Chords can be played simply by seperating each note with a hyphon: A-C#,Cn-E,E-G#,Gn-B
      A pause may be denoted by an empty chord: C,E,,C,G
      To make a chord be a different time, end it with /x, where the chord length will be length
      diff --git a/code/game/response_team.dm b/code/game/response_team.dm index 79a2cf1fdc..da35f34c46 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -51,7 +51,7 @@ client/verb/JoinResponseTeam() usr << "No emergency response team is currently being sent." return if(jobban_isbanned(usr, "Syndicate") || jobban_isbanned(usr, "Emergency Response Team") || jobban_isbanned(usr, "Security Officer")) - usr << "You are jobbanned from the emergency reponse team!" + usr << "You are jobbanned from the emergency reponse team!" return if(ert.current_antagonists.len > 5) usr << "The emergency response team is already full!" diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index cc26d7153d..9a2d6192af 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -430,9 +430,9 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) if("TEMPBAN") typedesc = "TEMPBAN
      ([duration] minutes [(unbanned) ? "" : "(Edit))"]
      Expires [expiration]
      " if("JOB_PERMABAN") - typedesc = "JOBBAN
      ([job])" + typedesc = "JOBBAN
      ([job])" if("JOB_TEMPBAN") - typedesc = "TEMP JOBBAN
      ([job])
      ([duration] minutes
      Expires [expiration]" + typedesc = "TEMP JOBBAN
      ([job])
      ([duration] minutes
      Expires [expiration]
      " output += "" output += "[typedesc]" diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 447178ecb3..993b37454f 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -58,7 +58,7 @@ proc/admin_notice(var/message, var/rights) TP - PM - SM - - [admin_jump_link(M, src)]\]

      + [admin_jump_link(M, src)]\]
      Mob type = [M.type]

      Kick | Warn | @@ -335,7 +335,7 @@ proc/admin_notice(var/message, var/rights) if(0) dat += {"Welcome to the admin newscaster.
      Here you can add, edit and censor every newspiece on the network.
      Feed channels and stories entered through here will be uneditable and handled as official news by the rest of the units. -
      Note that this panel allows full freedom over the news network, there are no constrictions except the few basic ones. Don't break things!
      +
      Note that this panel allows full freedom over the news network, there are no constrictions except the few basic ones. Don't break things! "} if(news_network.wanted_issue) dat+= "
      Read Wanted Issue" @@ -420,7 +420,7 @@ proc/admin_notice(var/message, var/rights) if(src.admincaster_feed_channel.censored) dat+={" ATTENTION: This channel has been deemed as threatening to the welfare of the station, and marked with a Nanotrasen D-Notice.
      - No further feed story additions are allowed while the D-Notice is in effect.


      + No further feed story additions are allowed while the D-Notice is in effect.

      "} else if( isemptylist(src.admincaster_feed_channel.messages) ) @@ -487,7 +487,7 @@ proc/admin_notice(var/message, var/rights) if(src.admincaster_feed_channel.censored) dat+={" ATTENTION: This channel has been deemed as threatening to the welfare of the station, and marked with a Nanotrasen D-Notice.
      - No further feed story additions are allowed while the D-Notice is in effect.


      + No further feed story additions are allowed while the D-Notice is in effect.

      "} else if( isemptylist(src.admincaster_feed_channel.messages) ) @@ -727,7 +727,7 @@ proc/admin_notice(var/message, var/rights) if(confirm == "Cancel") return if(confirm == "Yes") - world << "\red Restarting world! \blue Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!" + world << "Restarting world! Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!" log_admin("[key_name(usr)] initiated a reboot.") feedback_set_details("end_error","admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]") diff --git a/code/modules/admin/admin_report.dm b/code/modules/admin/admin_report.dm index b0f43741d0..c5cff737ee 100644 --- a/code/modules/admin/admin_report.dm +++ b/code/modules/admin/admin_report.dm @@ -1,180 +1,180 @@ -// Reports are a way to notify admins of wrongdoings that happened -// while no admin was present. They work a bit similar to news, but -// they can only be read by admins and moderators. - -// a single admin report -datum/admin_report/var - ID // the ID of the report - body // the content of the report - author // key of the author - date // date on which this was created - done // whether this was handled - - offender_key // store the key of the offender - offender_cid // store the cid of the offender - -datum/report_topic_handler - Topic(href,href_list) - ..() - var/client/C = locate(href_list["client"]) - if(href_list["action"] == "show_reports") - C.display_admin_reports() - else if(href_list["action"] == "remove") - C.mark_report_done(text2num(href_list["ID"])) - else if(href_list["action"] == "edit") - C.edit_report(text2num(href_list["ID"])) - -var/datum/report_topic_handler/report_topic_handler - -world/New() - ..() - report_topic_handler = new - -// add a new news datums -proc/make_report(body, author, okey, cid) - var/savefile/Reports = new("data/reports.sav") - var/list/reports - var/lastID - - Reports["reports"] >> reports - Reports["lastID"] >> lastID - - if(!reports) reports = list() - if(!lastID) lastID = 0 - - var/datum/admin_report/created = new() - created.ID = ++lastID - created.body = body - created.author = author - created.date = world.realtime - created.done = 0 - created.offender_key = okey - created.offender_cid = cid - - reports.Insert(1, created) - - Reports["reports"] << reports - Reports["lastID"] << lastID - -// load the reports from disk -proc/load_reports() - var/savefile/Reports = new("data/reports.sav") - var/list/reports - - Reports["reports"] >> reports - - if(!reports) reports = list() - - return reports - -// check if there are any unhandled reports -client/proc/unhandled_reports() - if(!src.holder) return 0 - var/list/reports = load_reports() - - for(var/datum/admin_report/N in reports) - if(N.done) - continue - else return 1 - - return 0 - -// checks if the player has an unhandled report against him -client/proc/is_reported() - var/list/reports = load_reports() - - for(var/datum/admin_report/N in reports) if(!N.done) - if(N.offender_key == src.key) - return 1 - - return 0 - -// display only the reports that haven't been handled -client/proc/display_admin_reports() - set category = "Admin" - set name = "Display Admin Reports" - if(!src.holder) return - - var/list/reports = load_reports() - - var/output = "" - if(unhandled_reports()) - // load the list of unhandled reports - for(var/datum/admin_report/N in reports) - if(N.done) - continue - output += "Reported player: [N.offender_key](CID: [N.offender_cid])
      " - output += "Offense:[N.body]
      " - output += "Occured at [time2text(N.date,"MM/DD hh:mm:ss")]
      " - output += "authored by [N.author]
      " - output += " Flag as Handled" - if(src.key == N.author) - output += " Edit" - output += "
      " - output += "
      " - else - output += "Whoops, no reports!" - - usr << browse(output, "window=news;size=600x400") - - -client/proc/Report(mob/M as mob in world) - set category = "Admin" - if(!src.holder) - return - - var/CID = "Unknown" - if(M.client) - CID = M.client.computer_id - - var/body = input(src.mob, "Describe in detail what you're reporting [M] for", "Report") as null|text - if(!body) return - - - make_report(body, key, M.key, CID) - - spawn(1) - display_admin_reports() - -client/proc/mark_report_done(ID as num) - if(!src.holder || src.holder.level < 0) - return - - var/savefile/Reports = new("data/reports.sav") - var/list/reports - - Reports["reports"] >> reports - - var/datum/admin_report/found - for(var/datum/admin_report/N in reports) - if(N.ID == ID) - found = N - if(!found) src << "* An error occured, sorry." - - found.done = 1 - - Reports["reports"] << reports - - -client/proc/edit_report(ID as num) - if(!src.holder || src.holder.level < 0) - src << "You tried to modify the news, but you're not an admin!" - return - - var/savefile/Reports = new("data/reports.sav") - var/list/reports - - Reports["reports"] >> reports - - var/datum/admin_report/found - for(var/datum/admin_report/N in reports) - if(N.ID == ID) - found = N - if(!found) src << "* An error occured, sorry." - - var/body = input(src.mob, "Enter a body for the news", "Body") as null|message - if(!body) return - - found.body = body - - Reports["reports"] << reports +// Reports are a way to notify admins of wrongdoings that happened +// while no admin was present. They work a bit similar to news, but +// they can only be read by admins and moderators. + +// a single admin report +datum/admin_report/var + ID // the ID of the report + body // the content of the report + author // key of the author + date // date on which this was created + done // whether this was handled + + offender_key // store the key of the offender + offender_cid // store the cid of the offender + +datum/report_topic_handler + Topic(href,href_list) + ..() + var/client/C = locate(href_list["client"]) + if(href_list["action"] == "show_reports") + C.display_admin_reports() + else if(href_list["action"] == "remove") + C.mark_report_done(text2num(href_list["ID"])) + else if(href_list["action"] == "edit") + C.edit_report(text2num(href_list["ID"])) + +var/datum/report_topic_handler/report_topic_handler + +world/New() + ..() + report_topic_handler = new + +// add a new news datums +proc/make_report(body, author, okey, cid) + var/savefile/Reports = new("data/reports.sav") + var/list/reports + var/lastID + + Reports["reports"] >> reports + Reports["lastID"] >> lastID + + if(!reports) reports = list() + if(!lastID) lastID = 0 + + var/datum/admin_report/created = new() + created.ID = ++lastID + created.body = body + created.author = author + created.date = world.realtime + created.done = 0 + created.offender_key = okey + created.offender_cid = cid + + reports.Insert(1, created) + + Reports["reports"] << reports + Reports["lastID"] << lastID + +// load the reports from disk +proc/load_reports() + var/savefile/Reports = new("data/reports.sav") + var/list/reports + + Reports["reports"] >> reports + + if(!reports) reports = list() + + return reports + +// check if there are any unhandled reports +client/proc/unhandled_reports() + if(!src.holder) return 0 + var/list/reports = load_reports() + + for(var/datum/admin_report/N in reports) + if(N.done) + continue + else return 1 + + return 0 + +// checks if the player has an unhandled report against him +client/proc/is_reported() + var/list/reports = load_reports() + + for(var/datum/admin_report/N in reports) if(!N.done) + if(N.offender_key == src.key) + return 1 + + return 0 + +// display only the reports that haven't been handled +client/proc/display_admin_reports() + set category = "Admin" + set name = "Display Admin Reports" + if(!src.holder) return + + var/list/reports = load_reports() + + var/output = "" + if(unhandled_reports()) + // load the list of unhandled reports + for(var/datum/admin_report/N in reports) + if(N.done) + continue + output += "Reported player: [N.offender_key](CID: [N.offender_cid])
      " + output += "Offense:[N.body]
      " + output += "Occured at [time2text(N.date,"MM/DD hh:mm:ss")]
      " + output += "authored by [N.author]
      " + output += " Flag as Handled" + if(src.key == N.author) + output += " Edit" + output += "
      " + output += "
      " + else + output += "Whoops, no reports!" + + usr << browse(output, "window=news;size=600x400") + + +client/proc/Report(mob/M as mob in world) + set category = "Admin" + if(!src.holder) + return + + var/CID = "Unknown" + if(M.client) + CID = M.client.computer_id + + var/body = input(src.mob, "Describe in detail what you're reporting [M] for", "Report") as null|text + if(!body) return + + + make_report(body, key, M.key, CID) + + spawn(1) + display_admin_reports() + +client/proc/mark_report_done(ID as num) + if(!src.holder || src.holder.level < 0) + return + + var/savefile/Reports = new("data/reports.sav") + var/list/reports + + Reports["reports"] >> reports + + var/datum/admin_report/found + for(var/datum/admin_report/N in reports) + if(N.ID == ID) + found = N + if(!found) src << "* An error occured, sorry." + + found.done = 1 + + Reports["reports"] << reports + + +client/proc/edit_report(ID as num) + if(!src.holder || src.holder.level < 0) + src << "You tried to modify the news, but you're not an admin!" + return + + var/savefile/Reports = new("data/reports.sav") + var/list/reports + + Reports["reports"] >> reports + + var/datum/admin_report/found + for(var/datum/admin_report/N in reports) + if(N.ID == ID) + found = N + if(!found) src << "* An error occured, sorry." + + var/body = input(src.mob, "Enter a body for the news", "Body") as null|message + if(!body) return + + found.body = body + + Reports["reports"] << reports diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index b415a317fc..4498759140 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -535,8 +535,8 @@ var/list/admin_verbs_mentor = list( ban_unban_log_save("[ckey] warned [warned_ckey], resulting in a [AUTOBANTIME] minute autoban.") if(C) message_admins("[key_name_admin(src)] has warned [key_name_admin(C)] resulting in a [AUTOBANTIME] minute ban.") - C << "You have been autobanned due to a warning by [ckey].
      This is a temporary ban, it will be removed in [AUTOBANTIME] minutes." - qdel(C) + C << "You have been autobanned due to a warning by [ckey].
      This is a temporary ban, it will be removed in [AUTOBANTIME] minutes.
      " + del(C) else message_admins("[key_name_admin(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban.") AddBan(warned_ckey, D.last_id, "Autobanning due to too many formal warnings", ckey, 1, AUTOBANTIME) diff --git a/code/modules/admin/permissionverbs/permissionedit.dm b/code/modules/admin/permissionverbs/permissionedit.dm index 3bd563aaf5..e028fb7374 100644 --- a/code/modules/admin/permissionverbs/permissionedit.dm +++ b/code/modules/admin/permissionverbs/permissionedit.dm @@ -33,7 +33,7 @@ output += "" output += "[adm_ckey] \[-\]" output += "[rank]" - output += "[rights]
      " + output += "[rights]" output += "" output += {" diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index a25d2de043..47bdeeb5af 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -290,7 +290,7 @@ - [M_name] - [M_rname] - [M_key] ([M_job]) + [M_name] - [M_rname] - [M_key] ([M_job])

      diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 1bbec85092..5519eff028 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2301,7 +2301,7 @@ if("clear_bombs") //I do nothing if("list_bombers") - var/dat = "Bombing List
      " + var/dat = "Bombing List
      " for(var/l in bombers) dat += text("[l]
      ") usr << browse(dat, "window=bombers") diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index e1ce028c13..cf8b903a84 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -865,7 +865,7 @@ Traitors and the like can also be revived with the previous role mostly intact. message_admins("Admin [key_name_admin(usr)] has forced the players to have random appearances.", 1) if(notifyplayers == "Yes") - world << "\blue Admin [usr.key] has forced the players to have completely random identities!" + world << "\blue Admin [usr.key] has forced the players to have completely random identities!" usr << "Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet." diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 0cafdb182e..752e6ed872 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -441,7 +441,7 @@ datum/preferences for (var/i in special_roles) if(special_roles[i]) //if mode is available on the server if(jobban_isbanned(user, i) || (i == "positronic brain" && jobban_isbanned(user, "AI") && jobban_isbanned(user, "Cyborg")) || (i == "pAI candidate" && jobban_isbanned(user, "pAI"))) - dat += "Be [i]: \[BANNED]
      " + dat += "Be [i]: \[BANNED]
      " else dat += "Be [i]: [src.be_special&(1<
      " n++ diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 83b2be5413..ce206392c5 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -89,7 +89,7 @@ if(src.loc == usr) usr << "The maintenance panel is [open ? "open" : "closed"]." - usr << "Hardsuit systems are [offline ? "offline" : "online"]." + usr << "Hardsuit systems are [offline ? "offline" : "online"]." /obj/item/weapon/rig/New() ..() @@ -635,7 +635,7 @@ if(!H.equip_to_slot_if_possible(use_obj, equip_to, 0)) use_obj.loc = src else - H << "Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly." + H << "Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly." if(piece == "helmet" && helmet) helmet.update_light(H) @@ -750,7 +750,7 @@ if(dam_module.damage >= 2) wearer << "The [source] has disabled your [dam_module.interface_name]!" else - wearer << "The [source] has damaged your [dam_module.interface_name]!" + wearer << "The [source] has damaged your [dam_module.interface_name]!" dam_module.deactivate() /obj/item/weapon/rig/proc/malfunction_check(var/mob/living/carbon/human/user) diff --git a/code/modules/events/comms_blackout.dm b/code/modules/events/comms_blackout.dm index 3e224a1f5c..73c2ddb70b 100644 --- a/code/modules/events/comms_blackout.dm +++ b/code/modules/events/comms_blackout.dm @@ -1,12 +1,12 @@ - -/proc/communications_blackout(var/silent = 1) - - if(!silent) - command_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/misc/interference.ogg') - else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms - for(var/mob/living/silicon/ai/A in player_list) - A << "
      " - A << "Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT" - A << "
      " - for(var/obj/machinery/telecomms/T in telecomms_list) - T.emp_act(1) + +/proc/communications_blackout(var/silent = 1) + + if(!silent) + command_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/misc/interference.ogg') + else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms + for(var/mob/living/silicon/ai/A in player_list) + A << "
      " + A << "Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT" + A << "
      " + for(var/obj/machinery/telecomms/T in telecomms_list) + T.emp_act(1) diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index 649dee1e1e..9d8ceb2603 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -44,20 +44,20 @@ if(!machine.ores_stored[ore] && !show_all_ores) continue var/ore/O = ore_data[ore] if(!O) continue - dat += "[capitalize(O.display_name)][machine.ores_stored[ore]]not processing" + dat += "not processing" if(1) - dat += "orange'>smelting" + dat += "smelting" if(2) - dat += "blue'>compressing" + dat += "compressing" if(3) - dat += "gray'>alloying" + dat += "alloying" else - dat += "red'>not processing" - dat += ".\[change\]" + dat += "not processing" + dat += ".\[change\]" dat += "
      " dat += "Currently displaying [show_all_ores ? "all ore types" : "only available ore types"]. \[[show_all_ores ? "show less" : "show more"]\]
      " diff --git a/code/modules/mob/language/synthetic.dm b/code/modules/mob/language/synthetic.dm index 708e72dd62..dbf91343f1 100644 --- a/code/modules/mob/language/synthetic.dm +++ b/code/modules/mob/language/synthetic.dm @@ -29,7 +29,7 @@ if(drone_only && !istype(S,/mob/living/silicon/robot/drone)) continue else if(istype(S , /mob/living/silicon/ai)) - message_start = "[name], [speaker.name]" + message_start = "[name], [speaker.name]" else if (!S.binarycheck()) continue diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 1faf2f7e7a..3295e67ea2 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -191,7 +191,7 @@ emp_act if(user == src) // Attacking yourself can't miss target_zone = user.zone_sel.selecting if(!target_zone) - visible_message("\red [user] misses [src] with \the [I]!") + visible_message("[user] misses [src] with \the [I]!") return 1 var/obj/item/organ/external/affecting = get_organ(target_zone) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 76a585c19f..1b04060213 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -155,7 +155,7 @@ for(var/mob/O in viewers(src, null)) if(O == src) continue - O.show_message(text("\red [src] starts having a seizure!"), 1) + O.show_message(text("[src] starts having a seizure!"), 1) Paralyse(10) make_jittery(1000) if (disabilities & COUGHING) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_console.dm b/code/modules/mob/living/silicon/robot/drone/drone_console.dm index c707f85c68..dc7c6915d0 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_console.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_console.dm @@ -29,7 +29,7 @@ for(var/mob/living/silicon/robot/drone/D in world) if(D.z != src.z) continue - dat += "
      [D.real_name] ([D.stat == 2 ? "INACTIVE" : "ACTIVE"])" + dat += "
      [D.real_name] ([D.stat == 2 ? "INACTIVE" : "ACTIVE"])" dat += "
      Cell charge: [D.cell.charge]/[D.cell.maxcharge]." dat += "
      Currently located in: [get_area(D)]." dat += "
      Resync | Shutdown
      " diff --git a/code/modules/mob/living/silicon/robot/laws.dm b/code/modules/mob/living/silicon/robot/laws.dm index 2dc3b4e391..9740c02f87 100644 --- a/code/modules/mob/living/silicon/robot/laws.dm +++ b/code/modules/mob/living/silicon/robot/laws.dm @@ -22,7 +22,7 @@ src << "Laws synced with AI, be sure to note any changes." // TODO: Update to new antagonist system. if(mind && mind.special_role == "traitor" && mind.original == src) - src << "Remember, your AI does NOT share or know about your law 0." + src << "Remember, your AI does NOT share or know about your law 0." else src << "No AI selected to sync laws with, disabling lawsync protocol." lawupdate = 0 diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index c690931c8a..ad5203bb76 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -312,7 +312,7 @@ killswitch_time -- if(killswitch_time <= 0) if(src.client) - src << "\red Killswitch Activated" + src << "Killswitch Activated" killswitch = 0 spawn(5) gib() @@ -323,7 +323,7 @@ weaponlock_time -- if(weaponlock_time <= 0) if(src.client) - src << "\red Weapon Lock Timed Out!" + src << "Weapon Lock Timed Out!" weapon_lock = 0 weaponlock_time = 120 diff --git a/code/modules/mob/living/simple_animal/constructs/constructs.dm b/code/modules/mob/living/simple_animal/constructs/constructs.dm index 65bf148ae4..847ba4909d 100644 --- a/code/modules/mob/living/simple_animal/constructs/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs/constructs.dm @@ -58,7 +58,7 @@ if(istype(user, /mob/living/simple_animal/construct/builder)) if(health < maxHealth) adjustBruteLoss(-5) - user.visible_message("\The [user] mends some of \the [src]'s wounds.
      ") + user.visible_message("\The [user] mends some of \the [src]'s wounds.") else user << "\The [src] is undamaged." return diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index f1bb76c85d..7658f28ce1 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -17,10 +17,10 @@ spawn() alert("You have logged in already with another key this round, please log out of this one NOW or risk being banned!") if(matches) if(M.client) - message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)].", 1) + message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)].", 1) log_access("Notice: [key_name(src)] has the same [matches] as [key_name(M)].") else - message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)] (no longer logged in). ", 1) + message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)] (no longer logged in). ", 1) log_access("Notice: [key_name(src)] has the same [matches] as [key_name(M)] (no longer logged in).") /mob/Login() diff --git a/code/modules/paperwork/carbonpaper.dm b/code/modules/paperwork/carbonpaper.dm index ae8357a558..32242e9669 100644 --- a/code/modules/paperwork/carbonpaper.dm +++ b/code/modules/paperwork/carbonpaper.dm @@ -1,50 +1,51 @@ -/obj/item/weapon/paper/carbon - name = "paper" - icon_state = "paper_stack" - item_state = "paper" - var copied = 0 - var iscopy = 0 - - -/obj/item/weapon/paper/carbon/update_icon() - if(iscopy) - if(info) - icon_state = "cpaper_words" - return - icon_state = "cpaper" - else if (copied) - if(info) - icon_state = "paper_words" - return - icon_state = "paper" - else - if(info) - icon_state = "paper_stack_words" - return - icon_state = "paper_stack" - - - -/obj/item/weapon/paper/carbon/verb/removecopy() - set name = "Remove carbon-copy" - set category = "Object" - set src in usr - - if (copied == 0) - var/obj/item/weapon/paper/carbon/c = src - var/copycontents = html_decode(c.info) - var/obj/item/weapon/paper/carbon/copy = new /obj/item/weapon/paper/carbon (usr.loc) - copycontents = replacetext(copycontents, "" - copy.name = "Copy - " + c.name - copy.fields = c.fields - copy.updateinfolinks() - usr << "You tear off the carbon-copy!" - c.copied = 1 - copy.iscopy = 1 - copy.update_icon() - c.update_icon() - else +/obj/item/weapon/paper/carbon + name = "paper" + icon_state = "paper_stack" + item_state = "paper" + var copied = 0 + var iscopy = 0 + + +/obj/item/weapon/paper/carbon/update_icon() + if(iscopy) + if(info) + icon_state = "cpaper_words" + return + icon_state = "cpaper" + else if (copied) + if(info) + icon_state = "paper_words" + return + icon_state = "paper" + else + if(info) + icon_state = "paper_stack_words" + return + icon_state = "paper_stack" + + + +/obj/item/weapon/paper/carbon/verb/removecopy() + set name = "Remove carbon-copy" + set category = "Object" + set src in usr + + if (copied == 0) + var/obj/item/weapon/paper/carbon/c = src + var/copycontents = html_decode(c.info) + var/obj/item/weapon/paper/carbon/copy = new /obj/item/weapon/paper/carbon (usr.loc) + // + copycontents = replacetext(copycontents, "" + copy.name = "Copy - " + c.name + copy.fields = c.fields + copy.updateinfolinks() + usr << "You tear off the carbon-copy!" + c.copied = 1 + copy.iscopy = 1 + copy.update_icon() + c.update_icon() + else usr << "There are no more carbon copies attached to this paper!" \ No newline at end of file diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 2ae10e1c35..836b5224b6 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -165,7 +165,7 @@ copied = replacetext(copied, "" + c.info += ""// c.name = copy.name // -- Doohl c.fields = copy.fields c.stamps = copy.stamps @@ -228,7 +228,7 @@ W = photocopy(W) W.loc = p p.pages += W - + p.loc = src.loc p.update_icon() p.icon_state = "paper_words" diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 5ce02cf18d..9706f9e770 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -366,7 +366,7 @@ output_level = input(usr, "Enter new output level (0-[output_level_max])", "SMES Output Power Control", output_level) as num output_level = max(0, min(output_level_max, output_level)) // clamp to range - investigate_log("input/output; [input_level>output_level?"":""][input_level]/[output_level] | Output-mode: [output_attempt?"on":"off"] | Input-mode: [input_attempt?"auto":"off"] by [usr.key]","singulo") + investigate_log("input/output; on":"off"] | Input-mode: [input_attempt?"auto":"off"] by [usr.key]","singulo") return 1 diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index 0119de8308..9492084104 100644 --- a/code/modules/power/turbine.dm +++ b/code/modules/power/turbine.dm @@ -277,7 +277,7 @@ \n
      \n"} else - dat += "\redNo compatible attached compressor found." + dat += "No compatible attached compressor found." user << browse(dat, "window=computer;size=400x500") onclose(user, "computer") diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 14e70bcfa4..170af3b215 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -233,7 +233,7 @@ if(reflex) user.visible_message( - "\The [user] fires \the [src][pointblank ? " point blank at \the [target]":""] by reflex!", + "\The [user] fires \the [src][pointblank ? " point blank at \the [target]":""] by reflex!", "You fire \the [src] by reflex!", "You hear a [fire_sound_text]!" ) diff --git a/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm b/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm index 5fbe8dcd41..a881dc6529 100644 --- a/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm +++ b/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm @@ -235,7 +235,7 @@ var/list/valid_secondary_effect_types = list(\ src.add_fingerprint(user) if(my_effect.trigger == TRIGGER_TOUCH) - user << "You touch [src]." + user << "You touch [src]." my_effect.ToggleActivate() else user << "You touch [src], [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")]." @@ -321,7 +321,7 @@ var/list/valid_secondary_effect_types = list(\ warn = 1 if(warn) - M << "You accidentally touch [src]." + M << "You accidentally touch [src]." ..() /obj/machinery/artifact/bullet_act(var/obj/item/projectile/P) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm index 1244f802cc..0d6bd0eb63 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm @@ -1,70 +1,70 @@ - -/datum/artifact_effect/badfeeling - effecttype = "badfeeling" - effect_type = 2 - var/list/messages = list("You feel worried.",\ - "Something doesn't feel right.",\ - "You get a strange feeling in your gut.",\ - "Your instincts are trying to warn you about something.",\ - "Someone just walked over your grave.",\ - "There's a strange feeling in the air.",\ - "There's a strange smell in the air.",\ - "The tips of your fingers feel tingly.",\ - "You feel witchy.",\ - "You have a terrible sense of foreboding.",\ - "You've got a bad feeling about this.",\ - "Your scalp prickles.",\ - "The light seems to flicker.",\ - "The shadows seem to lengthen.",\ - "The walls are getting closer.",\ - "Something is wrong") - - var/list/drastic_messages = list("You've got to get out of here!",\ - "Someone's trying to kill you!",\ - "There's something out there!",\ - "What's happening to you?",\ - "OH GOD!",\ - "HELP ME!") - -/datum/artifact_effect/badfeeling/DoEffectTouch(var/mob/user) - if(user) - if (istype(user, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = user - if(prob(50)) - if(prob(75)) - H << "[pick(drastic_messages)]" - else - H << "[pick(messages)]" - - if(prob(50)) - H.dizziness += rand(3,5) - -/datum/artifact_effect/badfeeling/DoEffectAura() - if(holder) - var/turf/T = get_turf(holder) - for (var/mob/living/carbon/human/H in range(src.effectrange,T)) - if(prob(5)) - if(prob(75)) - H << "[pick(messages)]" - else - H << "[pick(drastic_messages)]" - - if(prob(10)) - H.dizziness += rand(3,5) - return 1 - -/datum/artifact_effect/badfeeling/DoEffectPulse() - if(holder) - var/turf/T = get_turf(holder) - for (var/mob/living/carbon/human/H in range(src.effectrange,T)) - if(prob(50)) - if(prob(95)) - H << "[pick(drastic_messages)]" - else - H << "[pick(messages)]" - - if(prob(50)) - H.dizziness += rand(3,5) - else if(prob(25)) - H.dizziness += rand(5,15) - return 1 + +/datum/artifact_effect/badfeeling + effecttype = "badfeeling" + effect_type = 2 + var/list/messages = list("You feel worried.",\ + "Something doesn't feel right.",\ + "You get a strange feeling in your gut.",\ + "Your instincts are trying to warn you about something.",\ + "Someone just walked over your grave.",\ + "There's a strange feeling in the air.",\ + "There's a strange smell in the air.",\ + "The tips of your fingers feel tingly.",\ + "You feel witchy.",\ + "You have a terrible sense of foreboding.",\ + "You've got a bad feeling about this.",\ + "Your scalp prickles.",\ + "The light seems to flicker.",\ + "The shadows seem to lengthen.",\ + "The walls are getting closer.",\ + "Something is wrong") + + var/list/drastic_messages = list("You've got to get out of here!",\ + "Someone's trying to kill you!",\ + "There's something out there!",\ + "What's happening to you?",\ + "OH GOD!",\ + "HELP ME!") + +/datum/artifact_effect/badfeeling/DoEffectTouch(var/mob/user) + if(user) + if (istype(user, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = user + if(prob(50)) + if(prob(75)) + H << "[pick(drastic_messages)]" + else + H << "[pick(messages)]" + + if(prob(50)) + H.dizziness += rand(3,5) + +/datum/artifact_effect/badfeeling/DoEffectAura() + if(holder) + var/turf/T = get_turf(holder) + for (var/mob/living/carbon/human/H in range(src.effectrange,T)) + if(prob(5)) + if(prob(75)) + H << "[pick(messages)]" + else + H << "[pick(drastic_messages)]" + + if(prob(10)) + H.dizziness += rand(3,5) + return 1 + +/datum/artifact_effect/badfeeling/DoEffectPulse() + if(holder) + var/turf/T = get_turf(holder) + for (var/mob/living/carbon/human/H in range(src.effectrange,T)) + if(prob(50)) + if(prob(95)) + H << "[pick(drastic_messages)]" + else + H << "[pick(messages)]" + + if(prob(50)) + H.dizziness += rand(3,5) + else if(prob(25)) + H.dizziness += rand(5,15) + return 1 diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm index bc45260b2c..61719bc916 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm @@ -1,68 +1,68 @@ - -/datum/artifact_effect/goodfeeling - effecttype = "goodfeeling" - effect_type = 2 - var/list/messages = list("You feel good.",\ - "Everything seems to be going alright",\ - "You've got a good feeling about this",\ - "Your instincts tell you everything is going to be getting better.",\ - "There's a good feeling in the air.",\ - "Something smells... good.",\ - "The tips of your fingers feel tingly.",\ - "You've got a good feeling about this.",\ - "You feel happy.",\ - "You fight the urge to smile.",\ - "Your scalp prickles.",\ - "All the colours seem a bit more vibrant.",\ - "Everything seems a little lighter.",\ - "The troubles of the world seem to fade away.") - - var/list/drastic_messages = list("You want to hug everyone you meet!",\ - "Everything is going so well!",\ - "You feel euphoric.",\ - "You feel giddy.",\ - "You're so happy suddenly, you almost want to dance and sing.",\ - "You feel like the world is out to help you.") - -/datum/artifact_effect/goodfeeling/DoEffectTouch(var/mob/user) - if(user) - if (istype(user, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = user - if(prob(50)) - if(prob(75)) - H << "[pick(drastic_messages)]" - else - H << "[pick(messages)]" - - if(prob(50)) - H.dizziness += rand(3,5) - -/datum/artifact_effect/goodfeeling/DoEffectAura() - if(holder) - var/turf/T = get_turf(holder) - for (var/mob/living/carbon/human/H in range(src.effectrange,T)) - if(prob(5)) - if(prob(75)) - H << "[pick(messages)]" - else - H << "[pick(drastic_messages)]" - - if(prob(5)) - H.dizziness += rand(3,5) - return 1 - -/datum/artifact_effect/goodfeeling/DoEffectPulse() - if(holder) - var/turf/T = get_turf(holder) - for (var/mob/living/carbon/human/H in range(src.effectrange,T)) - if(prob(50)) - if(prob(95)) - H << "[pick(drastic_messages)]" - else - H << "[pick(messages)]" - - if(prob(50)) - H.dizziness += rand(3,5) - else if(prob(25)) - H.dizziness += rand(5,15) - return 1 + +/datum/artifact_effect/goodfeeling + effecttype = "goodfeeling" + effect_type = 2 + var/list/messages = list("You feel good.",\ + "Everything seems to be going alright",\ + "You've got a good feeling about this",\ + "Your instincts tell you everything is going to be getting better.",\ + "There's a good feeling in the air.",\ + "Something smells... good.",\ + "The tips of your fingers feel tingly.",\ + "You've got a good feeling about this.",\ + "You feel happy.",\ + "You fight the urge to smile.",\ + "Your scalp prickles.",\ + "All the colours seem a bit more vibrant.",\ + "Everything seems a little lighter.",\ + "The troubles of the world seem to fade away.") + + var/list/drastic_messages = list("You want to hug everyone you meet!",\ + "Everything is going so well!",\ + "You feel euphoric.",\ + "You feel giddy.",\ + "You're so happy suddenly, you almost want to dance and sing.",\ + "You feel like the world is out to help you.") + +/datum/artifact_effect/goodfeeling/DoEffectTouch(var/mob/user) + if(user) + if (istype(user, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = user + if(prob(50)) + if(prob(75)) + H << "[pick(drastic_messages)]" + else + H << "[pick(messages)]" + + if(prob(50)) + H.dizziness += rand(3,5) + +/datum/artifact_effect/goodfeeling/DoEffectAura() + if(holder) + var/turf/T = get_turf(holder) + for (var/mob/living/carbon/human/H in range(src.effectrange,T)) + if(prob(5)) + if(prob(75)) + H << "[pick(messages)]" + else + H << "[pick(drastic_messages)]" + + if(prob(5)) + H.dizziness += rand(3,5) + return 1 + +/datum/artifact_effect/goodfeeling/DoEffectPulse() + if(holder) + var/turf/T = get_turf(holder) + for (var/mob/living/carbon/human/H in range(src.effectrange,T)) + if(prob(50)) + if(prob(95)) + H << "[pick(drastic_messages)]" + else + H << "[pick(messages)]" + + if(prob(50)) + H.dizziness += rand(3,5) + else if(prob(25)) + H.dizziness += rand(5,15) + return 1 diff --git a/code/modules/research/xenoarchaeology/tools/suspension_generator.dm b/code/modules/research/xenoarchaeology/tools/suspension_generator.dm index 5dad9a1eb4..6b77e800eb 100644 --- a/code/modules/research/xenoarchaeology/tools/suspension_generator.dm +++ b/code/modules/research/xenoarchaeology/tools/suspension_generator.dm @@ -132,9 +132,9 @@ I.loc = src auth_card = I if(attempt_unlock(I, usr)) - usr << "You insert [I], the console flashes \'Access granted.\'" + usr << "You insert [I], the console flashes \'Access granted.\'" else - usr << "You insert [I], the console flashes \'Access denied.\'" + usr << "You insert [I], the console flashes \'Access denied.\'" else if(href_list["ejectcard"]) if(auth_card) if(ishuman(usr)) diff --git a/code/modules/scripting/IDE.dm b/code/modules/scripting/IDE.dm index 2e84639917..3974e2dee4 100644 --- a/code/modules/scripting/IDE.dm +++ b/code/modules/scripting/IDE.dm @@ -16,13 +16,13 @@ client/verb/tcssave() src << output(null, "tcserror") // clear the errors else src << output(null, "tcserror") - src << output("Failed to save: Unable to locate server machine. (Back up your code before exiting the window!)", "tcserror") + src << output("Failed to save: Unable to locate server machine. (Back up your code before exiting the window!)", "tcserror") else src << output(null, "tcserror") - src << output("Failed to save: Unable to locate machine. (Back up your code before exiting the window!)", "tcserror") + src << output("Failed to save: Unable to locate machine. (Back up your code before exiting the window!)", "tcserror") else src << output(null, "tcserror") - src << output("Failed to save: Unable to locate machine. (Back up your code before exiting the window!)", "tcserror") + src << output("Failed to save: Unable to locate machine. (Back up your code before exiting the window!)", "tcserror") client/verb/tcscompile() @@ -44,7 +44,7 @@ client/verb/tcscompile() if(compileerrors.len) src << output("Compile Errors", "tcserror") for(var/scriptError/e in compileerrors) - src << output("\t>[e.message]", "tcserror") + src << output("\t>[e.message]", "tcserror") src << output("([compileerrors.len] errors)", "tcserror") // Output compile errors to all other people viewing the code too @@ -53,28 +53,28 @@ client/verb/tcscompile() M << output(null, "tcserror") M << output("Compile Errors", "tcserror") for(var/scriptError/e in compileerrors) - M << output("\t>[e.message]", "tcserror") + M << output("\t>[e.message]", "tcserror") M << output("([compileerrors.len] errors)", "tcserror") else - src << output("TCS compilation successful!", "tcserror") + src << output("TCS compilation successful!", "tcserror") src << output("(0 errors)", "tcserror") for(var/mob/M in Machine.viewingcode) if(M.client) - M << output("TCS compilation successful!", "tcserror") + M << output("TCS compilation successful!", "tcserror") M << output("(0 errors)", "tcserror") else src << output(null, "tcserror") - src << output("Failed to compile: Unable to locate server machine. (Back up your code before exiting the window!)", "tcserror") + src << output("Failed to compile: Unable to locate server machine. (Back up your code before exiting the window!)", "tcserror") else src << output(null, "tcserror") - src << output("Failed to compile: Unable to locate machine. (Back up your code before exiting the window!)", "tcserror") + src << output("Failed to compile: Unable to locate machine. (Back up your code before exiting the window!)", "tcserror") else src << output(null, "tcserror") - src << output("Failed to compile: Unable to locate machine. (Back up your code before exiting the window!)", "tcserror") + src << output("Failed to compile: Unable to locate machine. (Back up your code before exiting the window!)", "tcserror") client/verb/tcsrun() set hidden = 1 @@ -95,7 +95,7 @@ client/verb/tcsrun() if(compileerrors.len) src << output("Compile Errors", "tcserror") for(var/scriptError/e in compileerrors) - src << output("\t>[e.message]", "tcserror") + src << output("\t>[e.message]", "tcserror") src << output("([compileerrors.len] errors)", "tcserror") // Output compile errors to all other people viewing the code too @@ -104,17 +104,17 @@ client/verb/tcsrun() M << output(null, "tcserror") M << output("Compile Errors", "tcserror") for(var/scriptError/e in compileerrors) - M << output("\t>[e.message]", "tcserror") + M << output("\t>[e.message]", "tcserror") M << output("([compileerrors.len] errors)", "tcserror") else // Finally, we run the code! - src << output("TCS compilation successful! Code executed.", "tcserror") + src << output("TCS compilation successful! Code executed.", "tcserror") src << output("(0 errors)", "tcserror") for(var/mob/M in Machine.viewingcode) if(M.client) - M << output("TCS compilation successful!", "tcserror") + M << output("TCS compilation successful!", "tcserror") M << output("(0 errors)", "tcserror") var/datum/signal/signal = new() @@ -133,13 +133,13 @@ client/verb/tcsrun() else src << output(null, "tcserror") - src << output("Failed to run: Unable to locate server machine. (Back up your code before exiting the window!)", "tcserror") + src << output("Failed to run: Unable to locate server machine. (Back up your code before exiting the window!)", "tcserror") else src << output(null, "tcserror") - src << output("Failed to run: Unable to locate machine. (Back up your code before exiting the window!)", "tcserror") + src << output("Failed to run: Unable to locate machine. (Back up your code before exiting the window!)", "tcserror") else src << output(null, "tcserror") - src << output("Failed to run: Unable to locate machine. (Back up your code before exiting the window!)", "tcserror") + src << output("Failed to run: Unable to locate machine. (Back up your code before exiting the window!)", "tcserror") client/verb/exittcs() @@ -174,13 +174,13 @@ client/verb/tcsrevert() src << output(null, "tcserror") // clear the errors else src << output(null, "tcserror") - src << output("Failed to revert: Unable to locate server machine.", "tcserror") + src << output("Failed to revert: Unable to locate server machine.", "tcserror") else src << output(null, "tcserror") - src << output("Failed to revert: Unable to locate machine.", "tcserror") + src << output("Failed to revert: Unable to locate machine.", "tcserror") else src << output(null, "tcserror") - src << output("Failed to revert: Unable to locate machine.", "tcserror") + src << output("Failed to revert: Unable to locate machine.", "tcserror") client/verb/tcsclearmem() @@ -196,16 +196,16 @@ client/verb/tcsclearmem() Server.memory = list() // clear the memory // Show results src << output(null, "tcserror") - src << output("Server memory cleared!", "tcserror") + src << output("Server memory cleared!", "tcserror") for(var/mob/M in Machine.viewingcode) if(M.client) - M << output("Server memory cleared!", "tcserror") + M << output("Server memory cleared!", "tcserror") else src << output(null, "tcserror") - src << output("Failed to clear memory: Unable to locate server machine.", "tcserror") + src << output("Failed to clear memory: Unable to locate server machine.", "tcserror") else src << output(null, "tcserror") - src << output("Failed to clear memory: Unable to locate machine.", "tcserror") + src << output("Failed to clear memory: Unable to locate machine.", "tcserror") else src << output(null, "tcserror") - src << output("Failed to clear memory: Unable to locate machine.", "tcserror") + src << output("Failed to clear memory: Unable to locate machine.", "tcserror") diff --git a/code/modules/scripting/Implementations/Telecomms.dm b/code/modules/scripting/Implementations/Telecomms.dm index 4fdd54f31b..87c6fa5ea3 100644 --- a/code/modules/scripting/Implementations/Telecomms.dm +++ b/code/modules/scripting/Implementations/Telecomms.dm @@ -248,7 +248,7 @@ datum/signal if(source in S.stored_names) newsign.data["name"] = source else - newsign.data["name"] = "[html_encode(uppertext(source))]" + newsign.data["name"] = "[html_encode(uppertext(source))]" newsign.data["realname"] = newsign.data["name"] newsign.data["job"] = job newsign.data["compression"] = 0 diff --git a/code/modules/shuttles/shuttles_multi.dm b/code/modules/shuttles/shuttles_multi.dm index 141cf97d8a..a7593f76ef 100644 --- a/code/modules/shuttles/shuttles_multi.dm +++ b/code/modules/shuttles/shuttles_multi.dm @@ -34,12 +34,12 @@ destination_dock_controllers[destination] = docking_controller else var/datum/computer/file/embedded_program/docking/C = locate(controller_tag) - + if(!istype(C)) world << "warning: shuttle with docking tag [controller_tag] could not find it's controller!" else destination_dock_controllers[destination] = C - + //might as well set this up here. if(origin) last_departed = origin last_location = start_location @@ -99,15 +99,15 @@ dat += "
      Toggle cloaking field
      " dat += "Move ship
      " dat += "Return to base
  • " - + //Docking dat += "


    " if(MS.skip_docking_checks()) - dat += "Docking Status: Not in use.
    " + dat += "Docking Status: Not in use." else var/override_en = MS.docking_controller.override_enabled var/docking_status = MS.docking_controller.get_docking_status() - + dat += "Docking Status: " switch(docking_status) if("undocked") @@ -118,16 +118,17 @@ dat += "Undocking" if("docked") dat += "Docked" - + if(override_en) dat += " (Override Enabled)" - + dat += ". \[Refresh\]

    " - + switch(docking_status) if("undocked") - dat += "Dock
    " + dat += "Dock" if("docked") - dat += "Undock
    " + dat += "Undock" + dat += "
    " user << browse("[dat]", "window=[shuttle_tag]shuttlecontrol;size=300x600") @@ -139,11 +140,11 @@ var/choice = alert("The shuttle is currently docked! Please undock before continuing.","Error","Cancel","Force Launch") if(choice == "Cancel") return 0 - + choice = alert("Forcing a shuttle launch while docked may result in severe injury, death and/or damage to property. Are you sure you wish to continue?", "Force Launch", "Force Launch", "Cancel") if(choice == "Cancel") return 0 - + return 1 /obj/machinery/computer/shuttle_control/multi/Topic(href, href_list) @@ -165,11 +166,11 @@ if (MS.moving_status != SHUTTLE_IDLE) usr << "\blue [shuttle_tag] vessel is moving." return - + if(href_list["dock_command"]) MS.dock() return - + if(href_list["undock_command"]) MS.undock() return @@ -178,7 +179,7 @@ if(MS.at_origin) usr << "\red You are already at your home base." return - + if((MS.last_move + MS.cooldown*10) > world.time) usr << "\red The ship's drive is inoperable while the engines are charging." return @@ -186,7 +187,7 @@ if(!check_docking(MS)) updateUsrDialog() return - + if(!MS.return_warning) usr << "\red Returning to your home base will end your mission. If you are sure, press the button again." //TODO: Actually end the mission. @@ -207,11 +208,11 @@ if((MS.last_move + MS.cooldown*10) > world.time) usr << "\red The ship's drive is inoperable while the engines are charging." return - + if(!check_docking(MS)) updateUsrDialog() return - + var/choice = input("Select a destination.") as null|anything in MS.destinations if(!choice) return diff --git a/code/modules/virus2/curer.dm b/code/modules/virus2/curer.dm index ccbbbed9a2..78884f559f 100644 --- a/code/modules/virus2/curer.dm +++ b/code/modules/virus2/curer.dm @@ -18,7 +18,7 @@ return if(istype(I,/obj/item/weapon/virusdish)) if(virusing) - user << "The pathogen materializer is still recharging.." + user << "The pathogen materializer is still recharging.." return var/obj/item/weapon/reagent_containers/glass/beaker/product = new(src.loc) From 99021724d2e3008064542422409968ae8e3575b7 Mon Sep 17 00:00:00 2001 From: Soadreqm Date: Sat, 1 Aug 2015 16:19:47 +0300 Subject: [PATCH 004/178] Increase starting genetic points to 25 --- code/game/gamemodes/changeling/changeling_powers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm index 34a81b4d61..c42c6daea9 100644 --- a/code/game/gamemodes/changeling/changeling_powers.dm +++ b/code/game/gamemodes/changeling/changeling_powers.dm @@ -12,7 +12,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E var/changelingID = "Changeling" var/geneticdamage = 0 var/isabsorbing = 0 - var/geneticpoints = 5 + var/geneticpoints = 25 var/purchasedpowers = list() var/mimicing = "" From f50e14094101ed8bb7432b53b64f625124fe99c5 Mon Sep 17 00:00:00 2001 From: Kearel Date: Mon, 3 Aug 2015 20:54:12 -0500 Subject: [PATCH 005/178] Bike --- code/modules/vehicles/bike.dm | 122 ++++++++++++++++++++++++++++++++++ icons/obj/bike.dmi | Bin 0 -> 829 bytes 2 files changed, 122 insertions(+) create mode 100644 code/modules/vehicles/bike.dm create mode 100644 icons/obj/bike.dmi diff --git a/code/modules/vehicles/bike.dm b/code/modules/vehicles/bike.dm new file mode 100644 index 0000000000..815bf47841 --- /dev/null +++ b/code/modules/vehicles/bike.dm @@ -0,0 +1,122 @@ +/obj/vehicle/bike/ + name = "space-bike" + desc = "Space wheelies! Woo! " + icon = 'icons/obj/bike.dmi' + icon_state = "bike_back_off" + dir = SOUTH + + load_item_visible = 1 + mob_offset_y = 7 + + health = 100 + maxhealth = 100 + + fire_dam_coeff = 0.6 + brute_dam_coeff = 0.5 + + var/datum/effect/effect/system/ion_trail_follow/ion + var/kickstand = 1 + +/obj/vehicle/bike/New() + ..() + ion = new /datum/effect/effect/system/ion_trail_follow() + ion.set_up(src) + turn_off() + overlays += image('icons/obj/bike.dmi', "bike_front_off", MOB_LAYER + 1) + +/obj/vehicle/bike/verb/toggle() + set name = "Toggle Engine" + set category = "Vehicle" + set src in view(0) + + if(usr.stat != 0) return + + if(!on) + turn_on() + src.visible_message("\the [src] rumbles to life.", "You hear something rumble deeply.") + else + turn_off() + src.visible_message("\the [src] putters before turning off.", "You hear something putter slowly.") + +/obj/vehicle/bike/verb/kickstand() + set name = "Toggle Kickstand" + set category = "Vehicle" + set src in view(0) + + if(usr.stat != 0) return + + if(kickstand) + src.visible_message("You put up \the [src]'s kickstand.") + else + if(istype(src.loc,/turf/space)) + usr << "\red You don't think kickstands work in space..." + return + src.visible_message("You put down \the [src]'s kickstand.") + if(pulledby) + pulledby.stop_pulling() + + kickstand = !kickstand + anchored = (kickstand || on) + +/obj/vehicle/bike/load(var/atom/movable/C) + var/mob/living/M = C + if(!istype(C)) return 0 + if(M.buckled || M.restrained() || !Adjacent(M) || !M.Adjacent(src)) + return 0 + return ..(M) + +/obj/vehicle/bike/MouseDrop_T(var/atom/movable/C, mob/user as mob) + if(!load(C)) + user << "\red You were unable to load [C] on [src]." + return + +/obj/vehicle/bike/attack_hand(var/mob/user as mob) + if(user == load) + unload(load) + user << "You unbuckle yourself from \the [src]" + +/obj/vehicle/bike/relaymove(mob/user, direction) + if(user != load || !on) + return + return Move(get_step(src, direction)) + +/obj/vehicle/bike/Move(var/turf/destination) + if(kickstand) return + + + //these things like space, not turf. Dragging shouldn't weigh you down. + if(istype(destination,/turf/space) || pulledby) + move_delay = 1 + else + move_delay = 10 + var ret = ..() + //overlay.dir = dir + //update_icon() + return ret + +/obj/vehicle/bike/turn_on() + ion.start() + anchored = 1 + overlays.Cut() + overlays += image('icons/obj/bike.dmi', "bike_front_on", MOB_LAYER + 1) + + icon_state = "bike_back_on" + + if(pulledby) + pulledby.stop_pulling() + ..() +/obj/vehicle/bike/turn_off() + ion.stop() + anchored = kickstand + + overlays.Cut() + overlays += image('icons/obj/bike.dmi', "bike_front_off", MOB_LAYER + 1) + + icon_state = "bike_back_off" + ..() + +/obj/vehicle/bike/bullet_act(var/obj/item/projectile/Proj) + if(buckled_mob && prob(40)) + buckled_mob.bullet_act(Proj) + return + ..() \ No newline at end of file diff --git a/icons/obj/bike.dmi b/icons/obj/bike.dmi new file mode 100644 index 0000000000000000000000000000000000000000..8b911b044c664a3a1a233d45040bcee845207109 GIT binary patch literal 829 zcmV-D1H$}?P)V=-0C=2JR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex6#a*U0*I5Sc+ z(=$pSoZ^zil2jm5DJe5MH9oBTTS~>S)4D1$N4Fk;FAc^L9%37u9|J`FH#V5&fL<@zMl|IPNg6a z132sBFrZ&A#bPk+WiUT^ScaKX1d6%K6- zRtY9}$+m~M@Gfgb@!oE+AVdtg0g~zlY`4?eRNcT|EkNOqdes4~(lou{28O`K;JZq1 z6*E{8!G#q8DBy>%BmgUep#r6LoBqZSXbS^D1nl1OXGHLMW@A7E+#ogtRt8l9p$)*j->ln=(tU`Yfg&Ig9zwE4gg zoHid2fy)O@PEJPs14sY7u;=sD)8LtW(1m~-96@l<;5TcV2K0g@U__n|%sW>imT&Gg zYn!5PL}IFgr{k89@uWylzPg(POkPTb5MmaTXHG&i!31bHop&Jk06@#XXb7_6+X0gZ z^bJ`6{K`lEn#OM-kZ~MGco)OPd5$1WFTTQnCJLs_x@`6x!c6PU$Gd3q_$kW`OfR^) zHsi%1JWi>J+X!e+dY^$NvVy=jJ8#PqUZgecOvAT7 Date: Tue, 4 Aug 2015 13:41:27 -0500 Subject: [PATCH 006/178] Fixes Slight change to airflow/animations interaction when buckled --- code/ZAS/Airflow.dm | 3 +++ code/modules/mob/animations.dm | 5 +++- code/modules/mob/mob_movement.dm | 2 +- code/modules/vehicles/bike.dm | 46 +++++++++++++++++++++----------- 4 files changed, 38 insertions(+), 18 deletions(-) diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm index 5f5f5bf347..92657562e3 100644 --- a/code/ZAS/Airflow.dm +++ b/code/ZAS/Airflow.dm @@ -11,6 +11,9 @@ mob/proc/airflow_stun() if(!(status_flags & CANSTUN) && !(status_flags & CANWEAKEN)) src << "You stay upright as the air rushes past you." return 0 + if(buckled) + src << "Air suddenly rushes past you!" + return 0 if(!lying) src << "The sudden rush of air knocks you over!" Weaken(5) diff --git a/code/modules/mob/animations.dm b/code/modules/mob/animations.dm index ac4224dc43..0bd44cb526 100644 --- a/code/modules/mob/animations.dm +++ b/code/modules/mob/animations.dm @@ -82,7 +82,10 @@ note dizziness decrements automatically in the mob's Life() proc. /mob/var/floatiness = 0 /mob/proc/make_floating(var/n) - + if(buckled) + if(is_floating) + stop_floating() + return floatiness = n if(floatiness && !is_floating) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 8ba66ffe31..8fcceac030 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -465,7 +465,7 @@ return 0 //Check to see if we slipped - if(prob(Process_Spaceslipping(5))) + if(prob(Process_Spaceslipping(5)) && !buckled) src << "\blue You slipped!" src.inertia_dir = src.last_move step(src, src.inertia_dir) diff --git a/code/modules/vehicles/bike.dm b/code/modules/vehicles/bike.dm index 815bf47841..8bb8dd688c 100644 --- a/code/modules/vehicles/bike.dm +++ b/code/modules/vehicles/bike.dm @@ -29,27 +29,27 @@ set category = "Vehicle" set src in view(0) - if(usr.stat != 0) return + if(usr.incapacitated()) return if(!on) turn_on() - src.visible_message("\the [src] rumbles to life.", "You hear something rumble deeply.") + src.visible_message("\The [src] rumbles to life.", "You hear something rumble deeply.") else turn_off() - src.visible_message("\the [src] putters before turning off.", "You hear something putter slowly.") + src.visible_message("\The [src] putters before turning off.", "You hear something putter slowly.") /obj/vehicle/bike/verb/kickstand() set name = "Toggle Kickstand" set category = "Vehicle" set src in view(0) - if(usr.stat != 0) return + if(usr.incapacitated()) return if(kickstand) src.visible_message("You put up \the [src]'s kickstand.") else if(istype(src.loc,/turf/space)) - usr << "\red You don't think kickstands work in space..." + usr << " You don't think kickstands work in space..." return src.visible_message("You put down \the [src]'s kickstand.") if(pulledby) @@ -67,7 +67,7 @@ /obj/vehicle/bike/MouseDrop_T(var/atom/movable/C, mob/user as mob) if(!load(C)) - user << "\red You were unable to load [C] on [src]." + user << " You were unable to load \the [C] onto \the [src]." return /obj/vehicle/bike/attack_hand(var/mob/user as mob) @@ -75,6 +75,9 @@ unload(load) user << "You unbuckle yourself from \the [src]" + +/obj/vehicle/bike/attackby(var/obj/item/weapon/W, var/mob/M) + //we want people to be able to place other people on the bikes. For now. /obj/vehicle/bike/relaymove(mob/user, direction) if(user != load || !on) return @@ -89,18 +92,13 @@ move_delay = 1 else move_delay = 10 - var ret = ..() - //overlay.dir = dir - //update_icon() - return ret + return ..() /obj/vehicle/bike/turn_on() ion.start() anchored = 1 - overlays.Cut() - overlays += image('icons/obj/bike.dmi', "bike_front_on", MOB_LAYER + 1) - icon_state = "bike_back_on" + update_icon() if(pulledby) pulledby.stop_pulling() @@ -109,14 +107,30 @@ ion.stop() anchored = kickstand - overlays.Cut() - overlays += image('icons/obj/bike.dmi', "bike_front_off", MOB_LAYER + 1) + update_icon() - icon_state = "bike_back_off" ..() /obj/vehicle/bike/bullet_act(var/obj/item/projectile/Proj) if(buckled_mob && prob(40)) buckled_mob.bullet_act(Proj) return + ..() + +/obj/vehicle/bike/update_icon() + overlays.Cut() + + if(on) + overlays += image('icons/obj/bike.dmi', "bike_front_on", MOB_LAYER + 1) + icon_state = "bike_back_on" + else + overlays += image('icons/obj/bike.dmi', "bike_front_off", MOB_LAYER + 1) + icon_state = "bike_back_off" + + ..() + + +/obj/vehicle/bike/Destroy() + qdel(ion) + ..() \ No newline at end of file From cb2a0945530a08836f06a0993cd0b3a924ad7556 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Tue, 11 Aug 2015 02:42:25 -0400 Subject: [PATCH 007/178] Adds fragmentation grenades Adds a fragmentation grenade item that launches a shower of projectiles in all directions when detonated. --- baystation12.dme | 1 + code/game/mecha/equipment/weapons/weapons.dm | 2 +- .../items/weapons/grenades/fragmentation.dm | 109 ++++++++++++++++++ code/modules/projectiles/projectile.dm | 11 +- .../modules/projectiles/projectile/bullets.dm | 3 +- 5 files changed, 119 insertions(+), 7 deletions(-) create mode 100644 code/game/objects/items/weapons/grenades/fragmentation.dm diff --git a/baystation12.dme b/baystation12.dme index 38fe37bdc9..a9db37eec6 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -699,6 +699,7 @@ #include "code\game\objects\items\weapons\grenades\chem_grenade.dm" #include "code\game\objects\items\weapons\grenades\emgrenade.dm" #include "code\game\objects\items\weapons\grenades\flashbang.dm" +#include "code\game\objects\items\weapons\grenades\fragmentation.dm" #include "code\game\objects\items\weapons\grenades\grenade.dm" #include "code\game\objects\items\weapons\grenades\smokebomb.dm" #include "code\game\objects\items\weapons\grenades\spawnergrenade.dm" diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index f034f27550..c6b708a748 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -48,7 +48,7 @@ /obj/item/mecha_parts/mecha_equipment/weapon/proc/Fire(atom/A, atom/target, turf/aimloc) var/obj/item/projectile/P = A - P.shot_from = src + P.shot_from = src.name P.original = target P.starting = P.loc P.current = P.loc diff --git a/code/game/objects/items/weapons/grenades/fragmentation.dm b/code/game/objects/items/weapons/grenades/fragmentation.dm new file mode 100644 index 0000000000..22dbe53e81 --- /dev/null +++ b/code/game/objects/items/weapons/grenades/fragmentation.dm @@ -0,0 +1,109 @@ +//Fragmentation grenade projectile +/obj/item/projectile/bullet/pellet/fragment + damage = 6 + range_step = 2 + + base_spread = 0 //hit any target zone randomly + spread_step = 0 + + //step_delay = 10 + silenced = 1 + //hitscan = 1 + muzzle_type = null + +/obj/item/projectile/bullet/pellet/fragment/Move() + . = ..() + + //Allow mobs that are prone close to the starting turf a chance to get hit, too + + if(. && isturf(loc)) + var/distance = get_dist(loc, starting) + var/chance = max(100 - (distance - 1)*20, 0) + if(prob(chance)) + for(var/mob/living/M in loc) + if(Bump(M)) //Bump will make sure we don't hit a mob multiple times + return + + +/obj/item/weapon/grenade/frag + name = "fragmentation grenade" + desc = "A military fragmentation grenade, designed to explode in a deadly shower of fragments." + + var/num_fragments = 7 //fragments per projectile + var/fragment_damage = 15 + var/damage_step = 1 //projectiles lose a fragment each time they travel this distance. Can be a non-integer. + + var/silenced = 0 + + //Higher values means projectile spread is more even but more projectiles are created. + //The actual number of projectile objects is spread_range*8 + var/spread_range = 4 //32 projectiles. With spread_range=4 and num_fragments=7, a frag grenade produces 224 fragments. + +#define LOCATE_COORDS(X, Y, Z) locate(between(1, X, world.maxx), between(1, Y, world.maxy), Z) +/obj/item/weapon/grenade/frag/prime() + ..() + + var/turf/O = get_turf(src) + if(!O) return + + explosion(O, -1, 1, 2, 1, 0) + + for(var/i in -spread_range to spread_range) + var/turf/T1 = LOCATE_COORDS(O.x+i, O.y+spread_range, O.z) + launch_projectile(O, T1) + + var/turf/T2 = LOCATE_COORDS(O.x+i, O.y-spread_range, O.z) + launch_projectile(O, T2) + + for(var/j in 1-spread_range to spread_range-1) + var/turf/T1 = LOCATE_COORDS(O.x+spread_range, O.y+j, O.z) + launch_projectile(O, T1) + + var/turf/T2 = LOCATE_COORDS(O.x-spread_range, O.y+j, O.z) + launch_projectile(O, T2) + + qdel(src) + +/obj/item/weapon/grenade/frag/proc/launch_projectile(var/turf/source, var/turf/target) + var/obj/item/projectile/bullet/pellet/fragment/P = new(src) + + P.damage = fragment_damage + P.pellets = num_fragments + P.range_step = damage_step + P.silenced = silenced + P.shot_from = src.name + + var/location = loc //store our current loc since qdel will move the grenade to nullspace + spawn(0) + P.launch(target) + if(!isturf(location)) + P.Bump(location) + for(var/atom/movable/AM in source) + P.Bump(AM) + + /* + //the vector system doesn't play well with very large angle offsets, so generate projectiles along each of the 8 directions + var/subarc_width = 45/(num_projectiles*2) + var/fragments_per_projectile = round(num_fragments / (num_projectiles*8)) + + for(var/launch_dir in alldirs) + var/turf/target = get_edge_target_turf(T, launch_dir) + for(var/i in 1 to num_projectiles) + //keep the trajectory centered in the 45 deg arc + var/launch_angle = (i-0.5)*subarc_width - 22.5 + + var/obj/item/projectile/bullet/pellet/fragment/P = new(src) + + if(dispersion) + P.dispersion = (subarc_width)/9 //randomly disperse within the projectile arc, so that there aren't any predictable blind spots + P.damage = fragment_damage + P.pellets = fragments_per_projectile + P.range_step = damage_step + P.silenced = silenced + + P.shot_from = src.name + spawn(0) + P.Move(T) //so that we hit people in the starting turf + P.launch(target, ran_zone(), angle_offset = launch_angle) + */ + qdel(src) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index b9ba2ba0df..aab5835fba 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -25,7 +25,7 @@ var/yo = null var/xo = null var/current = null - var/obj/shot_from = null // the object which shot us + var/shot_from = "" // name of the object which shot us var/atom/original = null // the target clicked (not necessarily where the projectile is headed). Should probably be renamed to 'target' or something. var/turf/starting = null // the projectile's starting turf var/list/permutated = list() // we've passed through these atoms, don't try to hit them again @@ -111,7 +111,7 @@ p_y = between(0, p_y + rand(-radius, radius), world.icon_size) //called to launch a projectile -/obj/item/projectile/proc/launch(atom/target, var/target_zone, var/x_offset=0, var/y_offset=0) +/obj/item/projectile/proc/launch(atom/target, var/target_zone, var/x_offset=0, var/y_offset=0, var/angle_offset=0) var/turf/curloc = get_turf(src) var/turf/targloc = get_turf(target) if (!istype(targloc) || !istype(curloc)) @@ -127,7 +127,7 @@ def_zone = target_zone spawn() - setup_trajectory(curloc, targloc, x_offset, y_offset) //plot the initial trajectory + setup_trajectory(curloc, targloc, x_offset, y_offset, angle_offset) //plot the initial trajectory process() return 0 @@ -143,7 +143,7 @@ loc = get_turf(user) //move the projectile out into the world firer = user - shot_from = launcher + shot_from = launcher.name silenced = launcher.silenced return launch(target, target_zone, x_offset, y_offset) @@ -173,7 +173,8 @@ result = target_mob.bullet_act(src, def_zone) if(result == PROJECTILE_FORCE_MISS) - visible_message("\The [src] misses [target_mob] narrowly!") + if(!silenced) + visible_message("\The [src] misses [target_mob] narrowly!") return 0 //hit messages diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 2038d718e0..de40396544 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -69,7 +69,7 @@ damage = 20 //icon_state = "bullet" //TODO: would be nice to have it's own icon state var/pellets = 4 //number of pellets - var/range_step = 2 //effective pellet count decreases every few tiles + var/range_step = 2 //projectile will lose a fragment each time it travels this distance. Can be a non-integer. var/base_spread = 90 //lower means the pellets spread more across body parts var/spread_step = 10 //higher means the pellets spread more across body parts with distance @@ -92,6 +92,7 @@ if (..()) hits++ def_zone = old_zone //restore the original zone the projectile was aimed at + //world << "[src]: hitting [target_mob], [hits] of [pellets] hits." pellets -= hits //each hit reduces the number of pellets left if (hits >= total_pellets || pellets <= 0) return 1 From da584942752646a4b17aaa9c5acba66f8b8ce04b Mon Sep 17 00:00:00 2001 From: mwerezak Date: Fri, 14 Aug 2015 00:25:41 -0400 Subject: [PATCH 008/178] Improves the way shrapnel clouds hit prone mobs --- .../items/weapons/grenades/fragmentation.dm | 18 ++----------- .../modules/projectiles/projectile/bullets.dm | 25 ++++++++++++++++--- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/code/game/objects/items/weapons/grenades/fragmentation.dm b/code/game/objects/items/weapons/grenades/fragmentation.dm index 22dbe53e81..7ed4080085 100644 --- a/code/game/objects/items/weapons/grenades/fragmentation.dm +++ b/code/game/objects/items/weapons/grenades/fragmentation.dm @@ -6,25 +6,9 @@ base_spread = 0 //hit any target zone randomly spread_step = 0 - //step_delay = 10 silenced = 1 - //hitscan = 1 muzzle_type = null -/obj/item/projectile/bullet/pellet/fragment/Move() - . = ..() - - //Allow mobs that are prone close to the starting turf a chance to get hit, too - - if(. && isturf(loc)) - var/distance = get_dist(loc, starting) - var/chance = max(100 - (distance - 1)*20, 0) - if(prob(chance)) - for(var/mob/living/M in loc) - if(Bump(M)) //Bump will make sure we don't hit a mob multiple times - return - - /obj/item/weapon/grenade/frag name = "fragmentation grenade" desc = "A military fragmentation grenade, designed to explode in a deadly shower of fragments." @@ -76,10 +60,12 @@ var/location = loc //store our current loc since qdel will move the grenade to nullspace spawn(0) P.launch(target) + /* if(!isturf(location)) P.Bump(location) for(var/atom/movable/AM in source) P.Bump(AM) + */ /* //the vector system doesn't play well with very large angle offsets, so generate projectiles along each of the 8 directions diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index de40396544..76a84b19e9 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -70,21 +70,32 @@ //icon_state = "bullet" //TODO: would be nice to have it's own icon state var/pellets = 4 //number of pellets var/range_step = 2 //projectile will lose a fragment each time it travels this distance. Can be a non-integer. - var/base_spread = 90 //lower means the pellets spread more across body parts + var/base_spread = 90 //lower means the pellets spread more across body parts. If zero then this is considered a shrapnel explosion instead of a shrapnel cone var/spread_step = 10 //higher means the pellets spread more across body parts with distance /obj/item/projectile/bullet/pellet/Bumped() . = ..() bumped = 0 //can hit all mobs in a tile. pellets is decremented inside attack_mob so this should be fine. -/obj/item/projectile/bullet/pellet/attack_mob(var/mob/living/target_mob, var/distance) +/obj/item/projectile/bullet/pellet/attack_mob(var/mob/living/target_mob, var/distance, var/prone = 0) if (pellets < 0) return 1 var/pellet_loss = round((distance - 1)/range_step) //pellets lost due to distance var/total_pellets = max(pellets - pellet_loss, 1) var/spread = max(base_spread - (spread_step*distance), 0) + + //shrapnel explosions miss prone mobs with a chance that increases with distance + var/prone_chance = 0 + if(!base_spread) + prone_chance = max(spread_step*(distance - 2), 0) + + world << "[src]: attacking [target_mob] > target_mob.lying = [target_mob.lying], original = [original], prone_chance = [prone_chance]" + var/hits = 0 for (var/i in 1 to total_pellets) + if(target_mob.lying && target_mob != original && prob(prone_chance)) + continue + //pellet hits spread out across different zones, but 'aim at' the targeted zone with higher probability //whether the pellet actually hits the def_zone or a different zone should still be determined by the parent using get_zone_with_miss_chance(). var/old_zone = def_zone @@ -92,12 +103,20 @@ if (..()) hits++ def_zone = old_zone //restore the original zone the projectile was aimed at - //world << "[src]: hitting [target_mob], [hits] of [pellets] hits." pellets -= hits //each hit reduces the number of pellets left if (hits >= total_pellets || pellets <= 0) return 1 return 0 +/obj/item/projectile/bullet/pellet/Move() + . = ..() + + //If this is a shrapnel explosion, allow mobs that are prone to get hit, too + if(. && !base_spread && isturf(loc)) + for(var/mob/living/M in loc) + if(M.lying && Bump(M)) //Bump will make sure we don't hit a mob multiple times + return + /* short-casing projectiles, like the kind used in pistols or SMGs */ /obj/item/projectile/bullet/pistol From 4092b40ae5a6dcf4d2f3a66abbe4baa9e03a7c2a Mon Sep 17 00:00:00 2001 From: mwerezak Date: Fri, 14 Aug 2015 03:44:22 -0400 Subject: [PATCH 009/178] Updates frag grenades to use bresenham, tweaks --- code/_helpers/unsorted.dm | 27 +++++ .../items/weapons/grenades/fragmentation.dm | 104 ++++++------------ .../modules/projectiles/projectile/bullets.dm | 9 +- 3 files changed, 64 insertions(+), 76 deletions(-) diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 589103d4b0..2bde3b1f0c 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -223,6 +223,33 @@ Turf and target are seperate in case you want to teleport some distance from a t line+=locate(px,py,M.z) return line +#define LOCATE_COORDS(X, Y, Z) locate(between(1, X, world.maxx), between(1, Y, world.maxy), Z) +/proc/getcircle(turf/center, var/radius) //Uses a fast Bresenham rasterization algorithm to return the turfs in a thin circle. + if(!radius) return list(center) + + var/x = 0 + var/y = radius + var/p = 3 - 2 * radius + + . = list() + while(y >= x) // only formulate 1/8 of circle + + . += LOCATE_COORDS(center.x - x, center.y - y, center.z) //upper left left + . += LOCATE_COORDS(center.x - y, center.y - x, center.z) //upper upper left + . += LOCATE_COORDS(center.x + y, center.y - x, center.z) //upper upper right + . += LOCATE_COORDS(center.x + x, center.y - y, center.z) //upper right right + . += LOCATE_COORDS(center.x - x, center.y + y, center.z) //lower left left + . += LOCATE_COORDS(center.x - y, center.y + x, center.z) //lower lower left + . += LOCATE_COORDS(center.x + y, center.y + x, center.z) //lower lower right + . += LOCATE_COORDS(center.x + x, center.y + y, center.z) //lower right right + + if(p < 0) + p += 4*x++ + 6; + else + p += 4*(x++ - y--) + 10; + +#undef LOCATE_COORDS + //Returns whether or not a player is a guest using their ckey as an input /proc/IsGuestKey(key) if (findtext(key, "Guest-", 1, 7) != 1) //was findtextEx diff --git a/code/game/objects/items/weapons/grenades/fragmentation.dm b/code/game/objects/items/weapons/grenades/fragmentation.dm index 7ed4080085..6ae37db22d 100644 --- a/code/game/objects/items/weapons/grenades/fragmentation.dm +++ b/code/game/objects/items/weapons/grenades/fragmentation.dm @@ -1,95 +1,57 @@ //Fragmentation grenade projectile /obj/item/projectile/bullet/pellet/fragment - damage = 6 + damage = 15 range_step = 2 - - base_spread = 0 //hit any target zone randomly - spread_step = 0 - silenced = 1 + base_spread = 0 //causes it to be treated as a shrapnel explosion instead of cone + spread_step = 20 + + //silenced = 1 //embedding messages are still produced so it's kind of weird when enabled. + move_delay = 10 muzzle_type = null /obj/item/weapon/grenade/frag name = "fragmentation grenade" desc = "A military fragmentation grenade, designed to explode in a deadly shower of fragments." - var/num_fragments = 7 //fragments per projectile + var/num_fragments = 120 //total number of fragments produced by the grenade var/fragment_damage = 15 - var/damage_step = 1 //projectiles lose a fragment each time they travel this distance. Can be a non-integer. + var/damage_step = 2 //projectiles lose a fragment each time they travel this distance. Can be a non-integer. + var/explosion_size = 2 //size of the center explosion - var/silenced = 0 - - //Higher values means projectile spread is more even but more projectiles are created. - //The actual number of projectile objects is spread_range*8 - var/spread_range = 4 //32 projectiles. With spread_range=4 and num_fragments=7, a frag grenade produces 224 fragments. + //The radius of the circle used to launch projectiles. Lower values mean less projectiles are used but if set too low gaps may appear in the spread pattern + var/spread_range = 7 -#define LOCATE_COORDS(X, Y, Z) locate(between(1, X, world.maxx), between(1, Y, world.maxy), Z) /obj/item/weapon/grenade/frag/prime() ..() var/turf/O = get_turf(src) if(!O) return - explosion(O, -1, 1, 2, 1, 0) + if(explosion_size) + explosion(O, -1, round(explosion_size/2), explosion_size, round(explosion_size/2), 0) - for(var/i in -spread_range to spread_range) - var/turf/T1 = LOCATE_COORDS(O.x+i, O.y+spread_range, O.z) - launch_projectile(O, T1) - - var/turf/T2 = LOCATE_COORDS(O.x+i, O.y-spread_range, O.z) - launch_projectile(O, T2) + var/list/target_turfs = getcircle(O, spread_range) + var/fragments_per_projectile = round(num_fragments/target_turfs.len) - for(var/j in 1-spread_range to spread_range-1) - var/turf/T1 = LOCATE_COORDS(O.x+spread_range, O.y+j, O.z) - launch_projectile(O, T1) - - var/turf/T2 = LOCATE_COORDS(O.x-spread_range, O.y+j, O.z) - launch_projectile(O, T2) - - qdel(src) + for(var/turf/T in target_turfs) + var/obj/item/projectile/bullet/pellet/fragment/P = new (O) -/obj/item/weapon/grenade/frag/proc/launch_projectile(var/turf/source, var/turf/target) - var/obj/item/projectile/bullet/pellet/fragment/P = new(src) - - P.damage = fragment_damage - P.pellets = num_fragments - P.range_step = damage_step - P.silenced = silenced - P.shot_from = src.name - - var/location = loc //store our current loc since qdel will move the grenade to nullspace - spawn(0) - P.launch(target) - /* - if(!isturf(location)) - P.Bump(location) - for(var/atom/movable/AM in source) - P.Bump(AM) - */ + P.damage = fragment_damage + P.pellets = fragments_per_projectile + P.range_step = damage_step + P.shot_from = src.name + + P.launch(T) + + var/cone = new /obj/item/weapon/caution/cone (T) + spawn(100) qdel(cone) + + //Make sure to hit any mobs in the source turf + for(var/mob/living/M in O) + if(M.lying) + P.attack_mob(M, 0, 0) //lying on a frag grenade causes you to tank most of it. + else + P.attack_mob(M, 0, 100) //otherwise, allow a decent amount of fragments to pass - /* - //the vector system doesn't play well with very large angle offsets, so generate projectiles along each of the 8 directions - var/subarc_width = 45/(num_projectiles*2) - var/fragments_per_projectile = round(num_fragments / (num_projectiles*8)) - - for(var/launch_dir in alldirs) - var/turf/target = get_edge_target_turf(T, launch_dir) - for(var/i in 1 to num_projectiles) - //keep the trajectory centered in the 45 deg arc - var/launch_angle = (i-0.5)*subarc_width - 22.5 - - var/obj/item/projectile/bullet/pellet/fragment/P = new(src) - - if(dispersion) - P.dispersion = (subarc_width)/9 //randomly disperse within the projectile arc, so that there aren't any predictable blind spots - P.damage = fragment_damage - P.pellets = fragments_per_projectile - P.range_step = damage_step - P.silenced = silenced - - P.shot_from = src.name - spawn(0) - P.Move(T) //so that we hit people in the starting turf - P.launch(target, ran_zone(), angle_offset = launch_angle) - */ qdel(src) diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 76a84b19e9..14cbd72d60 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -77,7 +77,7 @@ . = ..() bumped = 0 //can hit all mobs in a tile. pellets is decremented inside attack_mob so this should be fine. -/obj/item/projectile/bullet/pellet/attack_mob(var/mob/living/target_mob, var/distance, var/prone = 0) +/obj/item/projectile/bullet/pellet/attack_mob(var/mob/living/target_mob, var/distance, var/miss_modifier) if (pellets < 0) return 1 var/pellet_loss = round((distance - 1)/range_step) //pellets lost due to distance @@ -89,8 +89,6 @@ if(!base_spread) prone_chance = max(spread_step*(distance - 2), 0) - world << "[src]: attacking [target_mob] > target_mob.lying = [target_mob.lying], original = [original], prone_chance = [prone_chance]" - var/hits = 0 for (var/i in 1 to total_pellets) if(target_mob.lying && target_mob != original && prob(prone_chance)) @@ -114,8 +112,9 @@ //If this is a shrapnel explosion, allow mobs that are prone to get hit, too if(. && !base_spread && isturf(loc)) for(var/mob/living/M in loc) - if(M.lying && Bump(M)) //Bump will make sure we don't hit a mob multiple times - return + if(M.lying || !M.CanPass(src, loc)) //Bump if lying or if we would normally Bump. + if(Bump(M)) //Bump will make sure we don't hit a mob multiple times + return /* short-casing projectiles, like the kind used in pistols or SMGs */ From 8b08f8ff34834e13bb73422d10913e00ae98a6d7 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sat, 15 Aug 2015 02:37:13 -0400 Subject: [PATCH 010/178] Fixes explosions deleting projectiles --- .../objects/items/weapons/grenades/fragmentation.dm | 1 - code/modules/projectiles/projectile.dm | 10 ++++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/code/game/objects/items/weapons/grenades/fragmentation.dm b/code/game/objects/items/weapons/grenades/fragmentation.dm index 6ae37db22d..d52c008cfe 100644 --- a/code/game/objects/items/weapons/grenades/fragmentation.dm +++ b/code/game/objects/items/weapons/grenades/fragmentation.dm @@ -7,7 +7,6 @@ spread_step = 20 //silenced = 1 //embedding messages are still produced so it's kind of weird when enabled. - move_delay = 10 muzzle_type = null /obj/item/weapon/grenade/frag diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index aab5835fba..37a8468e31 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -265,13 +265,11 @@ qdel(src) return 1 -/obj/item/projectile/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) - if(air_group || (height==0)) return 1 +/obj/item/projectile/ex_act() + return //explosions probably shouldn't delete projectiles - if(istype(mover, /obj/item/projectile)) - return prob(95) //ha - else - return 1 +/obj/item/projectile/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) + return 1 /obj/item/projectile/process() var/first_step = 1 From c455cef9a54b3b9caafe8c050ccb78d9e1b6ece5 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sat, 15 Aug 2015 03:19:47 -0400 Subject: [PATCH 011/178] More frag grenade tweaks Finalizes frag grenade values, fragments no longer produce admin logs, and comments out debugging code. --- .../items/weapons/grenades/fragmentation.dm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/weapons/grenades/fragmentation.dm b/code/game/objects/items/weapons/grenades/fragmentation.dm index d52c008cfe..8eb8376d4f 100644 --- a/code/game/objects/items/weapons/grenades/fragmentation.dm +++ b/code/game/objects/items/weapons/grenades/fragmentation.dm @@ -6,14 +6,15 @@ base_spread = 0 //causes it to be treated as a shrapnel explosion instead of cone spread_step = 20 - //silenced = 1 //embedding messages are still produced so it's kind of weird when enabled. + silenced = 1 //embedding messages are still produced so it's kind of weird when enabled. + no_attack_log = 1 muzzle_type = null /obj/item/weapon/grenade/frag name = "fragmentation grenade" desc = "A military fragmentation grenade, designed to explode in a deadly shower of fragments." - var/num_fragments = 120 //total number of fragments produced by the grenade + var/num_fragments = 200 //total number of fragments produced by the grenade var/fragment_damage = 15 var/damage_step = 2 //projectiles lose a fragment each time they travel this distance. Can be a non-integer. var/explosion_size = 2 //size of the center explosion @@ -43,13 +44,15 @@ P.launch(T) - var/cone = new /obj/item/weapon/caution/cone (T) - spawn(100) qdel(cone) + //var/cone = new /obj/item/weapon/caution/cone (T) + //spawn(100) qdel(cone) //Make sure to hit any mobs in the source turf for(var/mob/living/M in O) - if(M.lying) - P.attack_mob(M, 0, 0) //lying on a frag grenade causes you to tank most of it. + //lying on a frag grenade while the grenade is on the ground causes you to absorb most of the shrapnel. + //you will most likely be dead, but others nearby will be spared the fragments that hit you instead. + if(M.lying && isturf(src.loc)) + P.attack_mob(M, 0, 0) else P.attack_mob(M, 0, 100) //otherwise, allow a decent amount of fragments to pass From a773715ff9099a2325c83ad12aafa4dd5f0c521b Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sat, 15 Aug 2015 18:47:35 -0400 Subject: [PATCH 012/178] Adds frag grenade sprites --- .../items/weapons/grenades/fragmentation.dm | 1 + icons/obj/grenade.dmi | Bin 3153 -> 3050 bytes 2 files changed, 1 insertion(+) diff --git a/code/game/objects/items/weapons/grenades/fragmentation.dm b/code/game/objects/items/weapons/grenades/fragmentation.dm index 8eb8376d4f..f87b55e652 100644 --- a/code/game/objects/items/weapons/grenades/fragmentation.dm +++ b/code/game/objects/items/weapons/grenades/fragmentation.dm @@ -13,6 +13,7 @@ /obj/item/weapon/grenade/frag name = "fragmentation grenade" desc = "A military fragmentation grenade, designed to explode in a deadly shower of fragments." + icon_state = "frag" var/num_fragments = 200 //total number of fragments produced by the grenade var/fragment_damage = 15 diff --git a/icons/obj/grenade.dmi b/icons/obj/grenade.dmi index 1735fd8b3f027bb447f5cb0c593ae11f9b248f90..60d7b4b4d2d6ae7402372a8a3246c0e7e198cdcc 100644 GIT binary patch delta 2879 zcmV-F3&8Zz80r_0Bmv}+C6Nihz`*}PDJn1^k-Qs!92^`yJv}ZiE+#J(9VQMF8wfNx zBPstW|FB8_q%G)!0RJ*F|1B;585u-XCp1JFBQX!}MJ2-k0004WQchCV=-0C=38RKacnArL(;U$N1vY3g>by)+u*q5i^#!U&|m8bFPI zU$$$1x2)|75<&u#_vQ_c$;`{Q^=7*(SMOVN0%Jw1%h$4gdPc=rP{;k{r9uS)%WE80z8L* z#gK#}`PKjc33W+CK~#90?Ols@+cpdp?L@BAt*zHhiQ6<@y}4T->xtbYOVho&_v8Qn zX9OiXvP=Ms5r(pjo1L7VTuKlw!6zs!%M=PlOJGW*evD+;UC&FHc?9fe6j-l2*VsJ; zOt)hNs8rY!2tbAp8(Sd-$P#PwrrQO70rrhB0^mOA#RgdV@z4Tg%Y*{ms-c^7?1TAxw?+klV=$a6*jyg=;^p8L!B(zAigk0^V+%j`6?P@P9pFJ1_7w_+LJ=LQhneK|lUZ(y z{j^if*#UpGHr+3%-2ACNjfU)n!N zc|M@l39oP8zyBPRpHFT-aejVo{~*=*fYkZzKvFQ2vK>KJDL1P_h85F#CkDs3pvQKuBV*A8@Fmng_`5^oBFe$W8 zB4nZ>%g?vk{$1qfdHdW{Iih`Y7x{VCKD$_oWj}d-{$|VN2Tmxtx=$K_)K z&C0Zf&p!DyqmICT2zlmxK9+y*;NioE(RgDX<)9G!UXLF*et_^9_5FY_KB@rb5$x>u z+|H@fKav%<0Rx#8d)d>>(V8NrEpj?2@83zS?In3D_B!@wQAJBYO zI!GPVX8EWQa2FGyRyTpnO=ZjfBJu12g4Dc1p-?Ck3WY+UP_!1@dS>g_JMd!17Xp6M zVS4a`d&u#Bn~kC27scVB>2P~`dwEj;5AV5s*)}kL52QSI{(#?BK5_hshX?;E55d7a zH^q_wK7Q3ewd;&JDCL}3g7+&x$P~M?fRlt1pwFTjT8wCj7jRGP8sQmg#jc>MrVmP!O9u7+% zp$X*60xa|HCxHNb6IeIDUW~y*>*AsF-}M0n&SL_^ZUW2)9Ju`Y$%0?)1c%l`a1ng8 zu$_ES5In#mKPHok>_ z@+{iDC#X;;6bgkxp-?Ec7ShE?+j$Q1?+dh>=OO;SK->ACcY3&Yjy9O@0(c%PA^!eA zV%}{lPhQg7&cLGvq~9M%%<}>OC;@Kc`vVDiUH~}SLJ2^opWDx?0NMnkouKsl1Bv+n z0qEr7rt={J(D`+qfAxyyU%!@JKN<;tu2%tez6m7%K0s<-p-?Ck3WY+UP$(1%#V$g; zUyyoBL&%Hs=Y~w4wx4J7=NusaO1_}pcAm+fXCW`;bO;Sw&WGgB^T|tm-`MdvVW91N zK>j?R5F6)?rxb2G&n6Fzp(DV(RmvD>GtZ@uvq^5K2*}Kv@5o-lSOX&d?JJspAB`l} z2M92sdqMN&4JeHB)_{nA`u=JI_0JZKcyT%Jx( z??MCw2(aA|5YPm+I0E>^fNc)}(tj(!#YId3 zxV5U37h`(){xYHf>Aw$9PjqpMU?ez#SCw0l-51x&TF^eZUk(4-n3$-002ovPDHLkV1nYWZIS>0 delta 2983 zcmV;Y3t05(7tt7yBmuFJC6NXyFd+XzDUrV$e>6EGMJk!200001bW%=J06^y0W&i*I zD|%E|bVOxyV{&P5bZKvH004NLos`jT!XOleugg;qy*111db^uNW4xHJ&@eax8BhbL z@$IFn>sq%8BTW+^|9`&IzbDM`+j_Iz;nn*VoxnQT82pN>r)N~0CG#R|UP@F5kX-m~ zf8#vy5SFvOB2Ih|!)K^q(za2p~EQ=p17Z=PT5DuLZ6lGS-Ih9??OC(9y)!{D)(DC1lBkWvjPohot{tcN z5AUT9X#)r7Ly9IVB5uJD7Vm)y&)ZuNCHUjYl$s|w&_fg%6^ z3KvO4K~#90?Ols@+cpdprC5&BZLQZ$iQ6<@y}4T-tK%kFn*RTXji4UUg8*nTe+p$A zH$6E$y_6taf=^It6bS@^kwE1L{TRV;yq@P!Wds~)6lkyGM;xC5Dv7lKg$gGg0+8Xu z#+FL~vP5rQB?$;HQJxV1_dzdKz|xP07RXyB6iAB3`t*E~Y5`J%z5?h70uMR{ihqDO zqZPmkK*gj}1p@05)3jYlzP#xJf0Hymji&}Z1t>exwt>QYQ47TNXaS|$WqAj4|C6?Z z96xLFvu>2v27&(mYfp8IwI85(Jgq+Hf;SPoKp`O%$nS5j;odwH$?IMRL7JcsN$Zmf zpc@bp0cpwzfETFU!E%3pKDTaKzwQPSwlBp6fPn-PASVd{umY-nhsXP?f2ZQBhm4DX zz}gwtTL?0gfD4n!Y0E%m{&X^-1;7f_@6f&f4*c0n;|vqv#0UUWfxItoJw$z;gml%d z2xtr76#<4SYOr0-mv?fI6A1Sd(ZzB-R-h4DmQZry%c{=-r|Yn-&{ILrwG8!e_{n1!;57&@#Sll@L|qvn6!;|=;*kk0L1`qnNaxhZg80> zS!X=x{KzJNy+Ad^)cw$jWlHJH&*FIIFeSA=g2PnVKIg?|$Tk6x0{J4NtikS@!Ix(N z&+oEWD&nJM09zv=S6eBw%q*qt_QJkAhuxOT9RuVl+3^XQirSVke_lLiezy&ij)C1R zjt%O_x6B@UGPWTfERNIbI*z&a1p7~KVR6Ng*zV*IzOM=KMQ$2pw&nBm~$41ROtS+PDv2M0j3I4aXUh!xr=r6!;jDsG0KFsMFB!@wQf1lHQlsiZr)MoiXBj7nELZfa1 zk(tWoe+J^&0|cRYfj}S-2m}IwKp+?`xb@7zuXo_Zj^91_eTSOD5AGqy?>Dk6Q)xU+ zz{fs3i*cvdv+Vp_P2&VR(#!EYRGN?nfwGIm#koq;1X{Uz^QLWz;~gIG?d9d= zTY|rQfA{X)CBgUjlBGMc3yt%IO3eFtT@Smwjs0hkXce{lKrtBSws2%tTz>R3ay1!(X_glqr@ zIi7ia-Xp)BE$Vfw1xTCCq`?E!g-w8%Y2&{9AMf82-!I_u>&qIyZ1LG@)u>~5!8=2F zgRHB7`tvUh!T~c15WE=$yab@~>sK|t-3GG7LVI|=$bEz+kTwNq^5!Ri0DKeZn_tgX zf8e2Z@!a@t`hX1QF#(2d0?Y>-xcvH6#dkZwh4v6!1RphYC!b{m53mR@bSF5C*XuPt z4dC+YOPtp=Y&v`Yh@USp-T)^fZ#{&l54;UC(?jrQ`y?7qpJ3>PP8{b@c7USL%6bJ+Yfj}S-2m}WU z-^Iw-c@F;H7Z^9s!~6RJW9OaT>EYfv+G9Qe@H|$+`}+fdd9$s&{zz{-1CJW;fBpVI zV4fEMKnd^^-yaCb^8&!p7D@mz{XBkN1dt}++X?!9e;_dLAOM|Q+;`qZ06M?U^PfJ^ z{O8Yp*DseI*NXs0-vokxA0RX@5C{YUfj}S-2m}Iw;27b(Ul4jr!;|;UpDQwXI)0wb zpL2lxEBS)@*m)*@9=W`f6B8Paf1G#8pQr1O_`b2>Q^LU5d58RYx+XTx4NoaNcAiZh zDn&0^ih2LTQ{e*zquzyU`9 zznDDm2wOh1lL> zOVgWg2d=>NmJWf<&4CNBy(L3nb9Zy#A#nTOEk$bq4m|`&|Fr;jcl#@VDnGf{e@(o( z|9(GO0nDC%g}xp>kp6`fe*n%d#Bt%}iO;?kTK#vM&BM*ZW^;#LOE&@hI;ZDK5^!*$ zylODN50Tqq&cHCk+~$Vr1f65UM=2cv-~!f;(K9ZfYdTfMArbWZvz!3rD3CLo62xtA zs_dwcC&bUNDBUcygQ~i`)k-+Nd^ARYA9vOQ*V|jue*komyZd`+e=D_;O;u1E#2J;M z2BCnC;;ufveEFcvC}-oZueV#6KRoF6aibmAzrKIhzaQsJo6R>P3N#=9^t89FIcM>J z=KJ+2?m%xIilhd*n@JOFBpIwT8tP7IIo`p5g8%$xQqBgfh1gMm*)Z`z zzKAL7Zuf)xyDg>=1MHR;vt>3Uc3ckk-1FczJ-JO&A3Vv1hA-G{?_dG&TsZpN8i%77 dKyYaIANi#Y5y=Ud6+i$0002ovPDHLkV1lyuqMiT% From 77ddae4e263ee369703c17ad4883b2cbce61b867 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sat, 15 Aug 2015 19:08:45 -0400 Subject: [PATCH 013/178] Structures now take damage properly from projectile clouds --- code/game/machinery/camera/camera.dm | 3 +-- code/game/machinery/computer/computer.dm | 5 +---- code/game/machinery/doors/door.dm | 10 ++++------ code/game/machinery/portable_turret.dm | 7 ++++--- code/game/mecha/mecha.dm | 2 +- code/game/objects/effects/spiders.dm | 2 +- code/game/objects/items/weapons/weaponry.dm | 2 +- .../game/objects/structures/crates_lockers/closets.dm | 5 +++-- .../structures/crates_lockers/closets/statue.dm | 2 +- code/game/objects/structures/displaycase.dm | 2 +- code/game/objects/structures/girders.dm | 5 ++--- code/game/objects/structures/grille.dm | 8 +++----- code/game/objects/structures/inflatable.dm | 6 +++--- code/game/objects/structures/mirror.dm | 6 ++---- code/game/objects/structures/window.dm | 7 +++---- code/game/turfs/simulated/walls.dm | 6 ++---- code/modules/projectiles/projectile.dm | 5 +++++ code/modules/projectiles/projectile/bullets.dm | 11 +++++++++-- code/modules/reagents/reagent_dispenser.dm | 2 +- .../research/xenoarchaeology/machinery/coolant.dm | 2 +- code/modules/shieldgen/emergency_shield.dm | 2 +- code/modules/shieldgen/energy_field.dm | 2 +- code/modules/shieldgen/sheldwallgen.dm | 4 ++-- code/modules/supermatter/supermatter.dm | 5 +++-- code/modules/vehicles/vehicle.dm | 3 +-- 25 files changed, 57 insertions(+), 57 deletions(-) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 9dc39f257b..b5cab5fb6a 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -79,8 +79,7 @@ ..() /obj/machinery/camera/bullet_act(var/obj/item/projectile/P) - if(P.damage_type == BRUTE || P.damage_type == BURN) - take_damage(P.damage) + take_damage(P.get_structure_damage()) /obj/machinery/camera/ex_act(severity) if(src.invuln) diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index 74edf74ea9..298eff5af2 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -47,10 +47,7 @@ return /obj/machinery/computer/bullet_act(var/obj/item/projectile/Proj) - if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN)) - return - - if(prob(Proj.damage)) + if(prob(Proj.get_structure_damage())) set_broken() ..() diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 13aa4f9ebc..12df658249 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -149,12 +149,10 @@ /obj/machinery/door/bullet_act(var/obj/item/projectile/Proj) ..() - //Tasers and the like should not damage doors. Nor should TOX, OXY, CLONE, etc damage types - if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN)) - return + var/damage = Proj.get_structure_damage() // Emitter Blasts - these will eventually completely destroy the door, given enough time. - if (Proj.damage > 90) + if (damage > 90) destroy_hits-- if (destroy_hits <= 0) visible_message("\The [src.name] disintegrates!") @@ -166,9 +164,9 @@ new /obj/effect/decal/cleanable/ash(src.loc) // Turn it to ashes! qdel(src) - if(Proj.damage) + if(damage) //cap projectile damage so that there's still a minimum number of hits required to break the door - take_damage(min(Proj.damage, 100)) + take_damage(min(damage, 100)) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index c7e5c3f404..5a70afcda1 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -371,7 +371,9 @@ var/list/turret_icons die() //the death process :( /obj/machinery/porta_turret/bullet_act(obj/item/projectile/Proj) - if(Proj.damage_type == HALLOSS) + var/damage = Proj.get_structure_damage() + + if(!damage) return if(enabled) @@ -383,8 +385,7 @@ var/list/turret_icons ..() - if((Proj.damage_type == BRUTE || Proj.damage_type == BURN)) - take_damage(Proj.damage) + take_damage(damage) /obj/machinery/porta_turret/emp_act(severity) if(enabled) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 96dda70158..1ee48b6b0b 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -601,7 +601,7 @@ if(prob(15)) break //give a chance to exit early - Proj.on_hit(src) + Proj.on_hit(src) //on_hit just returns if it's argument is not a living mob so does this actually do anything? return /obj/mecha/ex_act(severity) diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 424f55896b..3b566fee6e 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -40,7 +40,7 @@ /obj/effect/spider/bullet_act(var/obj/item/projectile/Proj) ..() - health -= Proj.damage + health -= Proj.get_structure_damage() healthcheck() /obj/effect/spider/proc/healthcheck() diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index e9670ce4d7..98e9ccdc5c 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -205,7 +205,7 @@ qdel(src) /obj/effect/energy_net/bullet_act(var/obj/item/projectile/Proj) - health -= Proj.damage + health -= Proj.get_structure_damage() healthcheck() return 0 diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 68aeecd912..5fab9c4554 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -195,11 +195,12 @@ qdel(src) /obj/structure/closet/bullet_act(var/obj/item/projectile/Proj) - if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN)) + var/proj_damage = Proj.get_structure_damage() + if(!proj_damage) return ..() - damage(Proj.damage) + damage(proj_damage) return diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm index 5458f3da94..3f5508fb97 100644 --- a/code/game/objects/structures/crates_lockers/closets/statue.dm +++ b/code/game/objects/structures/crates_lockers/closets/statue.dm @@ -86,7 +86,7 @@ shatter(M) /obj/structure/closet/statue/bullet_act(var/obj/item/projectile/Proj) - health -= Proj.damage + health -= Proj.get_structure_damage() check_health() return diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index bc6217f774..5d5b88b886 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -29,7 +29,7 @@ /obj/structure/displaycase/bullet_act(var/obj/item/projectile/Proj) - health -= Proj.damage + health -= Proj.get_structure_damage() ..() src.healthcheck() return diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 35a28558ae..744e277d9b 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -27,11 +27,10 @@ if(Proj.original != src && !prob(cover)) return PROJECTILE_CONTINUE //pass through - //Tasers and the like should not damage girders. - if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN)) + var/damage = Proj.get_structure_damage() + if(!damage) return - var/damage = Proj.damage if(!istype(Proj, /obj/item/projectile/beam)) damage *= 0.4 //non beams do reduced damage diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 149d6bf394..e1b3d2f2c7 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -64,13 +64,11 @@ /obj/structure/grille/bullet_act(var/obj/item/projectile/Proj) if(!Proj) return - //Tasers and the like should not damage grilles. - if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN)) - return - //Flimsy grilles aren't so great at stopping projectiles. However they can absorb some of the impact - var/damage = Proj.damage + var/damage = Proj.get_structure_damage() var/passthrough = 0 + + if(!damage) return //20% chance that the grille provides a bit more cover than usual. Support structure for example might take up 20% of the grille's area. //If they click on the grille itself then we assume they are aiming at the grille itself and the extra cover behaviour is always used. diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index f31b098b5b..c6b108825b 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -38,10 +38,10 @@ return 0 /obj/structure/inflatable/bullet_act(var/obj/item/projectile/Proj) - if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN)) - return + var/proj_damage = Proj.get_structure_damage() + if(!proj_damage) return - health -= Proj.damage + health -= proj_damage ..() if(health <= 0) deflate(1) diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 4a4ea63276..4baf5944df 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -30,10 +30,8 @@ /obj/structure/mirror/bullet_act(var/obj/item/projectile/Proj) - if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN)) - return - - if(prob(Proj.damage * 2)) + + if(prob(Proj.get_structure_damage() * 2)) if(!shattered) shatter() else diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 1fec557b8d..cc123ca1af 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -99,12 +99,11 @@ /obj/structure/window/bullet_act(var/obj/item/projectile/Proj) - //Tasers and the like should not damage windows. - if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN)) - return + var/proj_damage = Proj.get_structure_damage() + if(!proj_damage) return ..() - take_damage(Proj.damage) + take_damage(proj_damage) return diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 782be35e6e..ce764cd634 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -49,12 +49,10 @@ var/list/global/wall_cache = list() else if(istype(Proj,/obj/item/projectile/ion)) burn(500) - // Tasers and stuff? No thanks. Also no clone or tox damage crap. - if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN)) - return + var/proj_damage = Proj.get_structure_damage() //cap the amount of damage, so that things like emitters can't destroy walls in one hit. - var/damage = min(Proj.damage, 100) + var/damage = min(proj_damage, 100) take_damage(damage) return diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 37a8468e31..8894049549 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -89,6 +89,11 @@ return 0 return 1 +/obj/item/projectile/proc/get_structure_damage() + if(damage_type == BRUTE || damage_type == BURN) + return damage + return 0 + //return 1 if the projectile should be allowed to pass through after all, 0 if not. /obj/item/projectile/proc/check_penetrate(var/atom/A) return 1 diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 14cbd72d60..536e661f12 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -77,11 +77,14 @@ . = ..() bumped = 0 //can hit all mobs in a tile. pellets is decremented inside attack_mob so this should be fine. +/obj/item/projectile/bullet/pellet/proc/get_pellets(var/distance) + var/pellet_loss = round((distance - 1)/range_step) //pellets lost due to distance + return max(pellets - pellet_loss, 1) + /obj/item/projectile/bullet/pellet/attack_mob(var/mob/living/target_mob, var/distance, var/miss_modifier) if (pellets < 0) return 1 - var/pellet_loss = round((distance - 1)/range_step) //pellets lost due to distance - var/total_pellets = max(pellets - pellet_loss, 1) + var/total_pellets = get_pellets(distance) var/spread = max(base_spread - (spread_step*distance), 0) //shrapnel explosions miss prone mobs with a chance that increases with distance @@ -106,6 +109,10 @@ return 1 return 0 +/obj/item/projectile/bullet/pellet/get_structure_damage() + var/distance = get_dist(loc, starting) + return ..() * get_pellets(distance) + /obj/item/projectile/bullet/pellet/Move() . = ..() diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 9f4905540b..7406dff6b7 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -146,7 +146,7 @@ /obj/structure/reagent_dispensers/fueltank/bullet_act(var/obj/item/projectile/Proj) - if(Proj.damage_type == BRUTE || Proj.damage_type == BURN) + if(Proj.get_structure_damage()) if(istype(Proj.firer)) message_admins("[key_name_admin(Proj.firer)] shot fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]) (JMP).") log_game("[key_name(Proj.firer)] shot fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]).") diff --git a/code/modules/research/xenoarchaeology/machinery/coolant.dm b/code/modules/research/xenoarchaeology/machinery/coolant.dm index ccd8293ed0..ac56d07f99 100644 --- a/code/modules/research/xenoarchaeology/machinery/coolant.dm +++ b/code/modules/research/xenoarchaeology/machinery/coolant.dm @@ -9,7 +9,7 @@ reagents.add_reagent("coolant",1000) /obj/structure/reagent_dispensers/coolanttank/bullet_act(var/obj/item/projectile/Proj) - if(Proj.damage_type == BRUTE || Proj.damage_type == BURN) + if(Proj.get_structure_damage()) if(!istype(Proj ,/obj/item/projectile/beam/lastertag) && !istype(Proj ,/obj/item/projectile/beam/practice) ) explode() diff --git a/code/modules/shieldgen/emergency_shield.dm b/code/modules/shieldgen/emergency_shield.dm index cd6145d2f9..7b5449074f 100644 --- a/code/modules/shieldgen/emergency_shield.dm +++ b/code/modules/shieldgen/emergency_shield.dm @@ -60,7 +60,7 @@ ..() /obj/machinery/shield/bullet_act(var/obj/item/projectile/Proj) - health -= Proj.damage + health -= Proj.get_structure_damage() ..() check_failure() opacity = 1 diff --git a/code/modules/shieldgen/energy_field.dm b/code/modules/shieldgen/energy_field.dm index 7b26e1696f..04b471182b 100644 --- a/code/modules/shieldgen/energy_field.dm +++ b/code/modules/shieldgen/energy_field.dm @@ -25,7 +25,7 @@ Stress(0.5 + severity) /obj/effect/energy_field/bullet_act(var/obj/item/projectile/Proj) - Stress(Proj.damage / 10) + Stress(Proj.get_structure_damage() / 10) /obj/effect/energy_field/proc/Stress(var/severity) strength -= severity diff --git a/code/modules/shieldgen/sheldwallgen.dm b/code/modules/shieldgen/sheldwallgen.dm index 708798818a..696caa5ed4 100644 --- a/code/modules/shieldgen/sheldwallgen.dm +++ b/code/modules/shieldgen/sheldwallgen.dm @@ -214,7 +214,7 @@ ..() /obj/machinery/shieldwallgen/bullet_act(var/obj/item/projectile/Proj) - storedpower -= 400 * Proj.damage + storedpower -= 400 * Proj.get_structure_damage() ..() return @@ -285,7 +285,7 @@ G = gen_primary else G = gen_secondary - G.storedpower -= 400 * Proj.damage + G.storedpower -= 400 * Proj.get_structure_damage() ..() return diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index 624f9f11b5..e7e66f7558 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -278,10 +278,11 @@ // Then bring it inside to explode instantly upon landing on a valid turf. + var/proj_damage = Proj.get_structure_damage() if(istype(Proj, /obj/item/projectile/beam)) - power += Proj.damage * config_bullet_energy * CHARGING_FACTOR / POWER_FACTOR + power += proj_damage * config_bullet_energy * CHARGING_FACTOR / POWER_FACTOR else - damage += Proj.damage * config_bullet_energy + damage += proj_damage * config_bullet_energy return 0 /obj/machinery/power/supermatter/attack_robot(mob/user as mob) diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index 953dc519ea..3862632916 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -112,8 +112,7 @@ ..() /obj/vehicle/bullet_act(var/obj/item/projectile/Proj) - if (Proj.damage_type == BRUTE || Proj.damage_type == BURN) - health -= Proj.damage + health -= Proj.get_structure_damage() ..() healthcheck() From 4140a1d5ee6adce5fb9eeba9b2f14db9acd1a6df Mon Sep 17 00:00:00 2001 From: Kearel Date: Sun, 16 Aug 2015 23:42:16 -0500 Subject: [PATCH 014/178] Icon update, variables added Bikes are now based off variables, for easy child-making and for admins to change values. --- code/modules/vehicles/bike.dm | 34 ++++++++++++++++++++-------------- icons/obj/bike.dmi | Bin 829 -> 1473 bytes 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/code/modules/vehicles/bike.dm b/code/modules/vehicles/bike.dm index 8bb8dd688c..8136b06353 100644 --- a/code/modules/vehicles/bike.dm +++ b/code/modules/vehicles/bike.dm @@ -2,17 +2,21 @@ name = "space-bike" desc = "Space wheelies! Woo! " icon = 'icons/obj/bike.dmi' - icon_state = "bike_back_off" + icon_state = "bike_off" dir = SOUTH load_item_visible = 1 - mob_offset_y = 7 - + mob_offset_y = 5 health = 100 maxhealth = 100 fire_dam_coeff = 0.6 brute_dam_coeff = 0.5 + var/protection_percent = 60 + + var/land_speed = 10 //if 0 it can't go on turf + var/space_speed = 1 + var/bike_icon = "bike" var/datum/effect/effect/system/ion_trail_follow/ion var/kickstand = 1 @@ -22,7 +26,8 @@ ion = new /datum/effect/effect/system/ion_trail_follow() ion.set_up(src) turn_off() - overlays += image('icons/obj/bike.dmi', "bike_front_off", MOB_LAYER + 1) + overlays += image('icons/obj/bike.dmi', "[icon_state]_off_overlay", MOB_LAYER + 1) + icon_state = "[bike_icon]_off" /obj/vehicle/bike/verb/toggle() set name = "Toggle Engine" @@ -75,9 +80,6 @@ unload(load) user << "You unbuckle yourself from \the [src]" - -/obj/vehicle/bike/attackby(var/obj/item/weapon/W, var/mob/M) - //we want people to be able to place other people on the bikes. For now. /obj/vehicle/bike/relaymove(mob/user, direction) if(user != load || !on) return @@ -89,9 +91,13 @@ //these things like space, not turf. Dragging shouldn't weigh you down. if(istype(destination,/turf/space) || pulledby) - move_delay = 1 + if(!space_speed) + return 0 + move_delay = space_speed else - move_delay = 10 + if(!land_speed) + return 0 + move_delay = land_speed return ..() /obj/vehicle/bike/turn_on() @@ -112,7 +118,7 @@ ..() /obj/vehicle/bike/bullet_act(var/obj/item/projectile/Proj) - if(buckled_mob && prob(40)) + if(buckled_mob && prob(protection_percent)) buckled_mob.bullet_act(Proj) return ..() @@ -121,11 +127,11 @@ overlays.Cut() if(on) - overlays += image('icons/obj/bike.dmi', "bike_front_on", MOB_LAYER + 1) - icon_state = "bike_back_on" + overlays += image('icons/obj/bike.dmi', "[bike_icon]_on_overlay", MOB_LAYER + 1) + icon_state = "[bike_icon]_on" else - overlays += image('icons/obj/bike.dmi', "bike_front_off", MOB_LAYER + 1) - icon_state = "bike_back_off" + overlays += image('icons/obj/bike.dmi', "[bike_icon]_off_overlay", MOB_LAYER + 1) + icon_state = "[bike_icon]_off" ..() diff --git a/icons/obj/bike.dmi b/icons/obj/bike.dmi index 8b911b044c664a3a1a233d45040bcee845207109..69aa0ccb4efc21f0048c11314bc7c7f306abff63 100644 GIT binary patch delta 1392 zcmV-$1&{i@2EhxE7=H)@0002=;F0+N003-IOjJepiuV#UMkXdEGcz-Db8~QTa2Z2c zD|MSCXp12sAtxs%fPjF&zdfTgG#VNjAzOJmB^E#^7*jPL8%$+JEE*zQdgf_nF@><^ z=Bvb6SF^L0wKFh1Jv~fJOifKqUteDU003-kY*kfNE-o&ik`t!t00001bW%=J06^y0 zW&i*HeUVvCe?L!&i!&v&s2HS;i!-e#F*g;&HpEaDpAWPkC$W-9^=WBDDUfciwAMagIqlk%Z z^)ffZJDGg2z&_zi-PtG_DrStu(ft&20Py<};Qw>Zf3J-}vfJ&F&HOVixJ)J9*~FGT zDDs~?{(4M^Ks{tz_-{wRA;?Hi3VxGFDHYKd^<+xd2GBW4Plw>?DT=sKLXq&!ZPB^{ zK)xsCzBvE@6Iye|wHA!8?c4yw05}{D0Ej&R9Cn=oAl0yMK@k7W_XPloeg50C4-9}H z-4Q^fe^Sa+Yz3fu0PQ;on2@Piq^T6XHL?ysaVX{hc$`uNnA3QZMF;?4H3vW=RL}^G z0np-GKpYLn0A`A5lDz;?oEL@Gx+wCIS(H+G5X7K+;katuOIdcs4|J$uo2NKuQf%~y z4qx}Q#V)07ps`Pf#n0%dsxAbkFN39&Em5j0eB&T!4Od6EJ;dre6$^{M-XuY3f6MayVijN33SHSUPC^aIf4+U!#I za*YC9$FUIeqA$x!&UylTVZ6+HW07M4(q(__hkDWVsn%rj1Lzchse8FbeO_V^WL_Lv z4|@WTEdf3x0qk48Ly@C$SyHm8P zrU`dfW1(lhK^vOkwXsmWK@m+Iv zRx|$MuDJq$zrSnf!v&xbwu8~@OqDGFwK)%MREQ>D1&F#KWWHjj?A$a%fX4CVZxwm_ z|DJ|Dt=DT%P*6}%P|)VO+_2oqe}5Mrn6IL>-o*8y_yGB*_`s6B{2IguCZ+}P0rGF+ z12+gve8B5{KES*vJ`nYf=hyvTi6CE%F5ip~ECl$0`uKp~JQE*S6QGL^`2Ekt2i8*` zAD9F1#|PE~XrGQ}&EELHngDHlV9xA~53CAsV+6d9=W7CV@qxPmbn$^Xf3r6}ur7do zJfAar;{*Q=U@kteCP8?T4+{AMA%Eaj{=gsHvi%A910jDP56djQk_g8YFc0JiR;{DBF;&HMoi z5b_5?{y@kd2>Amce_)A1QvN_tP*6}%(0{6sKky&q519DC4T3H62inK;>;AXQA6NqL y1KrLa@Wlt#1PJ*9A%7s`4}|=IkUtP~5B&wH>V~_RUQ5&f0000OegCB-MnazqP>k$}$t zO_6`cr=Px`5Kc~|AP@sM>*Fw>UoXXCFzsb9P3BdDWNv40o?ykmOR!cUffY1Q*z*QN z$qedqLxga_w>=dOZ46ckCV0uVhq&-AYen(iZm}Rl47mZ4>IQ7L)7n(sz+Wvu;g5RN z0j<(Bz2OFiz{cRaN^cc2SQ5d76#*#Vhp>Mn04sx`0;P7F{>Bh!3j;v}?B4QcMDTfL zV?YGlAT|V622}!~4Z-?&0wIXN?s1d~D%&15A0{U!r&o~62g2n8@e=vq>%+tA=7XP< z55~-3Ndza(2ZrFZ`M?mIHXjgy%Lh(QPDcF$NB_LA=kwLm;F)~Tg@79zL2%IEH*0^J z2K0g@U__n|%sW>imT&GgYn!5PL}IFgr{k89@uWylzPg(POkPTb5MmaTXHG&i!31bH zop&Jk06@#XXb7_6+X0gZ^bJ`6{K`lEn#OM-kZ~MGco)OPd5$1WFTTQnCJLs_x@`6x z!c6PU$Gd3q_$kW`OfR^)Hsi%1JWhY9iQ5QhPkNt$CbELSH#=|36JDe>?M%bBKjk@~ z9t~`?4!V4SB}_6ZU(?^yNzA~fA^Pj`#Cj3@uamI5jO9Ql0zp?RU$?uF&MFg5PEPMx zE+4cIaDyWV-a|gv@_aCUQ~6+YC?DMCH7}bFM%(s$FureDR3Ye_4@TSee9#+-z~zHC ZpnppEp)`-_p|b!0002ovPDHLkV1nxBOb!45 From f834263f84cb8a4207dac8779892253ae5d94c98 Mon Sep 17 00:00:00 2001 From: Kelenius Date: Fri, 21 Aug 2015 13:00:57 +0300 Subject: [PATCH 015/178] Fixes a borg charger bump runtime --- code/game/machinery/rechargestation.dm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index c20ca8468a..8a63e754fd 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -196,8 +196,9 @@ if(icon_update_tick == 0) build_overlays() -/obj/machinery/recharge_station/Bumped(var/mob/AM) - move_inside(AM) +/obj/machinery/recharge_station/Bumped(var/mob/living/silicon/robot/R) + if(istype(R)) + go_in(R) /obj/machinery/recharge_station/proc/go_out() if(!(occupant)) @@ -208,6 +209,12 @@ update_icon() return +/obj/machinery/recharge_station/proc/go_in(var/mob/living/silicon/robot/R) + R.reset_view(src) + R.loc = src + occupant = R + update_icon() + /obj/machinery/recharge_station/verb/move_eject() set category = "Object" set src in oview(1) @@ -235,8 +242,5 @@ usr << "Without a powercell, you can't be recharged." return - usr.reset_view(src) - usr.loc = src - occupant = usr + go_in(usr) add_fingerprint(usr) - update_icon() From c074f9ee9e702cb121b2d6f7aa3db358372cacc9 Mon Sep 17 00:00:00 2001 From: Kelenius Date: Fri, 21 Aug 2015 13:01:35 +0300 Subject: [PATCH 016/178] Fixes a runtime with lights during explosions --- code/modules/power/lighting.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 530206d3b5..aa3715525a 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -390,8 +390,8 @@ // returns whether this light has power // true if area has power and lightswitch is on /obj/machinery/light/proc/has_power() - var/area/A = src.loc.loc - return A.lightswitch && (!A.requires_power || A.power_light) + var/area/A = get_area(src) + return A && A.lightswitch && (!A.requires_power || A.power_light) /obj/machinery/light/proc/flicker(var/amount = rand(10, 20)) if(flickering) return From 035f551743a3bd4008cf4babe8597ab4d4ca2634 Mon Sep 17 00:00:00 2001 From: Kelenius Date: Fri, 21 Aug 2015 13:18:19 +0300 Subject: [PATCH 017/178] Makes use of forceMove --- code/game/machinery/rechargestation.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 8a63e754fd..57cd77b066 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -203,7 +203,7 @@ /obj/machinery/recharge_station/proc/go_out() if(!(occupant)) return - occupant.loc = loc + occupant.forceMove(loc) occupant.reset_view() occupant = null update_icon() @@ -211,7 +211,7 @@ /obj/machinery/recharge_station/proc/go_in(var/mob/living/silicon/robot/R) R.reset_view(src) - R.loc = src + R.forceMove(src) occupant = R update_icon() From 55d1bbf735e0a6be0678e65097e9d67b4992a5e9 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Fri, 21 Aug 2015 19:26:20 +0200 Subject: [PATCH 018/178] Fixes new unbalanced tag. --- code/modules/admin/secrets/admin_secrets/bombing_list.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/admin/secrets/admin_secrets/bombing_list.dm b/code/modules/admin/secrets/admin_secrets/bombing_list.dm index fa3f268396..f94af7e569 100644 --- a/code/modules/admin/secrets/admin_secrets/bombing_list.dm +++ b/code/modules/admin/secrets/admin_secrets/bombing_list.dm @@ -6,7 +6,7 @@ if(!.) return - var/dat = "Bombing List
    " + var/dat = "Bombing List" for(var/l in bombers) dat += text("[l]
    ") user << browse(dat, "window=bombers") From ca39b8277c663d292fe7dd6634e50ef70e23588f Mon Sep 17 00:00:00 2001 From: Soadreqm Date: Fri, 21 Aug 2015 20:46:19 +0300 Subject: [PATCH 019/178] Create Soadreqm-PR-10398 --- html/changelogs/Soadreqm-PR-10398 | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 html/changelogs/Soadreqm-PR-10398 diff --git a/html/changelogs/Soadreqm-PR-10398 b/html/changelogs/Soadreqm-PR-10398 new file mode 100644 index 0000000000..f760994abc --- /dev/null +++ b/html/changelogs/Soadreqm-PR-10398 @@ -0,0 +1,6 @@ +author: Soadreqm + +delete-after: True + +changes: + - tweak: "Increased changeling starting genetic points to 25." From d2ee97c6b77f924e1c8ac5f4bf60831be5080737 Mon Sep 17 00:00:00 2001 From: Kelenius Date: Mon, 24 Aug 2015 09:59:57 +0300 Subject: [PATCH 020/178] You guys are hard to please --- code/game/machinery/rechargestation.dm | 44 +++++++++++++------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 57cd77b066..6f3041dd6d 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -200,46 +200,46 @@ if(istype(R)) go_in(R) -/obj/machinery/recharge_station/proc/go_out() - if(!(occupant)) - return - occupant.forceMove(loc) - occupant.reset_view() - occupant = null - update_icon() - return - /obj/machinery/recharge_station/proc/go_in(var/mob/living/silicon/robot/R) + if(!istype(R)) + return + if(occupant) + return + R.reset_view(src) R.forceMove(src) occupant = R update_icon() +/obj/machinery/recharge_station/proc/go_out() + if(!occupant) + return + + occupant.forceMove(loc) + occupant.reset_view() + occupant = null + update_icon() + /obj/machinery/recharge_station/verb/move_eject() set category = "Object" + set name = "Eject Recharger" set src in oview(1) - if(usr.stat != 0) + + // TODO : Change to incapacitated() on merge. + if(usr.stat || usr.lying || usr.resting || usr.buckled) return + go_out() add_fingerprint(usr) return /obj/machinery/recharge_station/verb/move_inside() set category = "Object" + set name = "Enter Recharger" set src in oview(1) - if(usr.stat == DEAD) - return - if(occupant) - usr << "\The [src] is already occupied!" - return - - var/mob/living/silicon/robot/R = usr - if(!istype(R)) - usr << "Only synthetics may enter the recharger!" - return - if(!R.cell) - usr << "Without a powercell, you can't be recharged." + // TODO : Change to incapacitated() on merge. + if(usr.stat || usr.lying || usr.resting || usr.buckled) return go_in(usr) From a6cdeee95cf7c5e30593bb0ef427ce2db9948442 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Tue, 1 Sep 2015 23:37:56 +0100 Subject: [PATCH 021/178] Add autohiss/purr on a per-client toggle --- baystation12.dme | 1 + code/modules/mob/living/autohiss.dm | 89 +++++++++++++++++++++++++++++ code/modules/mob/living/say.dm | 2 + 3 files changed, 92 insertions(+) create mode 100644 code/modules/mob/living/autohiss.dm diff --git a/baystation12.dme b/baystation12.dme index 32628ed0ae..3b9e19da44 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1206,6 +1206,7 @@ #include "code\modules\mob\language\outsider.dm" #include "code\modules\mob\language\station.dm" #include "code\modules\mob\language\synthetic.dm" +#include "code\modules\mob\living\autohiss.dm" #include "code\modules\mob\living\damage_procs.dm" #include "code\modules\mob\living\default_language.dm" #include "code\modules\mob\living\life.dm" diff --git a/code/modules/mob/living/autohiss.dm b/code/modules/mob/living/autohiss.dm new file mode 100644 index 0000000000..f3f3989b37 --- /dev/null +++ b/code/modules/mob/living/autohiss.dm @@ -0,0 +1,89 @@ + +#define AUTOHISS_OFF 0 +#define AUTOHISS_SR 1 +#define AUTOHISS_SRX 2 + +#define AUTOHISS_NUM 3 + + +/mob/living/proc/handle_autohiss(message, datum/language/L) + return message // no autohiss at this level + +/mob/living/carbon/human/handle_autohiss(message, datum/language/L) + if(!client || client.autohiss_mode == AUTOHISS_OFF) // no need to process if there's no client or they have autohiss off + return message + return species.handle_autohiss(message, L, client.autohiss_mode) + +/client + var/autohiss_mode = 0 + +/client/verb/toggle_autohiss() + set name = "Toggle Auto-Hiss" + set desc = "Toggle automatic hissing as Unathi and r-rolling as Taj" + set category = "OOC" + + autohiss_mode = (autohiss_mode + 1) % AUTOHISS_NUM + switch(autohiss_mode) + if(AUTOHISS_OFF) + src << "Auto-hiss is now OFF." + if(AUTOHISS_SR) + src << "Auto-hiss is now ON for 's' (Unathi) and 'r' (Tajara)." + if(AUTOHISS_SRX) + src << "Auto-hiss is now ON for 's', 'x' (Unathi) and 'r' (Tajara)." + else + soft_assert(0, "invalid autohiss value [autohiss_mode]") + autohiss_mode = AUTOHISS_OFF + src << "Auto-hiss is now OFF." + +/datum/species/proc/handle_autohiss(message, datum/language/lang, mode) + return message + +/datum/species/unathi/handle_autohiss(message, datum/language/lang, mode) + if(lang.name == "Sinta'unathi") // Sinta'unathi has no autohiss + return message + + . = list() + while(length(message)) + var/i = findtext(message, "s") + var/j = findtext(message, "x") + if(!i && !j) + . += message + break + if(!j || (i && j && i Date: Wed, 2 Sep 2015 19:07:20 +0100 Subject: [PATCH 022/178] Cleans up auto-hiss, makes declaring new auto-hiss strings a simple list declaration --- code/modules/mob/living/autohiss.dm | 101 +++++++++++++++------------- 1 file changed, 55 insertions(+), 46 deletions(-) diff --git a/code/modules/mob/living/autohiss.dm b/code/modules/mob/living/autohiss.dm index f3f3989b37..9c670545ad 100644 --- a/code/modules/mob/living/autohiss.dm +++ b/code/modules/mob/living/autohiss.dm @@ -1,7 +1,7 @@ #define AUTOHISS_OFF 0 -#define AUTOHISS_SR 1 -#define AUTOHISS_SRX 2 +#define AUTOHISS_BASIC 1 +#define AUTOHISS_FULL 2 #define AUTOHISS_NUM 3 @@ -26,64 +26,73 @@ switch(autohiss_mode) if(AUTOHISS_OFF) src << "Auto-hiss is now OFF." - if(AUTOHISS_SR) - src << "Auto-hiss is now ON for 's' (Unathi) and 'r' (Tajara)." - if(AUTOHISS_SRX) - src << "Auto-hiss is now ON for 's', 'x' (Unathi) and 'r' (Tajara)." + if(AUTOHISS_BASIC) + src << "Auto-hiss is now BASIC." + if(AUTOHISS_FULL) + src << "Auto-hiss is now FULL." else soft_assert(0, "invalid autohiss value [autohiss_mode]") autohiss_mode = AUTOHISS_OFF src << "Auto-hiss is now OFF." +/datum/species + var/autohiss_basic_map = null + var/autohiss_extra_map = null + var/autohiss_exempt = null + +/datum/species/unathi + autohiss_basic_map = list( + "s" = list("ss", "sss", "ssss") + ) + autohiss_extra_map = list( + "x" = list("ks", "kss", "ksss") + ) + autohiss_exempt = list("Sinta'unathi") + +/datum/species/tajaran + autohiss_basic_map = list( + "r" = list("rr", "rrr", "rrrr") + ) + autohiss_exempt = list("Siik'tajr") + + /datum/species/proc/handle_autohiss(message, datum/language/lang, mode) - return message - -/datum/species/unathi/handle_autohiss(message, datum/language/lang, mode) - if(lang.name == "Sinta'unathi") // Sinta'unathi has no autohiss + if(!autohiss_basic_map) + return message + if(autohiss_exempt && (lang.name in autohiss_exempt)) return message - . = list() - while(length(message)) - var/i = findtext(message, "s") - var/j = findtext(message, "x") - if(!i && !j) - . += message - break - if(!j || (i && j && i Date: Wed, 2 Sep 2015 19:10:38 +0100 Subject: [PATCH 023/178] Changelog entry --- html/changelogs/GinjaNinja32-autohiss.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 html/changelogs/GinjaNinja32-autohiss.yml diff --git a/html/changelogs/GinjaNinja32-autohiss.yml b/html/changelogs/GinjaNinja32-autohiss.yml new file mode 100644 index 0000000000..129e632277 --- /dev/null +++ b/html/changelogs/GinjaNinja32-autohiss.yml @@ -0,0 +1,5 @@ +author: GinjaNinja32 +delete-after: True +changes: + - rscadd: "Added an auto-hiss system for those who would prefer the game do their sss or rrr for them. Activate via Toggle Auto-Hiss in the OOC tab." + - rscadd: "Auto-hiss system in 'basic' mode will extend 's' for Unathi and 'r' for Tajara. 'Full' mode adds 'x' to 'ks' for Unathi, and is identical to 'basic' mode for Tajara." From 9dca74f75582fc0b9b67525950e19b80e0def096 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Wed, 2 Sep 2015 19:11:59 +0100 Subject: [PATCH 024/178] add list typing to maps and exemption list --- code/modules/mob/living/autohiss.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/autohiss.dm b/code/modules/mob/living/autohiss.dm index 9c670545ad..ebc2a6d36f 100644 --- a/code/modules/mob/living/autohiss.dm +++ b/code/modules/mob/living/autohiss.dm @@ -36,9 +36,9 @@ src << "Auto-hiss is now OFF." /datum/species - var/autohiss_basic_map = null - var/autohiss_extra_map = null - var/autohiss_exempt = null + var/list/autohiss_basic_map = null + var/list/autohiss_extra_map = null + var/list/autohiss_exempt = null /datum/species/unathi autohiss_basic_map = list( From 00a05bbdaa86591975f7c9b79d7101be9bca0e39 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Wed, 2 Sep 2015 19:39:50 +0100 Subject: [PATCH 025/178] Remove a world.log print, change '0' to 'AUTOHISS_OFF' for clarity --- code/modules/mob/living/autohiss.dm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/modules/mob/living/autohiss.dm b/code/modules/mob/living/autohiss.dm index ebc2a6d36f..9884c51833 100644 --- a/code/modules/mob/living/autohiss.dm +++ b/code/modules/mob/living/autohiss.dm @@ -15,7 +15,7 @@ return species.handle_autohiss(message, L, client.autohiss_mode) /client - var/autohiss_mode = 0 + var/autohiss_mode = AUTOHISS_OFF /client/verb/toggle_autohiss() set name = "Toggle Auto-Hiss" @@ -88,8 +88,6 @@ . += pick(map[min_char]) message = copytext(message, min_index + 1) - for(var/x = 1 to length(.)) - world.log << "[x]: [.[x]]" return list2text(.) #undef AUTOHISS_OFF From 1f39768ce1de98c1747c34874bfca9f446774c8c Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Fri, 4 Sep 2015 08:09:05 +0200 Subject: [PATCH 026/178] Vent crawling now explicitly checks for equipped items. Fixes #10991. --- code/modules/mob/inventory.dm | 15 +++++++++------ code/modules/mob/living/living.dm | 22 +++++----------------- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 1115826be8..754d3cfa7b 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -221,18 +221,21 @@ var/list/slot_equipment_priority = list( \ if(!I) //If there's nothing to drop, the drop is automatically successful. return 1 - var/slot - for(var/s in slot_back to slot_tie) //kind of worries me - if(get_equipped_item(s) == I) - slot = s - break - + var/slot = get_inventory_slot(I) if(slot && !I.mob_can_unequip(src, slot)) return 0 drop_from_inventory(I) return 1 +/mob/proc/get_inventory_slot(obj/item/I) + var/slot + for(var/s in slot_back to slot_tie) //kind of worries me + if(get_equipped_item(s) == I) + slot = s + break + return slot + //Attemps to remove an object on a mob. /mob/proc/remove_from_mob(var/obj/O) src.u_equip(O) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index e5b5f858d8..7beb7ee356 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -656,27 +656,15 @@ default behaviour is: set category = "IC" resting = !resting - src << "\blue You are now [resting ? "resting" : "getting up"]" + src << "You are now [resting ? "resting" : "getting up"]" /mob/living/proc/is_allowed_vent_crawl_item(var/obj/item/carried_item) - if(istype(carried_item, /obj/item/weapon/implant)) - return 1 - if(istype(carried_item, /obj/item/clothing/mask/facehugger)) - return 1 - return 0 - -/mob/living/carbon/is_allowed_vent_crawl_item(var/obj/item/carried_item) - if(carried_item in internal_organs) - return 1 - return ..() - -/mob/living/carbon/human/is_allowed_vent_crawl_item(var/obj/item/carried_item) - if(carried_item in organs) - return 1 - return ..() + return isnull(get_inventory_slot(carried_item)) /mob/living/simple_animal/spiderbot/is_allowed_vent_crawl_item(var/obj/item/carried_item) - return carried_item != held_item + if(carried_item == held_item) + return 0 + return ..() /mob/living/proc/handle_ventcrawl(var/obj/machinery/atmospherics/unary/vent_pump/vent_found = null, var/ignore_items = 0) // -- TLE -- Merged by Carn if(stat) From 89a7c9667b5ae12cc1f2a61ee85c84f4c0514438 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 5 Sep 2015 17:31:27 +0930 Subject: [PATCH 027/178] Reverts a testing value. --- code/game/gamemodes/traitor/traitor.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index d4b93665ce..587a05bbd9 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -8,10 +8,9 @@ uplink_welcome = "AntagCorp Portable Teleportation Relay:" end_on_antag_death = 1 antag_tags = list(MODE_TRAITOR) - antag_scaling_coeff = 10 + antag_scaling_coeff = 8 /datum/game_mode/traitor/auto name = "autotraitor" config_tag = "autotraitor" round_autoantag = 1 - antag_scaling_coeff = 1 \ No newline at end of file From 90c9d317828bc20a04a1f3cdc52eb001b38f5d29 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 5 Sep 2015 18:40:32 +0930 Subject: [PATCH 028/178] Refactored the antagHUD to work better with the new antagonist system. --- code/game/antagonist/alien/borer.dm | 1 + code/game/antagonist/alien/xenomorph.dm | 1 + code/game/antagonist/antagonist.dm | 6 ++++ code/game/antagonist/outsider/deathsquad.dm | 1 + code/game/antagonist/outsider/ert.dm | 1 + code/game/antagonist/outsider/mercenary.dm | 1 + code/game/antagonist/outsider/ninja.dm | 1 + code/game/antagonist/outsider/raider.dm | 1 + code/game/antagonist/outsider/wizard.dm | 1 + code/game/antagonist/station/changeling.dm | 1 + code/game/antagonist/station/cultist.dm | 1 + code/game/antagonist/station/loyalist.dm | 1 + code/game/antagonist/station/revolutionary.dm | 1 + code/game/antagonist/station/rogue_ai.dm | 2 +- code/global.dm | 1 + code/modules/mob/dead/observer/observer.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 34 +++--------------- icons/mob/hud.dmi | Bin 3643 -> 3686 bytes 18 files changed, 26 insertions(+), 31 deletions(-) diff --git a/code/game/antagonist/alien/borer.dm b/code/game/antagonist/alien/borer.dm index aabb6bd7e3..f43550dc6a 100644 --- a/code/game/antagonist/alien/borer.dm +++ b/code/game/antagonist/alien/borer.dm @@ -8,6 +8,7 @@ var/datum/antagonist/xenos/borer/borers bantype = "Borer" welcome_text = "Use your Infest power to crawl into the ear of a host and fuse with their brain. You can only take control temporarily, and at risk of hurting your host, so be clever and careful; your host is encouraged to help you however they can. Talk to your fellow borers with :x." antag_indicator = "brainworm" + antaghud_indicator = "hudborer" faction_role_text = "Borer Thrall" faction_descriptor = "Unity" diff --git a/code/game/antagonist/alien/xenomorph.dm b/code/game/antagonist/alien/xenomorph.dm index f6a8bc5cb1..4603fc5d1c 100644 --- a/code/game/antagonist/alien/xenomorph.dm +++ b/code/game/antagonist/alien/xenomorph.dm @@ -9,6 +9,7 @@ var/datum/antagonist/xenos/xenomorphs bantype = "Xenomorph" flags = ANTAG_OVERRIDE_MOB | ANTAG_RANDSPAWN | ANTAG_OVERRIDE_JOB | ANTAG_VOTABLE welcome_text = "Hiss! You are a larval alien. Hide and bide your time until you are ready to evolve." + antaghud_indicator = "hudalien" hard_cap = 5 hard_cap_round = 8 diff --git a/code/game/antagonist/antagonist.dm b/code/game/antagonist/antagonist.dm index 3be89beba1..faf7526a9c 100644 --- a/code/game/antagonist/antagonist.dm +++ b/code/game/antagonist/antagonist.dm @@ -19,6 +19,7 @@ var/role_text_plural = "Traitors" // As above but plural. // Visual references. + var/antaghud_indicator = "hudsyndicate" // Used by the ghost antagHUD. var/antag_indicator // icon_state for icons/mob/mob.dm visual indicator. var/faction_indicator // See antag_indicator, but for factionalized people only. var/faction_invisible // Can members of the faction identify other antagonists? @@ -76,6 +77,11 @@ role_text_plural = role_text if(config.protect_roles_from_antagonist) restricted_jobs |= protected_jobs + if(antaghud_indicator) + if(!hud_icon_reference) + hud_icon_reference = list() + if(role_text) hud_icon_reference[role_text] = antaghud_indicator + if(faction_role_text) hud_icon_reference[faction_role_text] = antaghud_indicator /datum/antagonist/proc/tick() return 1 diff --git a/code/game/antagonist/outsider/deathsquad.dm b/code/game/antagonist/outsider/deathsquad.dm index afd1d8b253..2740adf8ae 100644 --- a/code/game/antagonist/outsider/deathsquad.dm +++ b/code/game/antagonist/outsider/deathsquad.dm @@ -9,6 +9,7 @@ var/datum/antagonist/deathsquad/deathsquad landmark_id = "Commando" flags = ANTAG_OVERRIDE_JOB | ANTAG_OVERRIDE_MOB | ANTAG_HAS_NUKE | ANTAG_HAS_LEADER default_access = list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage) + antaghud_indicator = "huddeathsquad" hard_cap = 4 hard_cap_round = 8 diff --git a/code/game/antagonist/outsider/ert.dm b/code/game/antagonist/outsider/ert.dm index 64338c5a93..67d98f8ae5 100644 --- a/code/game/antagonist/outsider/ert.dm +++ b/code/game/antagonist/outsider/ert.dm @@ -10,6 +10,7 @@ var/datum/antagonist/ert/ert leader_welcome_text = "As leader of the Emergency Response Team, you answer only to CentComm, and have authority to override the Captain where it is necessary to achieve your mission goals. It is recommended that you attempt to cooperate with the captain where possible, however." landmark_id = "Response Team" flags = ANTAG_OVERRIDE_JOB | ANTAG_SET_APPEARANCE | ANTAG_HAS_LEADER | ANTAG_CHOOSE_NAME + antaghud_indicator = "hudloyalist" hard_cap = 5 hard_cap_round = 7 diff --git a/code/game/antagonist/outsider/mercenary.dm b/code/game/antagonist/outsider/mercenary.dm index 69d9f60420..a8b03e605d 100644 --- a/code/game/antagonist/outsider/mercenary.dm +++ b/code/game/antagonist/outsider/mercenary.dm @@ -12,6 +12,7 @@ var/datum/antagonist/mercenary/mercs welcome_text = "To speak on the strike team's private channel use :t." flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_HAS_NUKE | ANTAG_SET_APPEARANCE | ANTAG_HAS_LEADER id_type = /obj/item/weapon/card/id/syndicate + antaghud_indicator = "hudoperative" hard_cap = 4 hard_cap_round = 8 diff --git a/code/game/antagonist/outsider/ninja.dm b/code/game/antagonist/outsider/ninja.dm index d44f9c545a..7a4b135db5 100644 --- a/code/game/antagonist/outsider/ninja.dm +++ b/code/game/antagonist/outsider/ninja.dm @@ -9,6 +9,7 @@ var/datum/antagonist/ninja/ninjas landmark_id = "ninjastart" welcome_text = "You are an elite mercenary assassin of the Spider Clan. You have a variety of abilities at your disposal, thanks to your nano-enhanced cyber armor." flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_RANDSPAWN | ANTAG_VOTABLE | ANTAG_SET_APPEARANCE + antaghud_indicator = "hudninja" initial_spawn_req = 1 initial_spawn_target = 1 diff --git a/code/game/antagonist/outsider/raider.dm b/code/game/antagonist/outsider/raider.dm index 9f93d39738..c74afc2acd 100644 --- a/code/game/antagonist/outsider/raider.dm +++ b/code/game/antagonist/outsider/raider.dm @@ -10,6 +10,7 @@ var/datum/antagonist/raider/raiders landmark_id = "voxstart" welcome_text = "Use :H to talk on your encrypted channel." flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_VOTABLE | ANTAG_SET_APPEARANCE | ANTAG_HAS_LEADER + antaghud_indicator = "hudmutineer" hard_cap = 6 hard_cap_round = 10 diff --git a/code/game/antagonist/outsider/wizard.dm b/code/game/antagonist/outsider/wizard.dm index af1fc09e8e..f6741cafa0 100644 --- a/code/game/antagonist/outsider/wizard.dm +++ b/code/game/antagonist/outsider/wizard.dm @@ -9,6 +9,7 @@ var/datum/antagonist/wizard/wizards landmark_id = "wizard" welcome_text = "You will find a list of available spells in your spell book. Choose your magic arsenal carefully.
    In your pockets you will find a teleport scroll. Use it as needed." flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_VOTABLE | ANTAG_SET_APPEARANCE + antaghud_indicator = "hudwizard" hard_cap = 1 hard_cap_round = 3 diff --git a/code/game/antagonist/station/changeling.dm b/code/game/antagonist/station/changeling.dm index f6307b8ae8..a592bc03c1 100644 --- a/code/game/antagonist/station/changeling.dm +++ b/code/game/antagonist/station/changeling.dm @@ -9,6 +9,7 @@ protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain") welcome_text = "Use say \":g message\" to communicate with your fellow changelings. Remember: you get all of their absorbed DNA if you absorb them." flags = ANTAG_SUSPICIOUS | ANTAG_RANDSPAWN | ANTAG_VOTABLE + antaghud_indicator = "hudchangeling" /datum/antagonist/changeling/get_special_objective_text(var/datum/mind/player) return "
    Changeling ID: [player.changeling.changelingID].
    Genomes Absorbed: [player.changeling.absorbedcount]" diff --git a/code/game/antagonist/station/cultist.dm b/code/game/antagonist/station/cultist.dm index ff0d049b67..dda799ba11 100644 --- a/code/game/antagonist/station/cultist.dm +++ b/code/game/antagonist/station/cultist.dm @@ -26,6 +26,7 @@ var/datum/antagonist/cultist/cult hard_cap_round = 6 initial_spawn_req = 4 initial_spawn_target = 6 + antaghud_indicator = "hudcultist" var/allow_narsie = 1 var/datum/mind/sacrifice_target diff --git a/code/game/antagonist/station/loyalist.dm b/code/game/antagonist/station/loyalist.dm index 4b95467691..fddf0c3796 100644 --- a/code/game/antagonist/station/loyalist.dm +++ b/code/game/antagonist/station/loyalist.dm @@ -13,6 +13,7 @@ var/datum/antagonist/loyalists/loyalists loss_text = "The heads of staff did not stop the revolution!" victory_feedback_tag = "win - rev heads killed" loss_feedback_tag = "loss - heads killed" + antaghud_indicator = "hudloyalist" flags = 0 hard_cap = 2 diff --git a/code/game/antagonist/station/revolutionary.dm b/code/game/antagonist/station/revolutionary.dm index f3454cf756..96e3752991 100644 --- a/code/game/antagonist/station/revolutionary.dm +++ b/code/game/antagonist/station/revolutionary.dm @@ -14,6 +14,7 @@ var/datum/antagonist/revolutionary/revs victory_feedback_tag = "win - heads killed" loss_feedback_tag = "loss - rev heads killed" flags = ANTAG_SUSPICIOUS | ANTAG_VOTABLE + antaghud_indicator = "hudrevolutionary" hard_cap = 2 hard_cap_round = 4 diff --git a/code/game/antagonist/station/rogue_ai.dm b/code/game/antagonist/station/rogue_ai.dm index c8dcaff19e..52fa7e3f38 100644 --- a/code/game/antagonist/station/rogue_ai.dm +++ b/code/game/antagonist/station/rogue_ai.dm @@ -15,7 +15,7 @@ var/datum/antagonist/rogue_ai/malf hard_cap_round = 1 initial_spawn_req = 1 initial_spawn_target = 1 - + antaghud_indicator = "hudmalai" /datum/antagonist/rogue_ai/New() ..() diff --git a/code/global.dm b/code/global.dm index bfb1806b80..7d7b21970a 100644 --- a/code/global.dm +++ b/code/global.dm @@ -12,6 +12,7 @@ var/global/list/processing_power_items = list() var/global/list/active_diseases = list() var/global/list/med_hud_users = list() // List of all entities using a medical HUD. var/global/list/sec_hud_users = list() // List of all entities using a security HUD. +var/global/list/hud_icon_reference = list() // Those networks can only be accessed by pre-existing terminals. AIs and new terminals can't use them. var/list/restricted_camera_networks = list("thunder","ERT","NUKE","Secret") diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 25ba18a479..675b017936 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -123,7 +123,7 @@ Works together with spawning an observer, noted above. if(antagHUD) var/list/target_list = list() for(var/mob/living/target in oview(src, 14)) - if(target.mind&&(target.mind.special_role||issilicon(target)) ) + if(target.mind && target.mind.special_role) target_list += target if(target_list.len) assess_targets(target_list, src) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 75a07a528c..b9f5b513e8 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1679,35 +1679,11 @@ if (BITTEST(hud_updateflag, SPECIALROLE_HUD)) var/image/holder = hud_list[SPECIALROLE_HUD] holder.icon_state = "hudblank" - if(mind) - - // TODO: Update to new antagonist system. - switch(mind.special_role) - if("traitor","Mercenary") - holder.icon_state = "hudsyndicate" - if("Revolutionary") - holder.icon_state = "hudrevolutionary" - if("Head Revolutionary") - holder.icon_state = "hudheadrevolutionary" - if("Cultist") - holder.icon_state = "hudcultist" - if("Changeling") - holder.icon_state = "hudchangeling" - if("Wizard","Fake Wizard") - holder.icon_state = "hudwizard" - if("Death Commando") - holder.icon_state = "huddeathsquad" - if("Ninja") - holder.icon_state = "hudninja" - if("head_loyalist") - holder.icon_state = "hudloyalist" - if("loyalist") - holder.icon_state = "hudloyalist" - if("head_mutineer") - holder.icon_state = "hudmutineer" - if("mutineer") - holder.icon_state = "hudmutineer" - + if(mind && mind.special_role) + if(hud_icon_reference[mind.special_role]) + holder.icon_state = hud_icon_reference[mind.special_role] + else + holder.icon_state = "hudsyndicate" hud_list[SPECIALROLE_HUD] = holder hud_updateflag = 0 diff --git a/icons/mob/hud.dmi b/icons/mob/hud.dmi index f6da88ca3543acee4986735693f7464798cbe103..0d3e68db0363128a4ba568200dc400f0da03ffbc 100644 GIT binary patch delta 3007 zcmZ9Mc{~#g7{?>avDZ2GF_WV;A&faP8@XT15h5)|v2x{X!ZZ|0?L|~9b44j~Ge-)w z2y;Zj6h@9Lw>jVU{jX2YU(e_H{Qh{p-#>m$va_dOqx`6T)4$SW?QdW$m5Zhl|I3vQ+(4A{eMhWiLi=_Fv@oYSE{oc($%+#Eah}36Sy={=yW=;_?=T ztn@wFUhXLV5+y_l!}YCW6lw90M-8W{D(4`T+;h28)t_BTpDQn_aLpy`)!mDqGS9c- z8@&eQr_1KXOfiG--V` zf26D=`@^98GvjOnHV$vK<6i&OMWheEHh^!xt_x%|7BjD{pZ)(g70ZEzt~0g_IJ&Qx9GfG(i_SS*iiHSDL!+K<`{! z^ruZm3$(YV5gD7(!3a2?wY&LMxUzq{*^U_jxT=;*>5sZsMRd$AddEX;uqAqDeRd^P z*!Yvg;Be}FF;RPEUv!{iB86YZ4IK)2H4P{hkyC>%h{(XjI@T!;fyo};Cj+4!BG+X4 zb7~-#5_ITD(H+MW=VX-$WTGcSI1+F1g(>Hi9rf<#>XAQ&5bqL#Gva3({ttJ~-t=jC zi2@OM#IvN-18EvfOR;lw=#TvfINuIRE{%wEvnZszH5j&| zZ<`m7>Z!C=x&qR0hF=|$MHU?1r%}=rV5P27K(2fu^nHTzZN36Y;1f73xnp_N^8yMa z)y?&g5d1Y@bf`-|LKI|;Gfoxvbs;TWN2f~E;Hw>l&N53W_jEd3G4@*!IPMlNkQ`i9 z6NLN?AspdxDqNkMH@_ZJc6o!H6(~MHZ@`E4V6;Jk56c>#gBG!M+tUc0OApQGEsBkekS?8l(sw2M$)wU~FF$MtD8 z=n~rQ0Tzfh7j{AqAWpeT8X|={Jo8=&;r52DVs~K$kig`5bR;nVaCTleR8RzFsi#nP zZn7n^jaMs#xUC{LC6gI_wgar>0^Ma(iEv?<<@jvznl|~V#l$QJ;WwE7*B`uz+UvQ$Q?7wUY@N zQ>#%}8LidgoWFB;o?xL;odCLY&>P5wwiY?9#y7af`taZ&a0_g9 z`$I?MF6K-(m~Drf{ayh0}Zzs zyslx;mDzS}ZSD16MMmiTLi0z`-O%Zf zc33oqv9f4!H@to9G*Amd#=W@XjgKO2Rz$&k|clAjBO?XG`MG$Hh>nuC0^ ze~ju3uZwuNL9->qk#@|FWPSeFR`VB-mUlH2HV<)0rr=a1mG9~k6Gk@`Jdu!YHF0!L zNsU%(RBFjA#!tl0K2}x%daqr%i5V2_+Bq24QllZbNioleRdKqD1BiwX@Oh}s-v&26 z&!`W>qh)+_HGOE#Lgbql3FqI?8l1m4(KV`wCIM?pe2ZK$Zzi<=uzQ4Z{z>c&`J~QH z|Hf(AQZ#d9*zMKp{N@_z4_nKZ@Gm~ zXN7S7xJGx+gN_q@2k+S`G={t)Z8n!;dhBX5AuNRb%WMAyBV@C_w@mq2Fn#EOH`n7G zhkKAZPI9p#0{jZxvO;t4I!^AA=Has@i8>oq#RRY|H=M3%O$<9Vp+i$>HlNB*+hI1I zwIj}zAu2wGd)U)W-OzRM{%FlQ&Iph}O!YzItyDv@dq!Gw2hDToTjfGYS>AJS2LA?u z`>@N?_@TUD-Qe_8(s1TT9e&|hXW#*b- ziabmjYo)bJZyGKW8ptWTQ!8hWgIVsT*qv3^)}7i4!gS7z%yRSMaubW1(Tc*JiLiQc z7ZAHRHpyPzYCTLC3sP9Ux!l4!*kv_sfmb6cT7Q!D(!mQ<{IeDwz8b@<~GRw%z-3%QJL^;zliEauZY{vnMAS;wUF$g zL3`tfbZ~i2IP4$kg)8V2c6$dO{SHu_C-P#K8~vov6Rkalz4GLTPJMaNw^Qv~Lw44I zxfJj>dky5_+#Aey8;v)sUELbBA-d%M+VRW=LhH=_LRpE2UiN)oChKt9uW63n|8j3} x@({Nrt7(w)@bI8w!s$nd%U2_g-@Ktz*~VZB%5^KT%=7=Vm6_eya+6EMe*rB`m8<{& delta 2964 zcmY*ac|6mNA2+MbD)&TVER-V;4>huSY($P+xkXlTC6W8ycd00nh2)$SA|4~ThmlI< z*mx3RgfQ18a?JVb`Qv##&+qfk=k) zZBs)&VC0vE^5$0&Kmt~$G9NKG3|X6|zH5LSHXh@Znsx*i7W~Gga&}*F!4X4HvnNNd znyVgDa=06M%03NxH>gy-Ky|qxUo9ud?9j{6{o~}nP!BXapBzkUyn>=-YX;1mJHIxe zJl!IhfLy(1e975ZRbu$o8ohG(rCo`3eQQB_BIVr!BmTSSaG)U(Jljwhl6p?SXxxMZisd3(HhD0WH*lR^8%w_ZkUb-=RiW8xKWSQ=rseT&OZw zLzu-8`yuMq_=@qk_Yb{~6whR)>|6ayoJENj56GY`(#E4te)6Mg11T~du_*V+2SFaH zQqfhuoaFAqD%{|aZqGdUTx&4Hf7I^Lb$=U)&YjDKz;KwP%FUw}vuk`9nCmlGh$~f= z%(2?jr-NLz7jF@sU9;iigXx+Y>f1%+F0!_wW$ceYmySTYN&Lqmy^NE=-BfU+BIPl=)X`V`AM zax7dM5ceu(ah0|%Y;n5CJWh1a&&cWOP#K+X);%y%s0Qu}Ly)w(!tc>cExTyDvwhxT zHT;xsDgAYCP}?HMvZ#^vk=WDFDi2nB0qVRRr z!qV1UCPJIiGEUH?)WSrWjiG+HAZYnG7{Rd$!CfqNN|{A@2_pJnfwq25N^tkY8jGJs zmjq07m?Cv1>q6_o2~LH>#`T?N-dr9POEo!2BUmKeBw+=!2n9FFHSRw z8c;bQE&LDt)}fneMgv7VCrv8?Y8~9hs^7_rBhXgVES7L%i(AQsj-;8HFuciX_vEBm za!MM^B-A_2#-&yngPI*$z2BWsQRWj0gstBzKRKBs%RHPXBF-$)lEiTdQZ=9-p|$50 zf=_TF2v8^M;uL%`(cI7+YC2Xqa&_T{K5m3JB=q>v*jcIu-sq5t(%V1v!-#%RLuZBW zXcIQ-YQmsb>?#JVj=FR3KECi=%$+`jXrQ3jne?3)mj0!?LSg|ceY;tO0|leN^#8?y ziCg-%kV+xIc=5SL`B>lBH&I)2ePd4P;n<}V|KOJV)!6(d16#)V5-W36w63nH+xT5| z)mkdtQEu3`7xsWbeF7s9Hu6{MJYNsj^L33iB#V$z`7`0*&)jcd8&{kGUl7hY_(2Gt zvpAn)oje36yem{Nf6Zla?FjXbyrt&Kjxn2L4SKn_4R^;F9=K)x0Awota3kuz%3&28 z4H7GF1*H_CKcx>5-=dZKgw$eh>(K>_1wXjToxJC#XO63tx%&A1O}F}P@INX2-9z@x zwq@DjZ{#(HuCVPjhq3Q#Raee^8Q@d`AFP<6MR1p~XN8jmpP%S9Ps}ZBSm1n5h!bT< zN94jms+WjuoFpI6tB#e)G_Y80LS_JNu|8dzIHG@%UxX0=`H+u4q}&HTIY~?3i7zB} zg^%#E%D&uj5XcNrn=OQAzk!-NNn`sR)axGMVz$Xq~kp!;Co)#DJ zUok-bmoG)3i6uOG;P7RQOUtKS{_yvmOS84L{W*R;Nw19}G2L6ybmq>PmT%dUm$ja` zfBfuXRpRuCN1z(Y7O!NH$uGpsggusdUAXL0;V8Ff-y-jYOAN~ z(6s$CHTZ;A;?N>`WKHBcICW6p2KWBJ7fKvgG863sY*ukNotea64`&utK?*+DhJc5H z?LHH`RIB5NX7~7mbL&mK&7oR1NKb=VxjKU%>v%Eb=I$IJgkP-de?8;#mY8kJU6RW< zO*YDJ@w3Fgz~VMze%zj%g4ojEIPH4Yd}>-R*P~kpvJN!sUTJz%8ZDty3|Qfg+o|<% zzM?PSulCllqdq#CMTQtW1wK*48{OAA6C75tSZPmJb%u4IyE}vYNB-_1dn?E8-E38! z-*Bh>j%)uhuqq?NYqiXrK&ZSK53`QMC^Q;P5ktV|1$_LuqbDjxXyK1ai&y%a2)!Wt zPTjh$5E4g@b|a|HdoEq&3se8M6Nj5}=X-BhW6B5kuolqoU(qFo{hhC)K-r!zGG#pg zV_N@_+79?926s zoY|5Tmi=7uwWgCEdfq}a_Vx<^E>4=2d$;dx80GaXc4K=@`v4N7c1ZE1!%+%l|3{*4 z!r>G(+0xjn_VLp6&HbsihGh4!_&`uU6&n#-9@buZNQcmdcmwf}zAvQwE{x)KS7?+1 zP>Vj9I^sPPtTdO^YxhhRlWH{j9|0d=q5JnfU6!=RB1SAz5|u952aHa?JO~e1fzFi> zTVm#n`y{sI;zMw49x1vMsa=YcgX2<4Qy^&8!66WuE(2Sne6K{lE!Rhm=|6BSOe^es zK5tyU@&4cY<6S6Ce=`u!s6q}@Obcq+tjVGGG*4!@1T-I`_5zAbofcks05C%vqb0|* zFNTjq&LHbLPCvifFu#S}7*8R@tas~(twwX2xw~6j+B(?@`a}`Sn`IDoTfub7a^%vp z1i8qcy~eTxcAJy&6J`2#|111nygGJmL)_}@u2W3ADOm~FqK#o!p;a;4v)<&$&4`DS zrnyQf$Sq*fma+RlRSw|rX7cCR#N7q8yom9)ukCmnNlI2NgS{Z#9=u!Bcm+_9s6k(z zE30Udne<6zb2aidpw4G`UvDT~ler-O+s+Dp&wpJ??B*=Cg5Jx~R2=RD_69gd6-R7n e(0>Oha1#qXc=jiAh Date: Sat, 5 Sep 2015 18:51:39 +0930 Subject: [PATCH 029/178] Removed an unused file. --- baystation12.dme | 1 - code/game/gamemodes/intercept_report.dm | 187 ------------------------ 2 files changed, 188 deletions(-) delete mode 100644 code/game/gamemodes/intercept_report.dm diff --git a/baystation12.dme b/baystation12.dme index 22c7a86c52..38b9f77d96 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -256,7 +256,6 @@ #include "code\game\gamemodes\game_mode.dm" #include "code\game\gamemodes\game_mode_latespawn.dm" #include "code\game\gamemodes\gameticker.dm" -#include "code\game\gamemodes\intercept_report.dm" #include "code\game\gamemodes\objective.dm" #include "code\game\gamemodes\setupgame.dm" #include "code\game\gamemodes\blob\blob.dm" diff --git a/code/game/gamemodes/intercept_report.dm b/code/game/gamemodes/intercept_report.dm deleted file mode 100644 index bfe0e1d90d..0000000000 --- a/code/game/gamemodes/intercept_report.dm +++ /dev/null @@ -1,187 +0,0 @@ -/datum/intercept_text - var/text - /* - var/prob_correct_person_lower = 20 - var/prob_correct_person_higher = 80 - var/prob_correct_job_lower = 20 - var/prob_correct_job_higher = 80 - var/prob_correct_prints_lower = 20 - var/prob_correct_print_higher = 80 - var/prob_correct_objective_lower = 20 - var/prob_correct_objective_higher = 80 - */ - var/list/org_names_1 = list( - "Blighted", - "Defiled", - "Unholy", - "Murderous", - "Ugly", - "French", - "Blue", - "Farmer" - ) - var/list/org_names_2 = list( - "Reapers", - "Swarm", - "Rogues", - "Menace", - "Jeff Worshippers", - "Drunks", - "Strikers", - "Creed" - ) - var/list/anomalies = list( - "Huge electrical storm", - "Photon emitter", - "Meson generator", - "Blue swirly thing" - ) - var/list/SWF_names = list( - "Grand Wizard", - "His Most Unholy Master", - "The Most Angry", - "Bighands", - "Tall Hat", - "Deadly Sandals" - ) - var/list/changeling_names = list( - "Odo", - "The Thing", - "Booga", - "The Goatee of Wrath", - "Tam Lin", - "Species 3157", - "Small Prick" - ) - -// TODO: Update to new antagonist system. -/datum/intercept_text/proc/build(var/mode_type, datum/mind/correct_person) - switch(mode_type) - if("revolution") - src.text = "" - src.build_rev(correct_person) - return src.text - if("cult") - src.text = "" - src.build_cult(correct_person) - return src.text - if("wizard") - src.text = "" - src.build_wizard(correct_person) - return src.text - if("nuke") - src.text = "" - src.build_nuke(correct_person) - return src.text - if("traitor") - src.text = "" - src.build_traitor(correct_person) - return src.text - if("malf") - src.text = "" - src.build_malf(correct_person) - return src.text - if("changeling","traitorchan") - src.text = "" - src.build_changeling(correct_person) - return src.text - else - return null - -/datum/intercept_text/proc/get_suspect() - var/list/dudes = list() - for(var/mob/living/carbon/human/man in player_list) if(man.client && man.client.prefs.nanotrasen_relation == "Opposed") - dudes += man - for(var/i = 0, i < max(player_list.len/10,2), i++) - dudes += pick(player_list) - return pick(dudes) - -/datum/intercept_text/proc/build_traitor(datum/mind/correct_person) - var/name_1 = pick(src.org_names_1) - var/name_2 = pick(src.org_names_2) - - var/mob/living/carbon/human/H = get_suspect() - if(!H) return - - var/fingerprints = num2text(md5(H.dna.uni_identity)) - var/traitor_name = H.real_name - var/prob_right_dude = rand(1, 100) - - src.text += "

    The [name_1] [name_2] implied an undercover operative was acting on their behalf on the station currently." - src.text += "It would be in your best interests to suspect everybody, as these undercover operatives could have implants which trigger them to have their memories removed until they are needed. He, or she, could even be a high ranking officer." - - src.text += "After some investigation, we " - if(prob(50)) - src.text += "are [prob_right_dude]% sure that [traitor_name] may have been involved, and should be closely observed." - src.text += "
    Note: This group are known to be untrustworthy, so do not act on this information without proper discourse." - else - src.text += "discovered the following set of fingerprints ([fingerprints]) on sensitive materials, and their owner should be closely observed." - src.text += "However, these could also belong to a current Cent. Com employee, so do not act on this without reason." - - - -/datum/intercept_text/proc/build_cult(datum/mind/correct_person) - var/name_1 = pick(src.org_names_1) - var/name_2 = pick(src.org_names_2) - - var/prob_right_dude = rand(1, 100) - var/mob/living/carbon/human/H = get_suspect() - if(!H) return - var/traitor_job = H.mind.assigned_role - - src.text += "

    It has been brought to our attention that the [name_1] [name_2] have stumbled upon some dark secrets. They apparently want to spread the dangerous knowledge onto as many stations as they can." - src.text += "Watch out for the following: praying to an unfamilar god, preaching the word of \[REDACTED\], sacrifices, magical dark power, living constructs of evil and a portal to the dimension of the underworld." - - src.text += "Based on our intelligence, we are [prob_right_dude]% sure that if true, someone doing the job of [traitor_job] on your station may have been converted " - src.text += "and instilled with the idea of the flimsiness of the real world, seeking to destroy it. " - - src.text += "
    However, if this information is acted on without substantial evidence, those responsible will face severe repercussions." - - - -/datum/intercept_text/proc/build_rev(datum/mind/correct_person) - var/name_1 = pick(src.org_names_1) - var/name_2 = pick(src.org_names_2) - - var/prob_right_dude = rand(1, 100) - var/mob/living/carbon/human/H = get_suspect() - if(!H) return - var/traitor_job = H.mind.assigned_role - - src.text += "

    It has been brought to our attention that the [name_1] [name_2] are attempting to stir unrest on one of our stations in your sector." - src.text += "Watch out for suspicious activity among the crew and make sure that all heads of staff report in periodically." - - src.text += "Based on our intelligence, we are [prob_right_dude]% sure that if true, someone doing the job of [traitor_job] on your station may have been brainwashed " - src.text += "at a recent conference, and their department should be closely monitored for signs of mutiny. " - - src.text += "
    However, if this information is acted on without substantial evidence, those responsible will face severe repercussions." - - - -/datum/intercept_text/proc/build_wizard(datum/mind/correct_person) - var/SWF_desc = pick(SWF_names) - - src.text += "

    The evil Space Wizards Federation have recently broke their most feared wizard, known only as \"[SWF_desc]\" out of space jail. " - src.text += "He is on the run, last spotted in a system near your present location. If anybody suspicious is located aboard, please " - src.text += "approach with EXTREME caution. Cent. Com also recommends that it would be wise to not inform the crew of this, due to their fearful nature." - src.text += "Known attributes include: Brown sandals, a large blue hat, a voluptous white beard, and an inclination to cast spells." - -/datum/intercept_text/proc/build_nuke(datum/mind/correct_person) - src.text += "

    Cent. Com recently recieved a report of a plot to destroy one of our stations in your area. We believe the Nuclear Authentication Disc " - src.text += "that is standard issue aboard your vessel may be a target. We recommend removal of this object, and it's storage in a safe " - src.text += "environment. As this may cause panic among the crew, all efforts should be made to keep this information a secret from all but " - src.text += "the most trusted crew-members." - -/datum/intercept_text/proc/build_malf(datum/mind/correct_person) - var/a_name = pick(src.anomalies) - src.text += "

    A [a_name] was recently picked up by a nearby stations sensors in your sector. If it came into contact with your ship or " - src.text += "electrical equipment, it may have had hazardarous and unpredictable effect. Closely observe any non carbon based life forms " - src.text += "for signs of unusual behaviour, but keep this information discreet at all times due to this possibly dangerous scenario." - -/datum/intercept_text/proc/build_changeling(datum/mind/correct_person) - var/cname = pick(src.changeling_names) - var/orgname1 = pick(src.org_names_1) - var/orgname2 = pick(src.org_names_2) - src.text += "

    We have received a report that a dangerous alien lifeform known only as \"[cname]\" may have infiltrated your crew. " - src.text += "These lifeforms are assosciated with the [orgname1] [orgname2] and may be attempting to acquire sensitive materials on their behalf. " - src.text += "Please take care not to alarm the crew, as [cname] may take advantage of a panic situation. Remember, they can be anybody, suspect everybody!" From d77f0f3997c95e7a0b52e50477885951372d742a Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Sat, 5 Sep 2015 12:00:39 +0200 Subject: [PATCH 030/178] Status display alarms now clear properly on all mode changes. Previously one had to first set the display mode to Clear before the overlays would go away. This corrects situations where, for example, the emergency shuttle ETA could be covered by a NT logo. --- code/game/machinery/status_display.dm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index cf67c4d01f..2c72743bd2 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -28,6 +28,7 @@ var/message2 = "" // message line 2 var/index1 // display index for scrolling messages or 0 if non-scrolling var/index2 + var/picture = null var/frequency = 1435 // radio frequency @@ -72,13 +73,13 @@ // set what is displayed /obj/machinery/status_display/proc/update() + remove_display() if(friendc && !ignore_friendc) set_picture("ai_friend") return 1 switch(mode) if(STATUS_DISPLAY_BLANK) //blank - remove_display() return 1 if(STATUS_DISPLAY_TRANSFER_SHUTTLE_TIME) //emergency shuttle timer if(emergency_shuttle.waiting_to_leave()) @@ -96,8 +97,6 @@ if(length(message2) > CHARS_PER_LINE) message2 = "Error" update_display(message1, message2) - else - remove_display() return 1 if(STATUS_DISPLAY_MESSAGE) //custom messages var/line1 @@ -122,6 +121,9 @@ index2 -= message2_len update_display(line1, line2) return 1 + if(STATUS_DISPLAY_ALERT) + set_picture(picture_state) + return 1 if(STATUS_DISPLAY_TIME) message1 = "TIME" message2 = worldtime2text() @@ -150,9 +152,11 @@ index2 = 0 /obj/machinery/status_display/proc/set_picture(state) - picture_state = state remove_display() - overlays += image('icons/obj/status_display.dmi', icon_state=picture_state) + if(!picture || picture_state != state) + picture_state = state + picture = image('icons/obj/status_display.dmi', icon_state=picture_state) + overlays |= picture /obj/machinery/status_display/proc/update_display(line1, line2) var/new_text = {"
    [line1]
    [line2]
    "} @@ -207,7 +211,7 @@ if("time") mode = STATUS_DISPLAY_TIME - + update() #undef CHARS_PER_LINE #undef FOND_SIZE From aa1485696f7617d3868b93f4975712994ddec4bd Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Sat, 5 Sep 2015 14:02:45 +0200 Subject: [PATCH 031/178] Changelog entry. --- html/changelogs/Zuhayr-Secret.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 html/changelogs/Zuhayr-Secret.yml diff --git a/html/changelogs/Zuhayr-Secret.yml b/html/changelogs/Zuhayr-Secret.yml new file mode 100644 index 0000000000..1cdc707817 --- /dev/null +++ b/html/changelogs/Zuhayr-Secret.yml @@ -0,0 +1,5 @@ +author: Zuhayr +delete-after: true +changes: + - bugfix: "Auto-traitor should now be fixed." + - bugfix: "The Secret game mode should now be fixed." From 646a7a1d9689bff439d96cefc0647cc9ca0b8821 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Sat, 5 Sep 2015 14:04:13 +0200 Subject: [PATCH 032/178] Updates changelog. --- html/changelog.html | 7 +++++++ html/changelogs/.all_changelog.yml | 4 ++++ html/changelogs/Zuhayr-Secret.yml | 5 ----- 3 files changed, 11 insertions(+), 5 deletions(-) delete mode 100644 html/changelogs/Zuhayr-Secret.yml diff --git a/html/changelog.html b/html/changelog.html index 9f115c0a58..32d976f24e 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,13 @@ -->
    +

    05 September 2015

    +

    Zuhayr updated:

    +
      +
    • Auto-traitor should now be fixed.
    • +
    • The Secret game mode should now be fixed.
    • +
    +

    24 August 2015

    HarpyEagle updated: