From 5ae69c25e63aa004037a9f64082b182d37f04fad Mon Sep 17 00:00:00 2001 From: Alek2ander Date: Thu, 12 Dec 2013 23:22:11 +0300 Subject: [PATCH 01/23] VV now allows read-only stuff without edit perm Also removes links you do not have permissions to use --- code/datums/datumvars.dm | 270 +++++++++++++++++++++++---------------- 1 file changed, 159 insertions(+), 111 deletions(-) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 7f25b86cb5b..fe8fbebc845 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -1,4 +1,3 @@ - // reference: /client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0) client @@ -173,27 +172,56 @@ client 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()] - + if(check_rights(R_VAREDIT)) + 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)]>>" + 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)] >>" + if(check_rights(R_VAREDIT)) + body += "[D]" + if(A.dir) + body += "
<< [dir2text(A.dir)] >>" + + else + body += "[D]" + if(A.dir) + body += "
<<[dir2text(A.dir)]>>" + + else body += "[D]" @@ -240,42 +268,58 @@ client body += "" if(ismob(D)) body += "" - - body += "" - - if(ismob(D)) - body += "" - body += "" - body += "" - body += "" - body += "" - body += "" - body += "" - body += "" body += "" - if(ishuman(D)) + if(check_rights(R_REJUVINATE)) + body += "" + + + + + if(check_rights(R_VAREDIT)) + if(ismob(D)) body += "" - body += "" - body += "" - body += "" - body += "" - body += "" - body += "" - body += "" - body += "" - if(isobj(D)) - body += "" - if(isobj(D) || ismob(D) || isturf(D)) - body += "" - body += "" + body += "" + body += "" + body += "" + body += "" + if(check_rights(R_BUILDMODE)) + body += "" + + if(check_rights(R_FUN)) + body += "" + body += "" + body += "" + + if(ishuman(D)) + if(check_rights(R_SPAWN)) + body += "" + body += "" + body += "" + body += "" + body += "" + body += "" + body += "" + + + if(isobj(D) || ismob(D) || isturf(D)) + if(check_rights(R_FUN)) + body += "" + body += "" + body += "" + + if(isobj(D)) + if(check_rights(R_DEBUG|R_SERVER)) + body += "" + body += "" + 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.

" + if(check_rights(R_VAREDIT)) + 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:

