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
+81 -100
View File
@@ -72,9 +72,6 @@
var/forceProcess = 0
var/processTime = 8
var/lastProc = 0
var/walkdebug = 0 //causes sparks in our path target. used for debugging
var/debugexamine = 0 //If we show debug info in our examine
var/showexaminetext = 1 //If we show our telltale examine text
var/list/knownStrings = list()
@@ -139,14 +136,13 @@
retal = 1
retal_target = user
/mob/living/carbon/human/interactive/bullet_act(obj/item/projectile/P, def_zone)
/mob/living/carbon/human/interactive/bullet_act(var/obj/item/projectile/P)
var/potentialAssault = locate(/mob/living) in view(2,P.starting)
if(potentialAssault)
retal = 1
retal_target = potentialAssault
..()
/client/proc/resetSNPC(var/mob/A in SSnpc.botPool_l)
set name = "Reset SNPC"
set desc = "Reset the SNPC"
@@ -299,9 +295,11 @@
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
if(prob((FUZZY_CHANCE_LOW+FUZZY_CHANCE_HIGH)/4))
BP.change_bodypart_status(BODYPART_ROBOTIC)
BP.change_bodypart_status(ORGAN_ROBOTIC)
update_icons()
update_damage_overlays()
update_damage_overlays(0)
hand = 0
functions = list("nearbyscan","combat","shitcurity","chatter") // stop customize adding multiple copies of a function
//job specific favours
switch(myjob.title)
@@ -376,8 +374,8 @@
var/datum/objective_item/steal/S = new A
traitorTarget = locate(S.targetitem) in world
if(SNPC_MARTYR) // MY LIFE FOR SPESZUL
var/targetType = pick(/obj/machinery/gravity_generator/main/station,/obj/machinery/power/smes/engineering,/obj/machinery/telecomms/hub)
traitorTarget = locate(targetType) in machines
var/targetType = pick(/obj/structure/particle_accelerator,/obj/machinery/gravity_generator/main,/obj/machinery/power/smes)
traitorTarget = locate(targetType) in world
if(SNPC_PSYCHO) // YOU'RE LIKE A FLESH BICYLE AND I WANT TO DISMANTLE YOU
traitorTarget = null
@@ -411,9 +409,9 @@
var/mob/living/carbon/human/M = target
if(target)
if(health > 0)
if(M.a_intent == INTENT_HELP)
if(M.a_intent == "help")
chatter()
if(M.a_intent == INTENT_HARM)
if(M.a_intent == "harm")
retal = 1
retal_target = target
@@ -425,6 +423,10 @@
if(C)
retalTarget(C)
/mob/living/carbon/human/interactive/bullet_act(obj/item/projectile/P, def_zone)
..(P,def_zone)
retalTarget(P.firer)
/mob/living/carbon/human/interactive/attack_hand(mob/living/carbon/human/M)
..(M)
retalTarget(M)
@@ -488,35 +490,28 @@
if(other_hand)
if(other_hand.loc != src)
other_hand = null
var/obj/item/L = get_item_for_held_index(1) //just going to hardcode SNPCs to 2 hands, for now.
var/obj/item/R = get_item_for_held_index(2) //they're just VERY assume-y about 2 hands.
if(active_hand_index == 1)
if(!L)
if(hand)
if(!l_hand)
main_hand = null
if(R)
if(r_hand)
swap_hands()
else
if(!R)
if(!r_hand)
main_hand = null
if(L)
if(l_hand)
swap_hands()
/mob/living/carbon/human/interactive/proc/swap_hands()
var/oindex = active_hand_index
if(active_hand_index == 1)
active_hand_index = 2
else
active_hand_index = 1
main_hand = get_active_held_item()
other_hand = get_item_for_held_index(oindex)
hand = !hand
var/obj/item/T = other_hand
main_hand = other_hand
other_hand = T
update_hands = 1
/mob/living/carbon/human/interactive/proc/take_to_slot(obj/item/G, var/hands=0)
var/list/slots = list ("left pocket" = slot_l_store,"right pocket" = slot_r_store,"left hand" = slot_hands,"right hand" = slot_hands)
var/list/slots = list ("left pocket" = slot_l_store,"right pocket" = slot_r_store,"left hand" = slot_l_hand,"right hand" = slot_r_hand)
if(hands)
slots = list ("left hand" = slot_hands,"right hand" = slot_hands)
slots = list ("left hand" = slot_l_hand,"right hand" = slot_r_hand)
G.loc = src
if(G.force && G.force > best_force)
best_force = G.force
@@ -524,7 +519,7 @@
update_hands = 1
/mob/living/carbon/human/interactive/proc/insert_into_backpack()
var/list/slots = list ("left pocket" = slot_l_store,"right pocket" = slot_r_store,"left hand" = slot_hands,"right hand" = slot_hands)
var/list/slots = list ("left pocket" = slot_l_store,"right pocket" = slot_r_store,"left hand" = slot_l_hand,"right hand" = slot_r_hand)
var/obj/item/I = get_item_by_slot(pick(slots))
var/obj/item/weapon/storage/BP = get_item_by_slot(slot_back)
if(back && BP && I)
@@ -608,16 +603,14 @@
D.open()
if(update_hands)
var/obj/item/l_hand = get_item_for_held_index(1)
var/obj/item/r_hand = get_item_for_held_index(2)
if(l_hand || r_hand)
if(l_hand)
active_hand_index = 1
hand = 1
main_hand = l_hand
if(r_hand)
other_hand = r_hand
else if(r_hand)
active_hand_index = 2
hand = 0
main_hand = r_hand
if(l_hand) //this technically shouldnt occur, but its a redundancy
other_hand = l_hand
@@ -626,7 +619,7 @@
if(pulledby)
if(Adjacent(pulledby))
a_intent = INTENT_DISARM
a_intent = "disarm"
pulledby.attack_hand(src)
inactivity_period = 10
@@ -665,12 +658,12 @@
if(istype(TARGET, /obj/item/weapon))
var/obj/item/weapon/W = TARGET
if(W.force >= best_force || prob((FUZZY_CHANCE_LOW+FUZZY_CHANCE_HIGH)/2))
if(!get_item_for_held_index(1) || !get_item_for_held_index(2))
if(!l_hand || !r_hand)
put_in_hands(W)
else
insert_into_backpack()
else
if(!get_item_for_held_index(1) || !get_item_for_held_index(2))
if(!l_hand || !r_hand)
put_in_hands(TARGET)
else
insert_into_backpack()
@@ -760,8 +753,8 @@
spawn(0)
call(src,Proc)(src)
/mob/living/carbon/human/interactive/proc/tryWalk(turf/inTarget, override = 0)
if(restrictedJob && !override) // we're a job that has to stay in our home
/mob/living/carbon/human/interactive/proc/tryWalk(turf/inTarget)
if(restrictedJob) // we're a job that has to stay in our home
if(!(get_turf(inTarget) in get_area_turfs(job2area(myjob))))
TARGET = null
return
@@ -803,13 +796,6 @@
if(!target)
return 0
if(walkdebug)
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(5, 0, target)
spark_system.attach(target)
spark_system.start()
if(myPath.len <= 0)
myPath = get_path_to(src, get_turf(target), /turf/proc/Distance, MAX_RANGE_FIND + 1, 250,1, id=Path_ID)
@@ -1079,27 +1065,27 @@
if(change)
HP.attackby(internalBeaker,src)
var/obj/item/weapon/reagent_containers/food/snacks/grown/GF = locate(/obj/item/weapon/reagent_containers/food/snacks/grown) in view(12,src)
if(GF)
if(!Adjacent(GF))
tryWalk(get_turf(GF))
else
GF.attackby(internalBag,src)
var/obj/item/weapon/reagent_containers/food/snacks/grown/GF = locate(/obj/item/weapon/reagent_containers/food/snacks/grown) in view(12,src)
if(GF)
if(!Adjacent(GF))
tryWalk(get_turf(GF))
else
GF.attackby(internalBag,src)
if(internalBag.contents.len > 0)
var/obj/machinery/smartfridge/SF = locate(/obj/machinery/smartfridge) in range(12,src)
if(!Adjacent(SF))
tryWalk(get_turf(SF), 1)
else
customEmote("[src] [pick("gibbers","drools","slobbers","claps wildly","spits")], upending the [internalBag]'s contents all over the [SF]!")
//smartfridges call updateUsrDialog when you call attackby, so we're going to have to cheese-magic-space this
for(var/obj/toLoad in internalBag.contents)
if(contents.len >= SF.max_n_of_items)
break
if(SF.accept_check(toLoad))
SF.load(toLoad)
else
qdel(toLoad) // destroy everything we dont need
if(internalBag.contents.len > 0)
var/obj/machinery/smartfridge/SF = locate(/obj/machinery/smartfridge) in range(12,src)
if(!Adjacent(SF))
tryWalk(get_turf(SF))
else
customEmote("[src] [pick("gibbers","drools","slobbers","claps wildly","spits")], upending the [internalBag]'s contents all over the [SF]!")
//smartfridges call updateUsrDialog when you call attackby, so we're going to have to cheese-magic-space this
for(var/obj/toLoad in internalBag.contents)
if(contents.len >= SF.max_n_of_items)
break
if(SF.accept_check(toLoad))
SF.load(toLoad)
else
qdel(toLoad) // destroy everything we dont need
/mob/living/carbon/human/interactive/proc/bartend(obj)
if(shouldModulePass())
@@ -1158,11 +1144,11 @@
var/mob/living/carbon/human/clownTarget
var/list/clownPriority = list()
var/obj/item/weapon/reagent_containers/spray/S = locate(/obj/item/weapon/reagent_containers/spray) in allContents
if(!S)
S = new/obj/item/weapon/reagent_containers/spray(src)
S.amount_per_transfer_from_this = 10
var/obj/item/weapon/reagent_containers/spray/S
if(!locate(/obj/item/weapon/reagent_containers/spray) in allContents)
new/obj/item/weapon/reagent_containers/spray(src)
else
S = locate(/obj/item/weapon/reagent_containers/spray) in allContents
for(var/mob/living/carbon/human/C in rangeCheck)
var/pranksNearby = 100
@@ -1225,25 +1211,27 @@
if(shouldTryHeal == 1)
for(var/mob/living/carbon/human/C in nearby)
if(C.health <= 75)
if(get_dist(src,C) <= 2)
src.say("Wait, [C], let me heal you!")
M.attack(C,src)
sleep(25)
else
tryWalk(get_turf(C))
if(istype(C,/mob/living/carbon/human)) //I haven't the foggiest clue why this is turning up non-carbons but sure here whatever
if(C.health <= 75)
if(get_dist(src,C) <= 2)
src.say("Wait, [C], let me heal you!")
M.attack(C,src)
sleep(25)
else
tryWalk(get_turf(C))
else if(shouldTryHeal == 2)
if(HPS)
if(HPS.reagents.total_volume <= 0)
HPS.reagents.add_reagent("tricordrazine",30)
for(var/mob/living/carbon/human/C in nearby)
if(C.health <= 75 && C.reagents.get_reagent_amount("tricordrazine") <= 0) // make sure they wont be overdosing
if(get_dist(src,C) <= 2)
src.say("Wait, [C], let me heal you!")
HPS.attack(C,src)
sleep(25)
else
tryWalk(get_turf(C))
if(istype(C,/mob/living/carbon/human))
if(C.health <= 75 && C.reagents.get_reagent_amount("tricordrazine") <= 0) // make sure they wont be overdosing
if(get_dist(src,C) <= 2)
src.say("Wait, [C], let me heal you!")
HPS.attack(C,src)
sleep(25)
else
tryWalk(get_turf(C))
/mob/living/carbon/human/interactive/proc/dojanitor(obj)
@@ -1272,7 +1260,8 @@
sleep(25)
/mob/living/carbon/human/interactive/proc/customEmote(var/text)
visible_message("<span class='notice'>[text]</span>")
for(var/mob/living/carbon/M in view(src))
M.show_message("<span class='notice'>[text]</span>", 2)
// START COOKING MODULE
/mob/living/carbon/human/interactive/proc/cookingwithmagic(var/obj/item/weapon/reagent_containers/food/snacks/target)
@@ -1329,7 +1318,7 @@
if(SF)
if(SF.contents.len > 0)
if(!Adjacent(SF))
tryWalk(get_turf(SF),1)
tryWalk(get_turf(SF))
else
customEmote("[src] [pick("gibbers","drools","slobbers","claps wildly","spits")], grabbing various foodstuffs from [SF] and sticking them in it's mouth!")
for(var/obj/item/A in SF.contents)
@@ -1469,7 +1458,7 @@
if(canmove)
if((graytide || (TRAITS & TRAIT_MEAN)) || retal)
interest += targetInterestShift
a_intent = INTENT_HARM
a_intent = "harm"
zone_selected = pick("chest","r_leg","l_leg","r_arm","l_arm","head")
doing |= FIGHTING
if(retal)
@@ -1520,7 +1509,7 @@
if((TARGET && (doing & FIGHTING))) // this is a redundancy check
var/mob/living/M = TARGET
if(isliving(M))
if(istype(M,/mob/living))
if(M.health > 1)
//THROWING OBJECTS
for(var/A in allContents)
@@ -1547,8 +1536,8 @@
if(istype(main_hand,/obj/item/weapon/gun))
var/obj/item/weapon/gun/G = main_hand
if(G.can_trigger_gun(src))
if(istype(main_hand,/obj/item/weapon/gun/ballistic))
var/obj/item/weapon/gun/ballistic/P = main_hand
if(istype(main_hand,/obj/item/weapon/gun/projectile))
var/obj/item/weapon/gun/projectile/P = main_hand
if(!P.chambered)
P.chamber_round()
P.update_icon()
@@ -1589,7 +1578,7 @@
tryWalk(TARGET)
else
if(Adjacent(TARGET))
a_intent = pick(INTENT_DISARM, INTENT_HARM)
a_intent = pick("disarm","harm")
M.attack_hand(src)
timeout++
else if(timeout >= 10 || !(targetRange(M) > 14))
@@ -1633,11 +1622,3 @@
faction += "bot_grey"
graytide = 1
..()
//Walk softly and carry a big stick
/mob/living/carbon/human/interactive/robust/New()
TRAITS |= TRAIT_FRIENDLY
TRAITS |= TRAIT_ROBUST
TRAITS |= TRAIT_SMART
faction += "bot_power"
..()