Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
+49 -67
View File
@@ -1,14 +1,12 @@
// see _DEFINES/is_helpers.dm for mob type checks
/mob/proc/isloyal() //Checks to see if the person contains a mindshield implant, then checks that the implant is actually inside of them
/proc/isloyal(A) //Checks to see if the person contains a mindshield implant, then checks that the implant is actually inside of them
for(var/obj/item/weapon/implant/mindshield/L in A)
if(L && L.implanted)
return 1
return 0
/mob/living/carbon/isloyal()
for(var/obj/item/weapon/implant/mindshield/L in implants)
return 1
/proc/check_zone(zone)
if(!zone)
return "chest"
@@ -275,11 +273,33 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
return 0
/mob/proc/abiotic(full_body = 0)
for(var/obj/item/I in held_items)
if(!(I.flags & NODROP))
return 1
if(l_hand && !l_hand.flags&ABSTRACT || r_hand && !r_hand.flags&ABSTRACT)
return 1
return 0
//converts intent-strings into numbers and back
/proc/intent_numeric(argument)
if(istext(argument))
switch(argument)
if("help")
return 0
if("disarm")
return 1
if("grab")
return 2
else
return 3
else
switch(argument)
if(0)
return "help"
if(1)
return "disarm"
if(2)
return "grab"
else
return "harm"
//change a mob's act-intent. Input the intent as a string such as "help" or use "right"/"left
/mob/verb/a_intent_change(input as text)
set name = "a-intent"
@@ -287,44 +307,24 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
if(ishuman(src) || isalienadult(src) || isbrain(src))
switch(input)
if(INTENT_HELP, INTENT_DISARM, INTENT_GRAB, INTENT_HARM)
if("help", "disarm", "grab", "harm")
a_intent = input
if(INTENT_HOTKEY_RIGHT)
switch (a_intent)
if(INTENT_HELP)
a_intent = INTENT_DISARM
if(INTENT_DISARM)
a_intent = INTENT_GRAB
if(INTENT_GRAB)
a_intent = INTENT_HARM
if(INTENT_HARM)
a_intent = INTENT_HELP
if(INTENT_HOTKEY_LEFT)
switch (a_intent)
if(INTENT_HELP)
a_intent = INTENT_HARM
if(INTENT_DISARM)
a_intent = INTENT_HELP
if(INTENT_GRAB)
a_intent = INTENT_DISARM
if(INTENT_HARM)
a_intent = INTENT_GRAB
if("right")
a_intent = intent_numeric((intent_numeric(a_intent) + 1) % 4)
if("left")
a_intent = intent_numeric((intent_numeric(a_intent) + 3) % 4)
if(hud_used && hud_used.action_intent)
hud_used.action_intent.icon_state = "[a_intent]"
else if(iscyborg(src) || ismonkey(src) || islarva(src))
else if(isrobot(src) || ismonkey(src) || islarva(src))
switch(input)
if(INTENT_HELP)
a_intent = INTENT_HELP
if(INTENT_HARM)
a_intent = INTENT_HARM
if(INTENT_HOTKEY_RIGHT, INTENT_HOTKEY_LEFT)
switch (a_intent)
if(INTENT_HELP)
a_intent = INTENT_HARM
if(INTENT_HARM)
a_intent = INTENT_HELP
if("help")
a_intent = "help"
if("harm")
a_intent = "harm"
if("right","left")
a_intent = intent_numeric(intent_numeric(a_intent) - 3)
if(hud_used && hud_used.action_intent)
hud_used.action_intent.icon_state = "[a_intent]"
@@ -341,7 +341,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
if(!istype(M))
return 0
if(issilicon(M))
if(iscyborg(M)) //For cyborgs, returns 1 if the cyborg has a law 0 and special_role. Returns 0 if the borg is merely slaved to an AI traitor.
if(isrobot(M)) //For cyborgs, returns 1 if the cyborg has a law 0 and special_role. Returns 0 if the borg is merely slaved to an AI traitor.
var/mob/living/silicon/robot/R = M
if(R.mind && R.mind.special_role)
if(R.laws && R.laws.zeroth && R.syndicate)
@@ -384,6 +384,10 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
return 1
return 0
/proc/get_both_hands(mob/living/carbon/M)
var/list/hands = list(M.l_hand, M.r_hand)
return hands
/mob/proc/reagent_check(datum/reagent/R) // utilized in the species code
return 1
@@ -403,28 +407,23 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
A.target = source
if(!alert_overlay)
var/old_layer = source.layer
var/old_plane = source.plane
source.layer = FLOAT_LAYER
source.plane = FLOAT_PLANE
A.add_overlay(source)
source.layer = old_layer
source.plane = old_plane
else
alert_overlay.layer = FLOAT_LAYER
alert_overlay.plane = FLOAT_PLANE
A.add_overlay(alert_overlay)
/proc/item_heal_robotic(mob/living/carbon/human/H, mob/user, brute_heal, burn_heal)
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
if(affecting && affecting.status == BODYPART_ROBOTIC)
if(affecting && affecting.status == ORGAN_ROBOTIC)
var/dam //changes repair text based on how much brute/burn was supplied
if(brute_heal > burn_heal)
dam = 1
else
dam = 0
if((brute_heal > 0 && affecting.brute_dam > 0) || (burn_heal > 0 && affecting.burn_dam > 0))
if(affecting.heal_damage(brute_heal, burn_heal, 1, 0))
H.update_damage_overlays()
affecting.heal_damage(brute_heal,burn_heal,1)
user.visible_message("[user] has fixed some of the [dam ? "dents on" : "burnt wires in"] [H]'s [affecting].", "<span class='notice'>You fix some of the [dam ? "dents on" : "burnt wires in"] [H]'s [affecting].</span>")
return 1 //successful heal
else
@@ -454,7 +453,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
poll_message = "[poll_message] Job:[M.mind.assigned_role]."
if(M.mind && M.mind.special_role)
poll_message = "[poll_message] Status:[M.mind.special_role]."
var/list/mob/dead/observer/candidates = pollCandidatesForMob(poll_message, "pAI", null, FALSE, 100, M)
var/list/mob/dead/observer/candidates = pollCandidates(poll_message, "pAI", null, FALSE, 100)
var/mob/dead/observer/theghost = null
if(candidates.len)
@@ -468,20 +467,3 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
M << "There were no ghosts willing to take control."
message_admins("No ghosts were willing to take control of [key_name_admin(M)])")
return FALSE
//toggles the talk wheel
/mob/verb/toggle_talk_wheel()
set name = "talk-wheel"
set hidden = 1
if(isliving(src))
var/mob/living/L = src
if(L.hud_used)
for(var/obj/screen/wheel/talk/TW in L.hud_used.wheels)
TW.Click()
/mob/proc/is_flying(mob/M = src)
if(M.movement_type & FLYING)
return 1
else
return 0