diff --git a/code/__defines/_tick.dm b/code/__defines/_tick.dm index 8e3edc066ed..7d8bbd2c1d5 100644 --- a/code/__defines/_tick.dm +++ b/code/__defines/_tick.dm @@ -6,9 +6,8 @@ #define TICK_CHECK ( TICK_USAGE > GLOB.CURRENT_TICKLIMIT ) #define CHECK_TICK if TICK_CHECK stoplag() -<<<<<<< HEAD #define TICK_USAGE world.tick_usage -======= + #define TICK_CHECK_HIGH_PRIORITY ( TICK_USAGE > 95 ) #define CHECK_TICK_HIGH_PRIORITY ( TICK_CHECK_HIGH_PRIORITY? stoplag() : 0 ) diff --git a/code/__defines/vv.dm b/code/__defines/vv.dm index b7b54b0b57c..97e3a02e0d8 100644 --- a/code/__defines/vv.dm +++ b/code/__defines/vv.dm @@ -27,6 +27,8 @@ #define VV_NORMAL_LIST_NO_EXPAND_THRESHOLD 50 #define VV_SPECIAL_LIST_NO_EXPAND_THRESHOLD 150 +#define IS_VALID_ASSOC_KEY(V) (istext(V) || isdatum(V) || islist(V)) + //Helpers for vv_get_dropdown() #define VV_DROPDOWN_OPTION(href_key, name) . += "" diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 31d74dbf082..eccf77399ad 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -1462,8 +1462,6 @@ var/mob/dview/dview_mob = new /proc/pass() return -<<<<<<< HEAD -======= #define NAMEOF(datum, X) (#X || ##datum.##X) diff --git a/code/_macros.dm b/code/_macros.dm index a4b19b79c2c..0af691a90cf 100644 --- a/code/_macros.dm +++ b/code/_macros.dm @@ -2,55 +2,6 @@ #define get_turf(A) get_step(A,0) -<<<<<<< HEAD -#define isAI(A) istype(A, /mob/living/silicon/ai) - -#define isalien(A) istype(A, /mob/living/carbon/alien) - -#define isanimal(A) istype(A, /mob/living/simple_mob) - -#define isairlock(A) istype(A, /obj/machinery/door/airlock) - -#define isbrain(A) istype(A, /mob/living/carbon/brain) - -#define iscarbon(A) istype(A, /mob/living/carbon) - -#define iscorgi(A) istype(A, /mob/living/simple_mob/animal/passive/dog/corgi) - -#define isEye(A) istype(A, /mob/observer/eye) - -#define ishuman(A) istype(A, /mob/living/carbon/human) - -#define isliving(A) istype(A, /mob/living) - -#define ismouse(A) istype(A, /mob/living/simple_mob/animal/passive/mouse) - -#define isnewplayer(A) istype(A, /mob/new_player) - -#define isobserver(A) istype(A, /mob/observer/dead) - -#define isorgan(A) istype(A, /obj/item/organ/external) - -#define ispAI(A) istype(A, /mob/living/silicon/pai) - -#define isrobot(A) istype(A, /mob/living/silicon/robot) - -#define issilicon(A) istype(A, /mob/living/silicon) - -#define isvoice(A) istype(A, /mob/living/voice) - -#define isslime(A) istype(A, /mob/living/simple_mob/slime) - -#define isbot(A) istype(A, /mob/living/bot) - -#define isxeno(A) istype(A, /mob/living/simple_mob/animal/space/alien) - -#define isopenspace(A) istype(A, /turf/simulated/open) - -#define isweakref(A) istype(A, /weakref) - -======= ->>>>>>> b1860f9... Merge pull request #5829 from kevinz000/tg_vv #define RANDOM_BLOOD_TYPE pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+") #define to_chat(target, message) target << message diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 10bb0d79d3b..aa28473fa3d 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -22,10 +22,10 @@ /datum/proc/vv_get_dropdown() . = list() VV_DROPDOWN_OPTION("", "---") - VV_DROPDOWN_OPTION("proc_call", "Call Proc") - VV_DROPDOWN_OPTION("mark_object", "Mark Object") - VV_DROPDOWN_OPTION("delete", "Delete") - VV_DROPDOWN_OPTION("expose", "Show VV To Player") + VV_DROPDOWN_OPTION(VV_HK_CALLPROC, "Call Proc") + VV_DROPDOWN_OPTION(VV_HK_MARK, "Mark Object") + VV_DROPDOWN_OPTION(VV_HK_DELETE, "Delete") + VV_DROPDOWN_OPTION(VV_HK_EXPOSE, "Show VV To Player") //This proc is only called if everything topic-wise is verified. The only verifications that should happen here is things like permission checks! //href_list is a reference, modifying it in these procs WILL change the rest of the proc in topic.dm of admin/view_variables! diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 5bb3db7129b..e2e6c4603b1 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -215,7 +215,6 @@ var/list/admin_verbs_debug = list( /client/proc/show_plant_genes, /client/proc/enable_debug_verbs, /client/proc/callproc, -<<<<<<< HEAD /client/proc/callproc_target, /client/proc/debug_process, //VOREStation Add, /client/proc/callproc_datum, @@ -237,7 +236,6 @@ var/list/admin_verbs_debug = list( var/list/admin_verbs_paranoid_debug = list( /client/proc/callproc, -<<<<<<< HEAD /client/proc/callproc_target, /client/proc/debug_process, //VOREStation Add, /client/proc/callproc_datum, @@ -308,7 +306,6 @@ var/list/admin_verbs_hideable = list( /client/proc/restart_controller, /client/proc/cmd_admin_list_open_jobs, /client/proc/callproc, -<<<<<<< HEAD /client/proc/callproc_target, /client/proc/debug_process, //VOREStation Add, /client/proc/callproc_datum, diff --git a/code/modules/admin/callproc/callproc.dm b/code/modules/admin/callproc/callproc.dm index f60e6e6ab64..4b0b70a05d7 100644 --- a/code/modules/admin/callproc/callproc.dm +++ b/code/modules/admin/callproc/callproc.dm @@ -12,26 +12,9 @@ switch(alert("Proc owned by something?",,"Yes","No")) if("Yes") -<<<<<<< HEAD - 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 GLOB.clients - else - return - if(!target) - usr << "Proc call cancelled." -======= targetselected = 1 var/list/value = vv_get_value(default_class = VV_ATOM_REFERENCE, classes = list(VV_ATOM_REFERENCE, VV_DATUM_REFERENCE, VV_MOB_REFERENCE, VV_CLIENT)) if (!value["class"] || !value["value"]) ->>>>>>> b1860f9... Merge pull request #5829 from kevinz000/tg_vv return target = value["value"] if("No") @@ -73,13 +56,13 @@ return var/msg = "[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]." log_admin(msg) - message_admins(msg) + //message_admins(msg) //Proccall announce removed. admin_ticket_log(target, msg) returnval = WrapAdminProcCall(target, procname, 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"].") - message_admins("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].") + //message_admins("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].") //Proccall announce removed. returnval = WrapAdminProcCall(GLOBAL_PROC, procname, lst) // Pass the lst as an argument list to the proc . = get_callproc_returnval(returnval, procname) if(.) @@ -145,71 +128,6 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) return usr && usr.client && GLOB.AdminProcCaller == usr.client.ckey #endif -<<<<<<< HEAD - 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 GLOB.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") - ; // do nothing - 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") - ; // do nothing - if("Cancel") - return - if(!done) - arguments += current - - if(hastarget) - if(!target) - usr << "Your callproc target no longer exists." -======= /client/proc/callproc_datum(datum/A as null|area|mob|obj|turf) set category = "Debug" set name = "Atom ProcCall" @@ -245,22 +163,28 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) /client/proc/get_callproc_args() var/argnum = input("Number of arguments","Number:",0) as num|null if(isnull(argnum)) - return + return null //Cancel . = list() - var/list/named_args = list() + //var/list/named_args = list() //Named arguments are removed, due to them making proccalling take too long. while(argnum--) + /* //Named arguments are removed, due to them making proccalling take too long. var/named_arg = input("Leave blank for positional argument. Positional arguments will be considered as if they were added first.", "Named argument") as text|null + if(isnull(named_arg)) + return null //Cancel + */ var/value = vv_get_value(restricted_classes = list(VV_RESTORE_DEFAULT)) if (!value["class"]) ->>>>>>> b1860f9... Merge pull request #5829 from kevinz000/tg_vv - return + return null //Cancel + /* if(named_arg) named_args[named_arg] = value["value"] else . += value["value"] if(LAZYLEN(named_args)) . += named_args + */ + . += value["value"] /client/proc/get_callproc_returnval(returnval,procname) . = "" diff --git a/code/modules/admin/view_variables/modify_variables.dm b/code/modules/admin/view_variables/modify_variables.dm index 8e3838d2c73..b964339aa9e 100644 --- a/code/modules/admin/view_variables/modify_variables.dm +++ b/code/modules/admin/view_variables/modify_variables.dm @@ -187,10 +187,16 @@ GLOBAL_PROTECT(VVpixelmovement) assoc_key = L[index] var/default var/variable + var/old_assoc_value //EXPERIMENTAL - Keep old associated value while modifying key, if any if (assoc) variable = L[assoc_key] else variable = L[index] + //EXPERIMENTAL - Keep old associated value while modifying key, if any + var/found = L[variable] + if(!isnull(found)) + old_assoc_value = found + // default = vv_get_class(objectvar, variable) @@ -257,6 +263,8 @@ GLOBAL_PROTECT(VVpixelmovement) L[assoc_key] = new_var else L[index] = new_var + if(!isnull(old_assoc_value) && IS_VALID_ASSOC_KEY(new_var)) + L[new_var] = old_assoc_value if (O) if (O.vv_edit_var(objectvar, L) == FALSE) to_chat(src, "Your edit was rejected by the object.") diff --git a/code/modules/admin/view_variables/view_variables.dm b/code/modules/admin/view_variables/view_variables.dm index 9a9bb441898..efa6f424f10 100644 --- a/code/modules/admin/view_variables/view_variables.dm +++ b/code/modules/admin/view_variables/view_variables.dm @@ -38,7 +38,7 @@ var/sprite_text if(sprite) sprite_text = "" - var/list/header = islist(D)? "/list" : D.vv_get_header() + var/list/header = islist(D)? list("/list") : D.vv_get_header() var/marked if(holder && holder.marked_datum && holder.marked_datum == D) @@ -176,10 +176,6 @@ last_filter = filter; document.cookie="[refid][cookieoffset]search="+encodeURIComponent(filter); - var lis_new = vars_ol.getElementsByTagName("li"); - for (var j = 0; j < lis_new.length; ++j) { - lis_new\[j].style.backgroundColor = (j == 0) ? "#ffee88" : "white"; - } } // onkeydown @@ -194,55 +190,7 @@ // onkeyup function handle_keyup() { - if (event.keyCode == 13) { //Enter / return - var vars_ol = document.getElementById('vars'); - var lis = vars_ol.getElementsByTagName("li"); - for (var i = 0; i < lis.length; ++i) { - try { - var li = lis\[i]; - if (li.style.backgroundColor == "#ffee88") { - alist = lis\[i].getElementsByTagName("a"); - if(alist.length > 0) { - location.href=alist\[0].href; - } - } - } catch(err) {} - } - } else if(event.keyCode == 38){ //Up arrow - var vars_ol = document.getElementById('vars'); - var lis = vars_ol.getElementsByTagName("li"); - for (var i = 0; i < lis.length; ++i) { - try { - var li = lis\[i]; - if (li.style.backgroundColor == "#ffee88") { - if (i > 0) { - var li_new = lis\[i-1]; - li.style.backgroundColor = "white"; - li_new.style.backgroundColor = "#ffee88"; - return - } - } - } catch(err) {} - } - } else if(event.keyCode == 40) { //Down arrow - var vars_ol = document.getElementById('vars'); - var lis = vars_ol.getElementsByTagName("li"); - for (var i = 0; i < lis.length; ++i) { - try { - var li = lis\[i]; - if (li.style.backgroundColor == "#ffee88") { - if ((i+1) < lis.length) { - var li_new = lis\[i+1]; - li.style.backgroundColor = "white"; - li_new.style.backgroundColor = "#ffee88"; - return - } - } - } catch(err) {} - } - } else { - updateSearch(); - } + updateSearch(); } // onchange @@ -289,8 +237,7 @@ datumrefresh=[refid]'>Refresh
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index e64bccf5cf8..75a291632ca 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1330,9 +1330,6 @@ default behaviour is: /mob/living/proc/dirties_floor() // If we ever decide to add fancy conditionals for making dirty floors (floating, etc), here's the proc. -<<<<<<< HEAD - return makes_dirt -======= return makes_dirt /mob/living/proc/needs_to_breathe() @@ -1352,4 +1349,3 @@ default behaviour is: BRAIN:[getBrainLoss()] "} ->>>>>>> b1860f9... Merge pull request #5829 from kevinz000/tg_vv diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index 9b3f32fca79..8c404e05c0d 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -288,9 +288,6 @@ closest_grounding_rod.tesla_act(power, explosive, stun_mobs) else if(closest_mob) -<<<<<<< HEAD - var/shock_damage = Clamp(round(power/400), 10, 90) + rand(-5, 5) -======= var/shock_damage = CLAMP(round(power/400), 10, 90) + rand(-5, 5) closest_mob.electrocute_act(shock_damage, source, 1 - closest_mob.get_shock_protection(), ran_zone()) log_game("TESLA([source.x],[source.y],[source.z]) Shocked [key_name(closest_mob)] for [shock_damage]dmg.") diff --git a/vorestation.dme b/vorestation.dme index a80ca603c60..919b80c9c1f 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1436,9 +1436,6 @@ #include "code\modules\admin\verbs\striketeam.dm" #include "code\modules\admin\verbs\ticklag.dm" #include "code\modules\admin\verbs\tripAI.dm" -<<<<<<< HEAD:vorestation.dme -#include "code\modules\admin\view_variables\helpers.dm" -======= #include "code\modules\admin\verbs\SDQL2\SDQL_2.dm" #include "code\modules\admin\verbs\SDQL2\SDQL_2_parser.dm" #include "code\modules\admin\verbs\SDQL2\SDQL_2_wrappers.dm" @@ -1448,7 +1445,6 @@ #include "code\modules\admin\view_variables\helpers_deprecated.dm" #include "code\modules\admin\view_variables\mass_edit_variables.dm" #include "code\modules\admin\view_variables\modify_variables.dm" ->>>>>>> b1860f9... Merge pull request #5829 from kevinz000/tg_vv:polaris.dme #include "code\modules\admin\view_variables\topic.dm" #include "code\modules\admin\view_variables\view_variables.dm" #include "code\modules\ai\_defines.dm"