" @@ -326,7 +370,7 @@ client proc/debug_variable(name, value, level, var/datum/DA = null) var/html = "" - if(DA) + if(DA & check_rights(R_VAREDIT)) html += "
  • (E) (C) (M) " else html += "
  • " @@ -402,12 +446,63 @@ client //This should all be moved over to datum/admins/Topic() or something ~Carn if( (usr.client != src) || !src.holder ) return - if(!check_rights(R_VAREDIT)) - return if(href_list["Vars"]) debug_variables(locate(href_list["Vars"])) //~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records). + + if(href_list["datumrefresh"]) + var/datum/DAT = locate(href_list["datumrefresh"]) + if(!istype(DAT, /datum)) + return + src.debug_variables(DAT) + + else if(href_list["mob_player_panel"]) + if(!check_rights(0)) return + + var/mob/M = locate(href_list["mob_player_panel"]) + if(!istype(M)) + usr << "This can only be used on instances of type /mob" + return + + src.holder.show_player_panel(M) + href_list["datumrefresh"] = href_list["mob_player_panel"] + + else if(href_list["godmode"]) + if(!check_rights(R_REJUVINATE)) return + + var/mob/M = locate(href_list["godmode"]) + if(!istype(M)) + usr << "This can only be used on instances of type /mob" + return + + src.cmd_admin_godmode(M) + href_list["datumrefresh"] = href_list["godmode"] + + else if(href_list["mark_object"]) + if(!check_rights(0)) return + + var/datum/D = locate(href_list["mark_object"]) + if(!istype(D)) + usr << "This can only be done to instances of type /datum" + return + + src.holder.marked_datum = D + href_list["datumrefresh"] = href_list["mark_object"] + + else if(href_list["regenerateicons"]) + if(!check_rights(0)) return + + var/mob/M = locate(href_list["regenerateicons"]) + if(!ismob(M)) + usr << "This can only be done to instances of type /mob" + return + M.regenerate_icons() + +//Needs +VAREDIT past this point + + if(!check_rights(R_VAREDIT)) return + else if(href_list["rename"]) if(!check_rights(0)) return @@ -453,17 +548,6 @@ client cmd_mass_modify_object_variables(A, href_list["varnamemass"]) - else if(href_list["mob_player_panel"]) - if(!check_rights(0)) return - - var/mob/M = locate(href_list["mob_player_panel"]) - if(!istype(M)) - usr << "This can only be used on instances of type /mob" - return - - src.holder.show_player_panel(M) - href_list["datumrefresh"] = href_list["mob_player_panel"] - else if(href_list["give_spell"]) if(!check_rights(0)) return @@ -487,7 +571,7 @@ client href_list["datumrefresh"] = href_list["give_spell"] else if(href_list["ninja"]) - if(!check_rights(0)) return + if(!check_rights(R_FUN)) return var/mob/M = locate(href_list["ninja"]) if(!istype(M)) @@ -497,19 +581,8 @@ client src.cmd_admin_ninjafy(M) href_list["datumrefresh"] = href_list["ninja"] - else if(href_list["godmode"]) - if(!check_rights(R_REJUVINATE)) return - - var/mob/M = locate(href_list["godmode"]) - if(!istype(M)) - usr << "This can only be used on instances of type /mob" - return - - src.cmd_admin_godmode(M) - href_list["datumrefresh"] = href_list["godmode"] - else if(href_list["gib"]) - if(!check_rights(0)) return + if(!check_rights(R_FUN)) return var/mob/M = locate(href_list["gib"]) if(!istype(M)) @@ -552,7 +625,7 @@ client usr.client.cmd_assume_direct_control(M) else if(href_list["make_skeleton"]) - if(!check_rights(0)) return + if(!check_rights(R_FUN)) return var/mob/living/carbon/human/H = locate(href_list["make_skeleton"]) if(!istype(H)) @@ -606,7 +679,7 @@ client message_admins("\blue [key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ") else if(href_list["explode"]) - if(!check_rights(0)) return + if(!check_rights(R_FUN)) return var/atom/A = locate(href_list["explode"]) if(!isobj(A) && !ismob(A) && !isturf(A)) @@ -617,7 +690,7 @@ client href_list["datumrefresh"] = href_list["explode"] else if(href_list["emp"]) - if(!check_rights(0)) return + if(!check_rights(R_FUN)) return var/atom/A = locate(href_list["emp"]) if(!isobj(A) && !ismob(A) && !isturf(A)) @@ -627,17 +700,6 @@ client src.cmd_admin_emp(A) href_list["datumrefresh"] = href_list["emp"] - else if(href_list["mark_object"]) - if(!check_rights(0)) return - - var/datum/D = locate(href_list["mark_object"]) - if(!istype(D)) - usr << "This can only be done to instances of type /datum" - return - - src.holder.marked_datum = D - href_list["datumrefresh"] = href_list["mark_object"] - else if(href_list["rotatedatum"]) if(!check_rights(0)) return @@ -652,7 +714,7 @@ client href_list["datumrefresh"] = href_list["rotatedatum"] else if(href_list["makehuman"]) - if(!check_rights(0)) return + if(!check_rights(R_SPAWN)) return var/mob/living/carbon/monkey/Mo = locate(href_list["makehuman"]) if(!istype(Mo)) @@ -666,7 +728,7 @@ client holder.Topic(href, list("humanone"=href_list["makehuman"])) else if(href_list["makemonkey"]) - if(!check_rights(0)) return + if(!check_rights(R_SPAWN)) return var/mob/living/carbon/human/H = locate(href_list["makemonkey"]) if(!istype(H)) @@ -680,7 +742,7 @@ client holder.Topic(href, list("monkeyone"=href_list["makemonkey"])) else if(href_list["makerobot"]) - if(!check_rights(0)) return + if(!check_rights(R_SPAWN)) return var/mob/living/carbon/human/H = locate(href_list["makerobot"]) if(!istype(H)) @@ -694,7 +756,7 @@ client holder.Topic(href, list("makerobot"=href_list["makerobot"])) else if(href_list["makealien"]) - if(!check_rights(0)) return + if(!check_rights(R_SPAWN)) return var/mob/living/carbon/human/H = locate(href_list["makealien"]) if(!istype(H)) @@ -708,7 +770,7 @@ client holder.Topic(href, list("makealien"=href_list["makealien"])) else if(href_list["makeslime"]) - if(!check_rights(0)) return + if(!check_rights(R_SPAWN)) return var/mob/living/carbon/human/H = locate(href_list["makeslime"]) if(!istype(H)) @@ -722,7 +784,7 @@ client holder.Topic(href, list("makeslime"=href_list["makeslime"])) else if(href_list["makeai"]) - if(!check_rights(0)) return + if(!check_rights(R_SPAWN)) return var/mob/living/carbon/human/H = locate(href_list["makeai"]) if(!istype(H)) @@ -736,7 +798,7 @@ client holder.Topic(href, list("makeai"=href_list["makeai"])) else if(href_list["setmutantrace"]) - if(!check_rights(0)) return + if(!check_rights(R_SPAWN)) return var/mob/living/carbon/human/H = locate(href_list["setmutantrace"]) if(!istype(H)) @@ -755,15 +817,6 @@ client H.update_body() H.update_hair() - else if(href_list["regenerateicons"]) - if(!check_rights(0)) return - - var/mob/M = locate(href_list["regenerateicons"]) - if(!ismob(M)) - usr << "This can only be done to instances of type /mob" - return - M.regenerate_icons() - else if(href_list["adjustDamage"] && href_list["mobToDamage"]) if(!check_rights(0)) return @@ -794,11 +847,6 @@ client message_admins("\blue [key_name(usr)] dealt [amount] amount of [Text] damage to [L] ") href_list["datumrefresh"] = href_list["mobToDamage"] - if(href_list["datumrefresh"]) - var/datum/DAT = locate(href_list["datumrefresh"]) - if(!istype(DAT, /datum)) - return - src.debug_variables(DAT) return From 17f6441f5e31b6fc2c39da068c629f333c300c46 Mon Sep 17 00:00:00 2001 From: Alek2ander Date: Thu, 12 Dec 2013 23:32:48 +0300 Subject: [PATCH 02/23] Oops --- code/datums/datumvars.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index fe8fbebc845..ad6a74a8997 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -370,7 +370,7 @@ client proc/debug_variable(name, value, level, var/datum/DA = null) var/html = "" - if(DA & check_rights(R_VAREDIT)) + if(DA && check_rights(R_VAREDIT)) html += "
  • (E) (C) (M) " else html += "
  • " From 193656347fbe0c6aeb71f4d1bd2b2573752f463b Mon Sep 17 00:00:00 2001 From: Alek2ander Date: Thu, 12 Dec 2013 23:49:15 +0300 Subject: [PATCH 03/23] Oh that's how it works --- code/datums/datumvars.dm | 704 +++++++++++++++++++-------------------- 1 file changed, 352 insertions(+), 352 deletions(-) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index ad6a74a8997..2a5e9d84fe3 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -172,7 +172,7 @@ client if(istype(D,/atom)) var/atom/A = D if(isliving(A)) - if(check_rights(R_VAREDIT)) + if(check_rights(R_VAREDIT,0)) body += "[D]" if(A.dir) body += "
    << [dir2text(A.dir)] >>" @@ -211,7 +211,7 @@ client "} else - if(check_rights(R_VAREDIT)) + if(check_rights(R_VAREDIT,0)) body += "[D]" if(A.dir) body += "
    << [dir2text(A.dir)] >>" @@ -269,29 +269,29 @@ client if(ismob(D)) body += "" body += "" - if(check_rights(R_REJUVINATE)) + if(check_rights(R_REJUVINATE,0)) body += "" - if(check_rights(R_VAREDIT)) + if(check_rights(R_VAREDIT,0)) if(ismob(D)) body += "" body += "" body += "" body += "" body += "" - if(check_rights(R_BUILDMODE)) + if(check_rights(R_BUILDMODE,0)) body += "" - if(check_rights(R_FUN)) + if(check_rights(R_FUN,0)) body += "" body += "" body += "" if(ishuman(D)) - if(check_rights(R_SPAWN)) + if(check_rights(R_SPAWN,0)) body += "" body += "" body += "" @@ -302,13 +302,13 @@ client if(isobj(D) || ismob(D) || isturf(D)) - if(check_rights(R_FUN)) + if(check_rights(R_FUN,0)) body += "" body += "" body += "" if(isobj(D)) - if(check_rights(R_DEBUG|R_SERVER)) + if(check_rights(R_DEBUG|R_SERVER,0)) body += "" body += "" @@ -316,7 +316,7 @@ client body += "" body += "
    " - if(check_rights(R_VAREDIT)) + if(check_rights(R_VAREDIT,0)) 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.

    " @@ -370,7 +370,7 @@ client proc/debug_variable(name, value, level, var/datum/DA = null) var/html = "" - if(DA && check_rights(R_VAREDIT)) + if(DA && check_rights(R_VAREDIT,0)) html += "
  • (E) (C) (M) " else html += "
  • " @@ -501,351 +501,351 @@ client //Needs +VAREDIT past this point - if(!check_rights(R_VAREDIT)) return + if(check_rights(R_VAREDIT,0)) - else if(href_list["rename"]) - if(!check_rights(0)) return + if(href_list["rename"]) + if(!check_rights(0)) return - var/mob/M = locate(href_list["rename"]) - if(!istype(M)) - usr << "This can only be used on instances of type /mob" - return - - var/new_name = copytext(sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null),1,MAX_NAME_LEN) - if( !new_name || !M ) return - - message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].") - M.fully_replace_character_name(M.real_name,new_name) - href_list["datumrefresh"] = href_list["rename"] - - else if(href_list["varnameedit"] && href_list["datumedit"]) - if(!check_rights(0)) return - - var/D = locate(href_list["datumedit"]) - if(!istype(D,/datum) && !istype(D,/client)) - usr << "This can only be used on instances of types /client or /datum" - return - - modify_variables(D, href_list["varnameedit"], 1) - - else if(href_list["varnamechange"] && href_list["datumchange"]) - if(!check_rights(0)) return - - var/D = locate(href_list["datumchange"]) - if(!istype(D,/datum) && !istype(D,/client)) - usr << "This can only be used on instances of types /client or /datum" - return - - modify_variables(D, href_list["varnamechange"], 0) - - else if(href_list["varnamemass"] && href_list["datummass"]) - if(!check_rights(0)) return - - var/atom/A = locate(href_list["datummass"]) - if(!istype(A)) - usr << "This can only be used on instances of type /atom" - return - - cmd_mass_modify_object_variables(A, href_list["varnamemass"]) - - else if(href_list["give_spell"]) - if(!check_rights(0)) return - - var/mob/M = locate(href_list["give_spell"]) - if(!istype(M)) - usr << "This can only be used on instances of type /mob" - return - - src.give_spell(M) - href_list["datumrefresh"] = href_list["give_spell"] - - else if(href_list["give_disease"]) - if(!check_rights(0)) return - - var/mob/M = locate(href_list["give_disease"]) - if(!istype(M)) - usr << "This can only be used on instances of type /mob" - return - - src.give_disease(M) - href_list["datumrefresh"] = href_list["give_spell"] - - else if(href_list["ninja"]) - if(!check_rights(R_FUN)) return - - var/mob/M = locate(href_list["ninja"]) - if(!istype(M)) - usr << "This can only be used on instances of type /mob" - return - - src.cmd_admin_ninjafy(M) - href_list["datumrefresh"] = href_list["ninja"] - - else if(href_list["gib"]) - if(!check_rights(R_FUN)) return - - var/mob/M = locate(href_list["gib"]) - if(!istype(M)) - usr << "This can only be used on instances of type /mob" - return - - src.cmd_admin_gib(M) - - else if(href_list["build_mode"]) - if(!check_rights(R_BUILDMODE)) return - - var/mob/M = locate(href_list["build_mode"]) - if(!istype(M)) - usr << "This can only be used on instances of type /mob" - return - - togglebuildmode(M) - href_list["datumrefresh"] = href_list["build_mode"] - - else if(href_list["drop_everything"]) - if(!check_rights(0)) return - - var/mob/M = locate(href_list["drop_everything"]) - if(!istype(M)) - usr << "This can only be used on instances of type /mob" - return - - if(usr.client) - usr.client.cmd_admin_drop_everything(M) - - else if(href_list["direct_control"]) - if(!check_rights(0)) return - - var/mob/M = locate(href_list["direct_control"]) - if(!istype(M)) - usr << "This can only be used on instances of type /mob" - return - - if(usr.client) - usr.client.cmd_assume_direct_control(M) - - else if(href_list["make_skeleton"]) - if(!check_rights(R_FUN)) return - - var/mob/living/carbon/human/H = locate(href_list["make_skeleton"]) - if(!istype(H)) - usr << "This can only be used on instances of type /mob/living/carbon/human" - return - - H.makeSkeleton() - href_list["datumrefresh"] = href_list["make_skeleton"] - - else if(href_list["delall"]) - if(!check_rights(R_DEBUG|R_SERVER)) return - - var/obj/O = locate(href_list["delall"]) - if(!isobj(O)) - usr << "This can only be used on instances of type /obj" - return - - var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel") - if(action_type == "Cancel" || !action_type) - return - - if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes") - return - - if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes") - return - - var/O_type = O.type - switch(action_type) - if("Strict type") - var/i = 0 - for(var/obj/Obj in world) - if(Obj.type == O_type) - i++ - del(Obj) - if(!i) - usr << "No objects of this type exist" - return - log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ") - message_admins("\blue [key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ") - if("Type and subtypes") - var/i = 0 - for(var/obj/Obj in world) - if(istype(Obj,O_type)) - i++ - del(Obj) - if(!i) - usr << "No objects of this type exist" - return - log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ") - message_admins("\blue [key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ") - - else if(href_list["explode"]) - if(!check_rights(R_FUN)) return - - var/atom/A = locate(href_list["explode"]) - if(!isobj(A) && !ismob(A) && !isturf(A)) - usr << "This can only be done to instances of type /obj, /mob and /turf" - return - - src.cmd_admin_explosion(A) - href_list["datumrefresh"] = href_list["explode"] - - else if(href_list["emp"]) - if(!check_rights(R_FUN)) return - - var/atom/A = locate(href_list["emp"]) - if(!isobj(A) && !ismob(A) && !isturf(A)) - usr << "This can only be done to instances of type /obj, /mob and /turf" - return - - src.cmd_admin_emp(A) - href_list["datumrefresh"] = href_list["emp"] - - else if(href_list["rotatedatum"]) - if(!check_rights(0)) return - - var/atom/A = locate(href_list["rotatedatum"]) - if(!istype(A)) - usr << "This can only be done to instances of type /atom" - return - - switch(href_list["rotatedir"]) - if("right") A.dir = turn(A.dir, -45) - if("left") A.dir = turn(A.dir, 45) - href_list["datumrefresh"] = href_list["rotatedatum"] - - else if(href_list["makehuman"]) - if(!check_rights(R_SPAWN)) return - - var/mob/living/carbon/monkey/Mo = locate(href_list["makehuman"]) - if(!istype(Mo)) - usr << "This can only be done to instances of type /mob/living/carbon/monkey" - return - - if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return - if(!Mo) - usr << "Mob doesn't exist anymore" - return - holder.Topic(href, list("humanone"=href_list["makehuman"])) - - else if(href_list["makemonkey"]) - if(!check_rights(R_SPAWN)) return - - var/mob/living/carbon/human/H = locate(href_list["makemonkey"]) - if(!istype(H)) - usr << "This can only be done to instances of type /mob/living/carbon/human" - return - - if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return - if(!H) - usr << "Mob doesn't exist anymore" - return - holder.Topic(href, list("monkeyone"=href_list["makemonkey"])) - - else if(href_list["makerobot"]) - if(!check_rights(R_SPAWN)) return - - var/mob/living/carbon/human/H = locate(href_list["makerobot"]) - if(!istype(H)) - usr << "This can only be done to instances of type /mob/living/carbon/human" - return - - if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return - if(!H) - usr << "Mob doesn't exist anymore" - return - holder.Topic(href, list("makerobot"=href_list["makerobot"])) - - else if(href_list["makealien"]) - if(!check_rights(R_SPAWN)) return - - var/mob/living/carbon/human/H = locate(href_list["makealien"]) - if(!istype(H)) - usr << "This can only be done to instances of type /mob/living/carbon/human" - return - - if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return - if(!H) - usr << "Mob doesn't exist anymore" - return - holder.Topic(href, list("makealien"=href_list["makealien"])) - - else if(href_list["makeslime"]) - if(!check_rights(R_SPAWN)) return - - var/mob/living/carbon/human/H = locate(href_list["makeslime"]) - if(!istype(H)) - usr << "This can only be done to instances of type /mob/living/carbon/human" - return - - if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return - if(!H) - usr << "Mob doesn't exist anymore" - return - holder.Topic(href, list("makeslime"=href_list["makeslime"])) - - else if(href_list["makeai"]) - if(!check_rights(R_SPAWN)) return - - var/mob/living/carbon/human/H = locate(href_list["makeai"]) - if(!istype(H)) - usr << "This can only be done to instances of type /mob/living/carbon/human" - return - - if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return - if(!H) - usr << "Mob doesn't exist anymore" - return - holder.Topic(href, list("makeai"=href_list["makeai"])) - - else if(href_list["setmutantrace"]) - if(!check_rights(R_SPAWN)) return - - var/mob/living/carbon/human/H = locate(href_list["setmutantrace"]) - if(!istype(H)) - usr << "This can only be done to instances of type /mob/living/carbon/human" - return - - var/new_mutantrace = input("Please choose a new mutantrace","Mutantrace",null) as null|anything in list("NONE","golem","lizard","slime","plant","shadow", "fly", "skeleton") - switch(new_mutantrace) - if(null) return - if("NONE") new_mutantrace = "" - if(!H) - usr << "Mob doesn't exist anymore" - return - if(H.dna) - H.dna.mutantrace = new_mutantrace - H.update_body() - H.update_hair() - - else if(href_list["adjustDamage"] && href_list["mobToDamage"]) - if(!check_rights(0)) return - - var/mob/living/L = locate(href_list["mobToDamage"]) - if(!istype(L)) return - - var/Text = href_list["adjustDamage"] - - var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num - - if(!L) - usr << "Mob doesn't exist anymore" - return - - switch(Text) - if("brute") L.adjustBruteLoss(amount) - if("fire") L.adjustFireLoss(amount) - if("toxin") L.adjustToxLoss(amount) - if("oxygen")L.adjustOxyLoss(amount) - if("brain") L.adjustBrainLoss(amount) - if("clone") L.adjustCloneLoss(amount) - else - usr << "You caused an error. DEBUG: Text:[Text] Mob:[L]" + var/mob/M = locate(href_list["rename"]) + if(!istype(M)) + usr << "This can only be used on instances of type /mob" return - if(amount != 0) - log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [L] ") - message_admins("\blue [key_name(usr)] dealt [amount] amount of [Text] damage to [L] ") - href_list["datumrefresh"] = href_list["mobToDamage"] + var/new_name = copytext(sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null),1,MAX_NAME_LEN) + if( !new_name || !M ) return + + message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].") + M.fully_replace_character_name(M.real_name,new_name) + href_list["datumrefresh"] = href_list["rename"] + + else if(href_list["varnameedit"] && href_list["datumedit"]) + if(!check_rights(0)) return + + var/D = locate(href_list["datumedit"]) + if(!istype(D,/datum) && !istype(D,/client)) + usr << "This can only be used on instances of types /client or /datum" + return + + modify_variables(D, href_list["varnameedit"], 1) + + else if(href_list["varnamechange"] && href_list["datumchange"]) + if(!check_rights(0)) return + + var/D = locate(href_list["datumchange"]) + if(!istype(D,/datum) && !istype(D,/client)) + usr << "This can only be used on instances of types /client or /datum" + return + + modify_variables(D, href_list["varnamechange"], 0) + + else if(href_list["varnamemass"] && href_list["datummass"]) + if(!check_rights(0)) return + + var/atom/A = locate(href_list["datummass"]) + if(!istype(A)) + usr << "This can only be used on instances of type /atom" + return + + cmd_mass_modify_object_variables(A, href_list["varnamemass"]) + + else if(href_list["give_spell"]) + if(!check_rights(0)) return + + var/mob/M = locate(href_list["give_spell"]) + if(!istype(M)) + usr << "This can only be used on instances of type /mob" + return + + src.give_spell(M) + href_list["datumrefresh"] = href_list["give_spell"] + + else if(href_list["give_disease"]) + if(!check_rights(0)) return + + var/mob/M = locate(href_list["give_disease"]) + if(!istype(M)) + usr << "This can only be used on instances of type /mob" + return + + src.give_disease(M) + href_list["datumrefresh"] = href_list["give_spell"] + + else if(href_list["ninja"]) + if(!check_rights(R_FUN)) return + + var/mob/M = locate(href_list["ninja"]) + if(!istype(M)) + usr << "This can only be used on instances of type /mob" + return + + src.cmd_admin_ninjafy(M) + href_list["datumrefresh"] = href_list["ninja"] + + else if(href_list["gib"]) + if(!check_rights(R_FUN)) return + + var/mob/M = locate(href_list["gib"]) + if(!istype(M)) + usr << "This can only be used on instances of type /mob" + return + + src.cmd_admin_gib(M) + + else if(href_list["build_mode"]) + if(!check_rights(R_BUILDMODE)) return + + var/mob/M = locate(href_list["build_mode"]) + if(!istype(M)) + usr << "This can only be used on instances of type /mob" + return + + togglebuildmode(M) + href_list["datumrefresh"] = href_list["build_mode"] + + else if(href_list["drop_everything"]) + if(!check_rights(0)) return + + var/mob/M = locate(href_list["drop_everything"]) + if(!istype(M)) + usr << "This can only be used on instances of type /mob" + return + + if(usr.client) + usr.client.cmd_admin_drop_everything(M) + + else if(href_list["direct_control"]) + if(!check_rights(0)) return + + var/mob/M = locate(href_list["direct_control"]) + if(!istype(M)) + usr << "This can only be used on instances of type /mob" + return + + if(usr.client) + usr.client.cmd_assume_direct_control(M) + + else if(href_list["make_skeleton"]) + if(!check_rights(R_FUN)) return + + var/mob/living/carbon/human/H = locate(href_list["make_skeleton"]) + if(!istype(H)) + usr << "This can only be used on instances of type /mob/living/carbon/human" + return + + H.makeSkeleton() + href_list["datumrefresh"] = href_list["make_skeleton"] + + else if(href_list["delall"]) + if(!check_rights(R_DEBUG|R_SERVER)) return + + var/obj/O = locate(href_list["delall"]) + if(!isobj(O)) + usr << "This can only be used on instances of type /obj" + return + + var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel") + if(action_type == "Cancel" || !action_type) + return + + if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes") + return + + if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes") + return + + var/O_type = O.type + switch(action_type) + if("Strict type") + var/i = 0 + for(var/obj/Obj in world) + if(Obj.type == O_type) + i++ + del(Obj) + if(!i) + usr << "No objects of this type exist" + return + log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ") + message_admins("\blue [key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ") + if("Type and subtypes") + var/i = 0 + for(var/obj/Obj in world) + if(istype(Obj,O_type)) + i++ + del(Obj) + if(!i) + usr << "No objects of this type exist" + return + log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ") + message_admins("\blue [key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ") + + else if(href_list["explode"]) + if(!check_rights(R_FUN)) return + + var/atom/A = locate(href_list["explode"]) + if(!isobj(A) && !ismob(A) && !isturf(A)) + usr << "This can only be done to instances of type /obj, /mob and /turf" + return + + src.cmd_admin_explosion(A) + href_list["datumrefresh"] = href_list["explode"] + + else if(href_list["emp"]) + if(!check_rights(R_FUN)) return + + var/atom/A = locate(href_list["emp"]) + if(!isobj(A) && !ismob(A) && !isturf(A)) + usr << "This can only be done to instances of type /obj, /mob and /turf" + return + + src.cmd_admin_emp(A) + href_list["datumrefresh"] = href_list["emp"] + + else if(href_list["rotatedatum"]) + if(!check_rights(0)) return + + var/atom/A = locate(href_list["rotatedatum"]) + if(!istype(A)) + usr << "This can only be done to instances of type /atom" + return + + switch(href_list["rotatedir"]) + if("right") A.dir = turn(A.dir, -45) + if("left") A.dir = turn(A.dir, 45) + href_list["datumrefresh"] = href_list["rotatedatum"] + + else if(href_list["makehuman"]) + if(!check_rights(R_SPAWN)) return + + var/mob/living/carbon/monkey/Mo = locate(href_list["makehuman"]) + if(!istype(Mo)) + usr << "This can only be done to instances of type /mob/living/carbon/monkey" + return + + if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return + if(!Mo) + usr << "Mob doesn't exist anymore" + return + holder.Topic(href, list("humanone"=href_list["makehuman"])) + + else if(href_list["makemonkey"]) + if(!check_rights(R_SPAWN)) return + + var/mob/living/carbon/human/H = locate(href_list["makemonkey"]) + if(!istype(H)) + usr << "This can only be done to instances of type /mob/living/carbon/human" + return + + if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return + if(!H) + usr << "Mob doesn't exist anymore" + return + holder.Topic(href, list("monkeyone"=href_list["makemonkey"])) + + else if(href_list["makerobot"]) + if(!check_rights(R_SPAWN)) return + + var/mob/living/carbon/human/H = locate(href_list["makerobot"]) + if(!istype(H)) + usr << "This can only be done to instances of type /mob/living/carbon/human" + return + + if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return + if(!H) + usr << "Mob doesn't exist anymore" + return + holder.Topic(href, list("makerobot"=href_list["makerobot"])) + + else if(href_list["makealien"]) + if(!check_rights(R_SPAWN)) return + + var/mob/living/carbon/human/H = locate(href_list["makealien"]) + if(!istype(H)) + usr << "This can only be done to instances of type /mob/living/carbon/human" + return + + if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return + if(!H) + usr << "Mob doesn't exist anymore" + return + holder.Topic(href, list("makealien"=href_list["makealien"])) + + else if(href_list["makeslime"]) + if(!check_rights(R_SPAWN)) return + + var/mob/living/carbon/human/H = locate(href_list["makeslime"]) + if(!istype(H)) + usr << "This can only be done to instances of type /mob/living/carbon/human" + return + + if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return + if(!H) + usr << "Mob doesn't exist anymore" + return + holder.Topic(href, list("makeslime"=href_list["makeslime"])) + + else if(href_list["makeai"]) + if(!check_rights(R_SPAWN)) return + + var/mob/living/carbon/human/H = locate(href_list["makeai"]) + if(!istype(H)) + usr << "This can only be done to instances of type /mob/living/carbon/human" + return + + if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return + if(!H) + usr << "Mob doesn't exist anymore" + return + holder.Topic(href, list("makeai"=href_list["makeai"])) + + else if(href_list["setmutantrace"]) + if(!check_rights(R_SPAWN)) return + + var/mob/living/carbon/human/H = locate(href_list["setmutantrace"]) + if(!istype(H)) + usr << "This can only be done to instances of type /mob/living/carbon/human" + return + + var/new_mutantrace = input("Please choose a new mutantrace","Mutantrace",null) as null|anything in list("NONE","golem","lizard","slime","plant","shadow", "fly", "skeleton") + switch(new_mutantrace) + if(null) return + if("NONE") new_mutantrace = "" + if(!H) + usr << "Mob doesn't exist anymore" + return + if(H.dna) + H.dna.mutantrace = new_mutantrace + H.update_body() + H.update_hair() + + else if(href_list["adjustDamage"] && href_list["mobToDamage"]) + if(!check_rights(0)) return + + var/mob/living/L = locate(href_list["mobToDamage"]) + if(!istype(L)) return + + var/Text = href_list["adjustDamage"] + + var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num + + if(!L) + usr << "Mob doesn't exist anymore" + return + + switch(Text) + if("brute") L.adjustBruteLoss(amount) + if("fire") L.adjustFireLoss(amount) + if("toxin") L.adjustToxLoss(amount) + if("oxygen")L.adjustOxyLoss(amount) + if("brain") L.adjustBrainLoss(amount) + if("clone") L.adjustCloneLoss(amount) + else + usr << "You caused an error. DEBUG: Text:[Text] Mob:[L]" + return + + if(amount != 0) + log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [L] ") + message_admins("\blue [key_name(usr)] dealt [amount] amount of [Text] damage to [L] ") + href_list["datumrefresh"] = href_list["mobToDamage"] return From 9412c6222497bf800bd449bfaba160d11e72c60f Mon Sep 17 00:00:00 2001 From: Alek2ander Date: Fri, 13 Dec 2013 00:05:05 +0300 Subject: [PATCH 04/23] Final pass --- code/datums/datumvars.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 2a5e9d84fe3..e2b6f49dc4a 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -194,7 +194,7 @@ client else body += "[D]" if(A.dir) - body += "
    <<[dir2text(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 += {" @@ -219,7 +219,7 @@ client else body += "[D]" if(A.dir) - body += "
    <<[dir2text(A.dir)]>>" + body += "
    [dir2text(A.dir)]" else @@ -449,8 +449,6 @@ client if(href_list["Vars"]) debug_variables(locate(href_list["Vars"])) - //~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records). - if(href_list["datumrefresh"]) var/datum/DAT = locate(href_list["datumrefresh"]) if(!istype(DAT, /datum)) @@ -503,6 +501,9 @@ client if(check_rights(R_VAREDIT,0)) + + //~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records). + if(href_list["rename"]) if(!check_rights(0)) return From c08fe3caf59a87d0b09055b0dd512cab0c0744ff Mon Sep 17 00:00:00 2001 From: Alek2ander Date: Fri, 13 Dec 2013 01:16:56 +0400 Subject: [PATCH 05/23] Cleaning up --- code/datums/datumvars.dm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index e2b6f49dc4a..b53463e5c34 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -266,12 +266,13 @@ client body += "" + if(ismob(D)) body += "" body += "" if(check_rights(R_REJUVINATE,0)) body += "" - + @@ -284,7 +285,7 @@ client body += "" if(check_rights(R_BUILDMODE,0)) body += "" - + if(check_rights(R_FUN,0)) body += "" body += "" @@ -299,14 +300,14 @@ client body += "" body += "" body += "" - + if(isobj(D) || ismob(D) || isturf(D)) if(check_rights(R_FUN,0)) body += "" body += "" body += "" - + if(isobj(D)) if(check_rights(R_DEBUG|R_SERVER,0)) body += "" @@ -316,6 +317,7 @@ client body += "" body += "
    " + if(check_rights(R_VAREDIT,0)) body += "E - Edit, tries to determine the variable type by itself.
    " body += "C - Change, asks you for the var type first.
    " @@ -503,7 +505,7 @@ client //~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records). - + if(href_list["rename"]) if(!check_rights(0)) return From 72e8d36fe596fbf3976708e7d477f22d64c750eb Mon Sep 17 00:00:00 2001 From: Alek2ander Date: Fri, 13 Dec 2013 19:37:07 +0300 Subject: [PATCH 06/23] Reverted links getting disabled when client lacks permissions for them --- code/datums/datumvars.dm | 145 +++++++++++++-------------------------- 1 file changed, 49 insertions(+), 96 deletions(-) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index b53463e5c34..8982f59174e 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -172,56 +172,27 @@ client if(istype(D,/atom)) var/atom/A = D if(isliving(A)) - if(check_rights(R_VAREDIT,0)) - 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()] - + 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)]" - 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 - if(check_rights(R_VAREDIT,0)) - body += "[D]" - if(A.dir) - body += "
    << [dir2text(A.dir)] >>" - - else - body += "[D]" - if(A.dir) - body += "
    [dir2text(A.dir)]" - - + body += "[D]" + if(A.dir) + body += "
    << [dir2text(A.dir)] >>" else body += "[D]" @@ -266,62 +237,44 @@ client body += "" - if(ismob(D)) body += "" + + body += "" + + if(ismob(D)) + body += "" + body += "" + body += "" + body += "" + body += "" + body += "" + body += "" + body += "" body += "" - if(check_rights(R_REJUVINATE,0)) - body += "" - - - - - if(check_rights(R_VAREDIT,0)) - if(ismob(D)) + if(ishuman(D)) body += "" - body += "" - body += "" - body += "" - body += "" - if(check_rights(R_BUILDMODE,0)) - body += "" - - if(check_rights(R_FUN,0)) - body += "" - body += "" - body += "" - - if(ishuman(D)) - if(check_rights(R_SPAWN,0)) - body += "" - body += "" - body += "" - body += "" - body += "" - body += "" - body += "" - - - if(isobj(D) || ismob(D) || isturf(D)) - if(check_rights(R_FUN,0)) - body += "" - body += "" - body += "" - - if(isobj(D)) - if(check_rights(R_DEBUG|R_SERVER,0)) - body += "" - body += "" - + body += "" + body += "" + body += "" + body += "" + body += "" + body += "" + body += "" + body += "" + if(isobj(D)) + body += "" + if(isobj(D) || ismob(D) || isturf(D)) + body += "" + body += "" body += "" body += "
    " - if(check_rights(R_VAREDIT,0)) - 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 += "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:

    " @@ -372,7 +325,7 @@ client proc/debug_variable(name, value, level, var/datum/DA = null) var/html = "" - if(DA && check_rights(R_VAREDIT,0)) + if(DA) html += "
  • (E) (C) (M) " else html += "
  • " @@ -501,7 +454,7 @@ client //Needs +VAREDIT past this point - if(check_rights(R_VAREDIT,0)) + else if(check_rights(R_VAREDIT)) //~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records). From faf61858f8f0b175f1380985a9ef364c4be7abf1 Mon Sep 17 00:00:00 2001 From: Rockdtben Date: Sat, 28 Dec 2013 12:05:02 -0600 Subject: [PATCH 07/23] Refactored throw_at --- code/game/atoms_movable.dm | 101 ++++++++++--------------------------- 1 file changed, 28 insertions(+), 73 deletions(-) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index d17300571b8..f2bd6dc26c2 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -70,89 +70,44 @@ src.throwing = 1 - if(usr) - if(HULK in usr.mutations) - src.throwing = 2 // really strong throw! + if(usr && HULK in usr.mutations) + src.throwing = 2 // really strong throw! var/dist_x = abs(target.x - src.x) var/dist_y = abs(target.y - src.y) - - var/dx - if (target.x > src.x) - dx = EAST - else - dx = WEST - - var/dy - if (target.y > src.y) - dy = NORTH - else - dy = SOUTH + var/dx = (target.x > src.x) ? EAST : WEST + var/dy = (target.y > src.y) ? NORTH : SOUTH var/dist_travelled = 0 var/dist_since_sleep = 0 var/area/a = get_area(src.loc) - if(dist_x > dist_y) - var/error = dist_x/2 - dist_y + var/tdist_x = dist_x; + var/tdist_y = dist_y; + var/tdx = dx; + var/tdy = dy; + if(dist_x <= dist_y) + tdist_x = dist_y; + tdist_y = dist_x; + tdx = dy; + tdy = dx; - while(src && target &&((((src.x < target.x && dx == EAST) || (src.x > target.x && dx == WEST)) && dist_travelled < range) || (a && a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf)) - // only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up - if(error < 0) - var/atom/step = get_step(src, dy) - if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge - break - src.Move(step) - hit_check() - error += dist_x - dist_travelled++ - dist_since_sleep++ - if(dist_since_sleep >= speed) - dist_since_sleep = 0 - sleep(1) - else - var/atom/step = get_step(src, dx) - if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge - break - src.Move(step) - hit_check() - error -= dist_y - dist_travelled++ - dist_since_sleep++ - if(dist_since_sleep >= speed) - dist_since_sleep = 0 - sleep(1) - a = get_area(src.loc) - else - var/error = dist_y/2 - dist_x - while(src && target &&((((src.y < target.y && dy == NORTH) || (src.y > target.y && dy == SOUTH)) && dist_travelled < range) || (a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf)) - // only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up - if(error < 0) - var/atom/step = get_step(src, dx) - if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge - break - src.Move(step) - hit_check() - error += dist_y - dist_travelled++ - dist_since_sleep++ - if(dist_since_sleep >= speed) - dist_since_sleep = 0 - sleep(1) - else - var/atom/step = get_step(src, dy) - if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge - break - src.Move(step) - hit_check() - error -= dist_x - dist_travelled++ - dist_since_sleep++ - if(dist_since_sleep >= speed) - dist_since_sleep = 0 - sleep(1) + var/error = tdist_x/2 - tdist_y + while(((dist_x > dist_y) && (src && target &&((((src.x < target.x && dx == EAST) || (src.x > target.x && dx == WEST)) && dist_travelled < range) || (a && a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf))) || ((dist_x <= dist_y) && (src && target &&((((src.y < target.y && dy == NORTH) || (src.y > target.y && dy == SOUTH)) && dist_travelled < range) || (a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf)))) + // only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up + var/atom/step = get_step(src, (error < 0) ? tdy : tdx) + if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge + break + src.Move(step) + hit_check() + error += (error < 0) ? tdist_x : -tdist_y; // Also swap the two. + dist_travelled++ + dist_since_sleep++ + if(dist_since_sleep >= speed) + dist_since_sleep = 0 + sleep(1) - a = get_area(src.loc) + a = get_area(src.loc) //done throwing, either because it hit something or it finished moving src.throwing = 0 From 2ed39904bab7d1a5c3731443f2c1d27e6fb85f40 Mon Sep 17 00:00:00 2001 From: Rockdtben Date: Sat, 28 Dec 2013 12:55:34 -0600 Subject: [PATCH 08/23] v2.0 --- code/game/atoms_movable.dm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index f2bd6dc26c2..cf0707a6022 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -93,14 +93,17 @@ tdy = dx; var/error = tdist_x/2 - tdist_y - while(((dist_x > dist_y) && (src && target &&((((src.x < target.x && dx == EAST) || (src.x > target.x && dx == WEST)) && dist_travelled < range) || (a && a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf))) || ((dist_x <= dist_y) && (src && target &&((((src.y < target.y && dy == NORTH) || (src.y > target.y && dy == SOUTH)) && dist_travelled < range) || (a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf)))) + while(target && (((((dist_x > dist_y) && ((src.x < target.x && dx == EAST) || (src.x > target.x && dx == WEST))) || ((dist_x <= dist_y) && ((src.y < target.y && dy == NORTH) || (src.y > target.y && dy == SOUTH))) || (src.x > target.x && dx == WEST)) && dist_travelled < range) || (a && a.has_gravity == 0) || istype(src.loc, /turf/space))) // only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up + if(!src.throwing) break + if(!istype(src.loc, /turf)) break + var/atom/step = get_step(src, (error < 0) ? tdy : tdx) if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge break src.Move(step) hit_check() - error += (error < 0) ? tdist_x : -tdist_y; // Also swap the two. + error += (error < 0) ? tdist_x : -tdist_y; dist_travelled++ dist_since_sleep++ if(dist_since_sleep >= speed) From 5153fa4cef99e8fd28e183718f28dbd24ac08002 Mon Sep 17 00:00:00 2001 From: errorage Date: Sun, 29 Dec 2013 18:13:32 +0100 Subject: [PATCH 09/23] Changes damage overlay threshold from 10 and on to 35 and on - Changes the damage overlay thresholds so they start displaying when you are a bit more damaged than currently. There are six damage overlays, their thresholds used to be 10-25; 25-40; 40-55; 55-70; 70-85; 85-infinity. This change sets them to 35-45; 45-55; 55-65; 65-75; 75-85; 85-infinity. (The thresholds are the sum of fireloss, bruteloss and the hit indicator variable) - Oxyloss overlay left unchanged, since you pass out at 50 or something, so you need the visual cue quicker. Main reason for this proposed change is that I feel the overlays kick in too quickly. I think it'd be good to leave a little room, so you don't get an overlay as soon as the first moron boops you over the head with his crowbar. --- code/modules/mob/living/carbon/human/life.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 94e0f6a5b81..5798d8878ab 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -996,15 +996,15 @@ if(hurtdamage) var/image/I switch(hurtdamage) - if(10 to 25) + if(35 to 45) I = image("icon" = 'icons/mob/screen_full.dmi', "icon_state" = "brutedamageoverlay1") - if(25 to 40) + if(45 to 55) I = image("icon" = 'icons/mob/screen_full.dmi', "icon_state" = "brutedamageoverlay2") - if(40 to 55) + if(55 to 65) I = image("icon" = 'icons/mob/screen_full.dmi', "icon_state" = "brutedamageoverlay3") - if(55 to 70) + if(65 to 75) I = image("icon" = 'icons/mob/screen_full.dmi', "icon_state" = "brutedamageoverlay4") - if(70 to 85) + if(75 to 85) I = image("icon" = 'icons/mob/screen_full.dmi', "icon_state" = "brutedamageoverlay5") if(85 to INFINITY) I = image("icon" = 'icons/mob/screen_full.dmi', "icon_state" = "brutedamageoverlay6") From 89faaaf999dc0235e98d29c9a94577af0f78c881 Mon Sep 17 00:00:00 2001 From: Rockdtben Date: Sun, 29 Dec 2013 12:12:41 -0600 Subject: [PATCH 10/23] Moved Speech Modification via masks to masks. say and whisper now call the speechModification(message) proc in wear_mask. Moved derpspeech modification to mob_helpers.dm --- code/modules/clothing/masks/boxing.dm | 23 +++++++++ code/modules/clothing/masks/gasmask.dm | 22 +++++++++ code/modules/clothing/masks/miscellaneous.dm | 13 ++++- code/modules/mob/living/carbon/human/say.dm | 47 +------------------ .../mob/living/carbon/human/whisper.dm | 20 +------- code/modules/mob/living/say.dm | 15 +----- code/modules/mob/mob_helpers.dm | 17 +++++++ 7 files changed, 78 insertions(+), 79 deletions(-) diff --git a/code/modules/clothing/masks/boxing.dm b/code/modules/clothing/masks/boxing.dm index 129c69e90ff..19c5d2c9d47 100644 --- a/code/modules/clothing/masks/boxing.dm +++ b/code/modules/clothing/masks/boxing.dm @@ -16,6 +16,29 @@ flags_inv = HIDEFACE w_class = 2 +/obj/item/clothing/mask/luchador/speechModification(message) + if(copytext(message, 1, 2) != "*") + message = replacetext(message, "captain", "CAPITÁN") + message = replacetext(message, "station", "ESTACIÓN") + message = replacetext(message, "sir", "SEÑOR") + message = replacetext(message, "the ", "el ") + message = replacetext(message, "my ", "mi ") + message = replacetext(message, "is ", "es ") + message = replacetext(message, "it's", "es") + message = replacetext(message, "friend", "amigo") + message = replacetext(message, "buddy", "amigo") + message = replacetext(message, "hello", "hola") + message = replacetext(message, " hot", " caliente") + message = replacetext(message, " very ", " muy ") + message = replacetext(message, "sword", "espada") + message = replacetext(message, "library", "biblioteca") + message = replacetext(message, "traitor", "traidor") + message = replacetext(message, "wizard", "mago") + message = uppertext(message) //Things end up looking better this way (no mixed cases), and it fits the macho wrestler image. + if(prob(25)) + message += " OLE!" + return message + /obj/item/clothing/mask/luchador/tecnicos name = "Tecnicos Mask" desc = "Worn by robust fighters who uphold justice and fight honorably." diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index d36c1da37a7..61706427b28 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -199,6 +199,28 @@ item_state = "s-ninja_mask" vchange = 1 +/obj/item/clothing/mask/gas/voice/space_ninja/speechModification(message) + if(voice == "Unknown") + if(copytext(message, 1, 2) != "*") + var/list/temp_message = text2list(message, " ") + var/list/pick_list = list() + for(var/i = 1, i <= temp_message.len, i++) + pick_list += i + for(var/i=1, i <= abs(temp_message.len/3), i++) + var/H = pick(pick_list) + if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue + temp_message[H] = ninjaspeak(temp_message[H]) + pick_list -= H + message = dd_list2text(temp_message, " ") + message = replacetext(message, "o", "¤") + message = replacetext(message, "p", "þ") + message = replacetext(message, "l", "£") + message = replacetext(message, "s", "§") + message = replacetext(message, "u", "µ") + message = replacetext(message, "b", "ß") + return message + + /obj/item/clothing/mask/gas/clown_hat name = "clown wig and mask" desc = "A true prankster's facial attire. A clown is incomplete without his wig and mask." diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index 1baca831718..d7259f9edf5 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -1,3 +1,8 @@ + +//Override this to modify speech like luchador masks. +/obj/item/clothing/mask/proc/speechModification(message) + return message + /obj/item/clothing/mask/muzzle name = "muzzle" desc = "To stop that awful noise." @@ -56,4 +61,10 @@ flags = FPRINT|TABLEPASS|BLOCKHAIR flags_inv = HIDEFACE w_class = 2 - var/voicechange = 0 \ No newline at end of file + var/voicechange = 0 + +/obj/item/clothing/mask/horsehead/speechModification(message) + if(voicechange) + if(!(copytext(message, 1, 2) == "*" || (usr.mind && usr.mind.changeling && (copytext(message, 1, 3) == ":g" || copytext(message, 1, 3) == ":G" || copytext(message, 1, 3) == ":ï")))) + message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!") + return message \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index aa9ea615239..73a7961d649 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -55,52 +55,7 @@ message = dd_list2text(temp_message, " ") if(wear_mask) - if(istype(wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja) && wear_mask:voice == "Unknown") - if(copytext(message, 1, 2) != "*") - var/list/temp_message = text2list(message, " ") - var/list/pick_list = list() - for(var/i = 1, i <= temp_message.len, i++) - pick_list += i - for(var/i=1, i <= abs(temp_message.len/3), i++) - var/H = pick(pick_list) - if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue - temp_message[H] = ninjaspeak(temp_message[H]) - pick_list -= H - message = dd_list2text(temp_message, " ") - message = replacetext(message, "o", "¤") - message = replacetext(message, "p", "þ") - message = replacetext(message, "l", "£") - message = replacetext(message, "s", "§") - message = replacetext(message, "u", "µ") - message = replacetext(message, "b", "ß") - - else if(istype(wear_mask, /obj/item/clothing/mask/luchador)) - if(copytext(message, 1, 2) != "*") - message = replacetext(message, "captain", "CAPITÁN") - message = replacetext(message, "station", "ESTACIÓN") - message = replacetext(message, "sir", "SEÑOR") - message = replacetext(message, "the ", "el ") - message = replacetext(message, "my ", "mi ") - message = replacetext(message, "is ", "es ") - message = replacetext(message, "it's", "es") - message = replacetext(message, "friend", "amigo") - message = replacetext(message, "buddy", "amigo") - message = replacetext(message, "hello", "hola") - message = replacetext(message, " hot", " caliente") - message = replacetext(message, " very ", " muy ") - message = replacetext(message, "sword", "espada") - message = replacetext(message, "library", "biblioteca") - message = replacetext(message, "traitor", "traidor") - message = replacetext(message, "wizard", "mago") - message = uppertext(message) //Things end up looking better this way (no mixed cases), and it fits the macho wrestler image. - if(prob(25)) - message += " OLE!" - - else if(istype(wear_mask, /obj/item/clothing/mask/horsehead)) - var/obj/item/clothing/mask/horsehead/hoers = wear_mask - if(hoers.voicechange) - if(!(copytext(message, 1, 2) == "*" || (mind && mind.changeling && (copytext(message, 1, 3) == ":g" || copytext(message, 1, 3) == ":G" || copytext(message, 1, 3) == ":ï")))) - message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!") + message = wear_mask.speechModification(message) if ((HULK in mutations) && health >= 25 && length(message)) if(copytext(message, 1, 2) != "*") diff --git a/code/modules/mob/living/carbon/human/whisper.dm b/code/modules/mob/living/carbon/human/whisper.dm index 43b05920d33..d5ec65900b0 100644 --- a/code/modules/mob/living/carbon/human/whisper.dm +++ b/code/modules/mob/living/carbon/human/whisper.dm @@ -44,24 +44,8 @@ var/italics = 1 var/message_range = 1 - if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown") - if(copytext(message, 1, 2) != "*") - var/list/temp_message = text2list(message, " ") - var/list/pick_list = list() - for(var/i = 1, i <= temp_message.len, i++) - pick_list += i - for(var/i=1, i <= abs(temp_message.len/3), i++) - var/H = pick(pick_list) - if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue - temp_message[H] = ninjaspeak(temp_message[H]) - pick_list -= H - message = dd_list2text(temp_message, " ") - message = replacetext(message, "o", "¤") - message = replacetext(message, "p", "þ") - message = replacetext(message, "l", "£") - message = replacetext(message, "s", "§") - message = replacetext(message, "u", "µ") - message = replacetext(message, "b", "ß") + if(src.wear_mask) + message = wear_mask.speechModification(message) if (src.stuttering) message = stutter(message) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 5539a1b74a3..27aaae5e1a0 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -142,20 +142,7 @@ var/list/department_radio_keys = list( // :downs: if (getBrainLoss() >= 60) - message = replacetext(message, " am ", " ") - message = replacetext(message, " is ", " ") - message = replacetext(message, " are ", " ") - message = replacetext(message, "you", "u") - message = replacetext(message, "help", "halp") - message = replacetext(message, "grief", "grife") - message = replacetext(message, "space", "spess") - message = replacetext(message, "carp", "crap") - message = replacetext(message, "reason", "raisin") - if(prob(50)) - message = uppertext(message) - message += "[stutter(pick("!", "!!", "!!!"))]" - if(!stuttering && prob(15)) - message = stutter(message) + message = derpspeech(message, stuttering) if (stuttering) message = stutter(message) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 1d109b80f5b..61f4ca99546 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -215,6 +215,23 @@ proc/isorgan(A) p++//for each letter p is increased to find where the next letter will be. return copytext(sanitize(t),1,MAX_MESSAGE_LEN) +/proc/derpspeech(message, stuttering) + message = replacetext(message, " am ", " ") + message = replacetext(message, " is ", " ") + message = replacetext(message, " are ", " ") + message = replacetext(message, "you", "u") + message = replacetext(message, "help", "halp") + message = replacetext(message, "grief", "grife") + message = replacetext(message, "space", "spess") + message = replacetext(message, "carp", "crap") + message = replacetext(message, "reason", "raisin") + if(prob(50)) + message = uppertext(message) + message += "[stutter(pick("!", "!!", "!!!"))]" + if(!stuttering && prob(15)) + message = stutter(message) + return message + proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 for p will cause letters to be replaced instead of added /* Turn text into complete gibberish! */ From c8bdf9420c3d531ab8d3f1f250e1cbf2459ce59f Mon Sep 17 00:00:00 2001 From: Rockdtben Date: Sun, 29 Dec 2013 16:09:35 -0600 Subject: [PATCH 11/23] Put this in the right place --- code/modules/clothing/clothing.dm | 5 +++++ code/modules/clothing/masks/miscellaneous.dm | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index ab501d7dd1c..7490b3f4c09 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -72,6 +72,11 @@ BLIND // can't see anything body_parts_covered = HEAD slot_flags = SLOT_MASK + +//Override this to modify speech like luchador masks. +/obj/item/clothing/mask/proc/speechModification(message) + return message + //Shoes /obj/item/clothing/shoes name = "shoes" diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index d7259f9edf5..3e8d6999482 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -1,8 +1,3 @@ - -//Override this to modify speech like luchador masks. -/obj/item/clothing/mask/proc/speechModification(message) - return message - /obj/item/clothing/mask/muzzle name = "muzzle" desc = "To stop that awful noise." From e7338e1b1a10505ee6409265b97bd198ca1a329a Mon Sep 17 00:00:00 2001 From: fleure Date: Sun, 29 Dec 2013 22:46:24 +0000 Subject: [PATCH 12/23] Building arcade machines now works --- code/game/machinery/computer/arcade.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 5a4854349b6..fb922c6fb9a 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -70,7 +70,7 @@ desc = "Does not support Pinball." icon = 'icons/obj/computer.dmi' icon_state = "arcade" - circuit = /obj/item/weapon/circuitboard/arcade + circuit = /obj/item/weapon/circuitboard/arcade/battle var/enemy_name = "Space Villian" var/temp = "Winners Don't Use Spacedrugs" //Temporary message, for attack messages, etc var/player_hp = 30 //Player health/attack points From a348534ab15df777e7602d9d888b48f861970bb1 Mon Sep 17 00:00:00 2001 From: Cluwnes Honk Date: Sun, 29 Dec 2013 15:54:50 -0800 Subject: [PATCH 13/23] Personnelly, I feel this pull request was successfull. Spelling fixes. --- code/game/machinery/newscaster.dm | 4 ++-- .../structures/crates_lockers/closets/secure/personal.dm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 35385ec64ff..b04ecad5106 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -409,10 +409,10 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co dat+="Wanted issue for [src.channel_name] successfully edited.

    " dat+="
    Return
    " if(20) - dat+="Printing successfull. Please receive your newspaper from the bottom of the machine.

    " + dat+="Printing successful. Please receive your newspaper from the bottom of the machine.

    " dat+="Return" if(21) - dat+="Unable to print newspaper. Insufficient paper. Please notify maintenance personnell to refill machine storage.

    " + dat+="Unable to print newspaper. Insufficient paper. Please notify maintenance personnel to refill machine storage.

    " dat+="Return" else dat+="I'm sorry to break your immersion. This shit's bugged. Report this bug to Agouri, polyxenitopalidou@gmail.com" diff --git a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm index c09bbb8f538..1dad4811ea5 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm @@ -1,5 +1,5 @@ /obj/structure/closet/secure_closet/personal - desc = "It's a secure locker for personell. The first card swiped gains control." + desc = "It's a secure locker for personnel. The first card swiped gains control." name = "personal closet" req_access = list(access_all_personal_lockers) var/registered_name = null From df7fd3f98aecf33ea4e5d3024d82e032f8daf5b7 Mon Sep 17 00:00:00 2001 From: Cluwnes Honk Date: Sun, 29 Dec 2013 16:03:01 -0800 Subject: [PATCH 14/23] Gives the chicken suit head some hiding flags The chicken suit helmet now has the same inv_flags as a xeno helm. --- code/modules/clothing/head/misc.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 37a495992c3..70cc4b22744 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -164,6 +164,7 @@ icon_state = "chickenhead" item_state = "chickensuit" flags = FPRINT | TABLEPASS | BLOCKHAIR + flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE /obj/item/clothing/head/bearpelt name = "bear pelt hat" From 02a91e4c76e4d353e43ed605624441e94d81da58 Mon Sep 17 00:00:00 2001 From: Incoming Date: Mon, 30 Dec 2013 14:26:37 -0500 Subject: [PATCH 15/23] Changes the initialism for stat collecting on summon magic to SU because SM was taken by smoke. On the stat page this will result in smoke being overreported until a full month after this change has been live on both servers. For judgement purposes you can probably assume that nearly all "smoke" spells on the stat page are actually summon magic, because who the hell takes smoke? --- code/game/gamemodes/wizard/spellbook.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 3627da60f5b..618850f4411 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -253,7 +253,7 @@ max_uses-- temp = "You have cast summon guns." if("summonmagic") - feedback_add_details("wizard_spell_learned","SM") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells + feedback_add_details("wizard_spell_learned","SU") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells H.rightandwrong(1) max_uses-- temp = "You have cast summon magic." From 0184a61ef9041f61e56c5ffbfdc0ae230aec3b9d Mon Sep 17 00:00:00 2001 From: Aranclanos Date: Mon, 30 Dec 2013 19:44:58 -0300 Subject: [PATCH 16/23] Syringe guns will now work on aliens properly --- code/modules/projectiles/projectile/bullets.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index b319ea8ab8d..d2e0a4063f3 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -80,7 +80,7 @@ on_hit(var/atom/target, var/blocked = 0, var/hit_zone) if(istype(target, /mob/living/carbon)) var/mob/living/carbon/M = target - if(M.can_inject(target_zone = hit_zone)) // Pass the hit zone to see if it can inject by whether it hit the head or the body. + if(M.can_inject(null,0,hit_zone)) // Pass the hit zone to see if it can inject by whether it hit the head or the body. reagents.trans_to(M, reagents.total_volume) return 1 else From de466f72f78c321c03e8b117b766dfd0eac528be Mon Sep 17 00:00:00 2001 From: fleure Date: Tue, 31 Dec 2013 00:46:56 +0000 Subject: [PATCH 17/23] Updated changelog for recent bugfixes --- html/changelog.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/html/changelog.html b/html/changelog.html index b9f40f238ac..516f47cde9c 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -52,7 +52,15 @@ should be listed in the changelog upon commit tho. Thanks. --> - +
    +

    31 December 2013

    +

    Fleure updated:

    +
      +
    • Paper no longer appears with words on it when blank input written or photocopied
    • +
    • Vending machine speaker toggle button now works
    • +
    • Building arcade machines works again
    • +
    +

    27 December 2013

    From b33efbfa6be0f6bda68cd6ea219be65a24df5dba Mon Sep 17 00:00:00 2001 From: Incoming Date: Tue, 31 Dec 2013 01:11:20 -0500 Subject: [PATCH 18/23] Improves logging on the bolt of change so admins can follow the paper trail of terrible mobs who get turned into other terrible mobs --- code/modules/projectiles/projectile/magic.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 2e790b36383..b7d19dea00d 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -193,6 +193,9 @@ proc/wabbajack(mob/living/M) for (var/obj/effect/proc_holder/spell/S in M.spell_list) new_mob.spell_list += new S.type + new_mob.attack_log = M.attack_log + M.attack_log += text("\[[time_stamp()]\] [M.real_name] ([M.ckey]) became [new_mob.real_name].") + new_mob.a_intent = "harm" if(M.mind) M.mind.transfer_to(new_mob) From a7ead625bea2e7a9960fdd26cf811681b82e9384 Mon Sep 17 00:00:00 2001 From: Perakp Date: Tue, 31 Dec 2013 17:28:50 +0200 Subject: [PATCH 19/23] Fixes Ethereal Jaunt notransformation protection was stopping movement calls to the holder object. Refractored code so wraith phase shift isn't copypaste just to change animations. --- code/datums/spells/construct_spells.dm | 13 +++- code/datums/spells/ethereal_jaunt.dm | 89 ++++++++++--------------- icons/mob/mob.dmi | Bin 181091 -> 181091 bytes 3 files changed, 47 insertions(+), 55 deletions(-) diff --git a/code/datums/spells/construct_spells.dm b/code/datums/spells/construct_spells.dm index 74f5de75e09..ed3248d776a 100644 --- a/code/datums/spells/construct_spells.dm +++ b/code/datums/spells/construct_spells.dm @@ -83,10 +83,21 @@ invocation_type = "none" range = -1 include_user = 1 - phaseshift = 1 jaunt_duration = 50 //in deciseconds centcom_cancast = 0 //Stop people from getting to centcom +/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift/jaunt_disappear(var/atom/movable/overlay/animation, var/mob/living/target) + animation.icon_state = "phase_shift" + animation.dir = target.dir + flick("phase_shift",animation) + +/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift/jaunt_reappear(var/atom/movable/overlay/animation, var/mob/living/target) + animation.icon_state = "phase_shift2" + animation.dir = target.dir + flick("phase_shift2",animation) + +/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift/jaunt_steam(var/mobloc) + return /obj/effect/proc_holder/spell/targeted/projectile/magic_missile/lesser name = "Lesser Magic Missile" diff --git a/code/datums/spells/ethereal_jaunt.dm b/code/datums/spells/ethereal_jaunt.dm index 347361cc8ea..20de7205d71 100644 --- a/code/datums/spells/ethereal_jaunt.dm +++ b/code/datums/spells/ethereal_jaunt.dm @@ -11,8 +11,6 @@ cooldown_min = 100 //50 deciseconds reduction per rank include_user = 1 centcom_cancast = 0 //Prevent people from getting to centcom - - var phaseshift = 0 var/jaunt_duration = 50 //in deciseconds /obj/effect/proc_holder/spell/targeted/ethereal_jaunt/cast(list/targets) //magnets, so mostly hardcoded @@ -26,63 +24,46 @@ animation.density = 0 animation.anchored = 1 animation.icon = 'icons/mob/mob.dmi' - animation.icon_state = "liquify" animation.layer = 5 animation.master = holder target.ExtinguishMob() if(target.buckled) target.buckled.unbuckle() - if(phaseshift == 1) - animation.dir = target.dir - flick("phase_shift",animation) - target.loc = holder - sleep(jaunt_duration) - mobloc = get_turf(target.loc) - animation.loc = mobloc - target.canmove = 0 - holder.reappearing = 1 - sleep(20) - animation.dir = target.dir - flick("phase_shift2",animation) - sleep(5) - if(!target.Move(mobloc)) - for(var/direction in list(1,2,4,8,5,6,9,10)) - var/turf/T = get_step(mobloc, direction) - if(T) - if(target.Move(T)) - break - target.canmove = 1 - target.notransform = 0 - target.client.eye = target - del(animation) - del(holder) - else - flick("liquify",animation) - target.loc = holder - var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread() - steam.set_up(10, 0, mobloc) - steam.start() - sleep(jaunt_duration) - mobloc = get_turf(target.loc) - animation.loc = mobloc - steam.location = mobloc - steam.start() - target.canmove = 0 - holder.reappearing = 1 - sleep(20) - flick("reappear",animation) - sleep(5) - if(!target.Move(mobloc)) - for(var/direction in list(1,2,4,8,5,6,9,10)) - var/turf/T = get_step(mobloc, direction) - if(T) - if(target.Move(T)) - break - target.canmove = 1 - target.notransform = 0 - target.client.eye = target - del(animation) - del(holder) + jaunt_disappear(animation, target) + target.loc = holder + target.notransform=0 //mob is safely inside holder now, no need for protection. + jaunt_steam(mobloc) + sleep(jaunt_duration) + mobloc = get_turf(target.loc) + animation.loc = mobloc + jaunt_steam(mobloc) + target.canmove = 0 + holder.reappearing = 1 + sleep(20) + jaunt_reappear(animation, target) + sleep(5) + if(!target.Move(mobloc)) + for(var/direction in list(1,2,4,8,5,6,9,10)) + var/turf/T = get_step(mobloc, direction) + if(T) + if(target.Move(T)) + break + target.canmove = 1 + target.client.eye = target + del(animation) + del(holder) + +/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/jaunt_disappear(var/atom/movable/overlay/animation, var/mob/living/target) + animation.icon_state = "liquify" + flick("liquify",animation) + +/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/jaunt_reappear(var/atom/movable/overlay/animation, var/mob/living/target) + flick("reappear",animation) + +/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/jaunt_steam(var/mobloc) + var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread() + steam.set_up(10, 0, mobloc) + steam.start() /obj/effect/dummy/spell_jaunt name = "water" diff --git a/icons/mob/mob.dmi b/icons/mob/mob.dmi index d2221d97303ac522b69361ba81b255d96b8496d7..0ffd3ebd1a0dd27fb267fdeb82472fdac05caa10 100644 GIT binary patch delta 671 zcmV;Q0$}~)h703{3y?Yn&2ri>5XX@~D}U?9?rOixE%|o;{o#phA0M)3uud9HHstQp zGMnus^MY*1s>o&nBo}`8;ym?0HsnSWt+(>5kJ5S@t^ROqIwr*pQr@YtnQm8KPvAoD+`pVfL}z;lrdfK2+o!aHB>Sj(|<0s z(SXVJ|q~@ryqSb*| zV-4CH-;@Ms#Ho`K|2)r^;h-EjET#30Zt7LiRMzf0N_&Twr6w@SdB!6LmqWnjEV(SIwTSnqrk zG|fTQJ0A`G2T-xF=LqT@CKm8%7P*C%`WHp(>qXb#TcWYnSX8EE8`g|+c{N{;^25ZI zzvV@z#{(PhJ5EprWm03KwlzKOF121ZvIbmP_X;026$ogJ7x-;Z`wY$}{4N*9`N&K< zNvZXGJzrm#lR0Yp(4#qDaDQv|DZ_1a0H3d&pbknWWD{AYKDfi4aEq&g8)c{;1tL}t z%lYf)UDQhpc&ZM{O3@mBD}2@Vc(Dx91E}bnI}>vYkhmz7olJO%9i;Ukb^R*Y1lL%4 zaM={k*aUmIjr|L8j-7NB>{5Jh$^FxoY#$%8zqo|9b4$M6e}8x)+sB9O8LX2=lMT81 zw9ICE$-E#NvMREf0Lg_PzBo@kkPW#JMQij94ma71N$bdl}D&QB9Gi6K{T!OPDLj#oz$A7d7 zZ8V@V3(qNb``s(a;s{@CII8LQdVe*R)c0y$ETrmVJE9&0L9?I!d_|?Ab&(Gq!G9<&ZCiXVVsv#Ckyc&#f5QxCpAZv6|D}$ z8f(zr_@*R4Bc@J{_~&`P3@7EtVJWR|EMI6-8;f^e%6jF~d>y6f#!e5+AEQYN-WnM( zvp%hrmnWQ>F^zC_+95uMN9_DFfp@iho`K#d_zX zplJqK?|d}%A3(*@o+GGtm{`K6MdTJ*>R%K+UoW}_za<)LjYVZzwqebvmRIxjs6I^W z^0&NbdOWc4zT*UCP$o4tYFpFecB%EUku~7Tx>xwHsX#z$yuf#Z+GlV+;di+(&PQg_ zNlC5e>-qY^oXpYKhaS!Of`41HPZ@5b1^9gJ1a(k4A)Cl$YEmCLp%quaHOf#wG99b^ z<^1*YF2kh-yetQ0rD%=60lsQ`{9p{y1E}asI}>vYka#I7JDKppI!Nn7>Q$>`6RffH z>{5Pj$^FxoY#$%8zbwqL?Y;i*nE(JF0E6ZNhvotSx8?!@ FeZZ68Nv!|? From be0f52b6236fc8c6c2f819f97feed0ea6ada6cf2 Mon Sep 17 00:00:00 2001 From: fleure Date: Tue, 31 Dec 2013 17:06:34 +0000 Subject: [PATCH 20/23] Fixed bruisepacks not working --- code/game/objects/items/stacks/medical.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index c143ddd39e6..4369c3b99b6 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -64,10 +64,10 @@ affecting = H.get_organ("head") - if (affecting.heal_damage(src.heal_brute, src.heal_burn, 0)) - H.update_damage_overlays(0) + if (affecting.heal_damage(src.heal_brute, src.heal_burn, 0)) + H.update_damage_overlays(0) - M.updatehealth() + M.updatehealth() else M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2)) From 61f2cf929261e5cf1108a985c811a685fac516d7 Mon Sep 17 00:00:00 2001 From: fleure Date: Tue, 31 Dec 2013 23:39:30 +0000 Subject: [PATCH 21/23] Fixed stabbing head with thick suit on --- code/modules/mob/living/carbon/human/human.dm | 15 +++++++-------- code/modules/mob/mob_helpers.dm | 6 ++++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 3eb9e044d4f..d9aaa28c2ac 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -458,13 +458,12 @@ target_zone = user.zone_sel.selecting // If targeting the head, see if the head item is thin enough. // If targeting anything else, see if the wear suit is thin enough. - switch(target_zone) - if("head") - if(head && head.flags & THICKMATERIAL) - . = 0 - else - if(wear_suit && wear_suit.flags & THICKMATERIAL) - . = 0 + if(above_neck(target_zone)) + if(head && head.flags & THICKMATERIAL) + . = 0 + else + if(wear_suit && wear_suit.flags & THICKMATERIAL) + . = 0 if(!. && error_msg && user) // Might need re-wording. - user << "There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"]." + user << "There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"]." \ No newline at end of file diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 1d109b80f5b..088e208b8ac 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -169,6 +169,12 @@ proc/isorgan(A) return zone +/proc/above_neck(zone) + var/list/zones = list("head", "mouth", "eyes") + if(zones.Find(zone)) + return 1 + else + return 0 /proc/stars(n, pr) if (pr == null) From 4a01ed176cab9c3a21d68a78041eaac06a4637cd Mon Sep 17 00:00:00 2001 From: fleure Date: Wed, 1 Jan 2014 15:33:49 +0000 Subject: [PATCH 22/23] Fixed stabbing error message target check --- code/modules/mob/living/carbon/human/human.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index d9aaa28c2ac..41ddbb312f6 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -466,4 +466,4 @@ . = 0 if(!. && error_msg && user) // Might need re-wording. - user << "There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"]." \ No newline at end of file + user << "There is no exposed flesh or thin material [above_neck(target_zone) ? "on their head" : "on their body"]." \ No newline at end of file From 40ce9dfeb717d51b6b734ddfc0e1fe6f30b8d183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matev=C5=BE=20Baloh?= Date: Wed, 1 Jan 2014 16:57:25 +0100 Subject: [PATCH 23/23] Changelog for PR 2181 Link to pull request: https://github.com/tgstation/-tg-station/pull/2181 --- html/changelog.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/html/changelog.html b/html/changelog.html index 516f47cde9c..4d1fade3f8a 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -52,7 +52,17 @@ should be listed in the changelog upon commit tho. Thanks. --> -
    + + +
    +

    1 January 2014

    +

    Errorage updated:

    +
      +
    • The damage overlay for humans starts a little later than before. It used to start at 10 points of fire + brute damage, it now starts at 35.
    • +
    +
    + +

    31 December 2013

    Fleure updated: