TG sync Sunday (#201)

* stage one

* datums and shit

* game stuff

* modules

* tgstation.dme

* tools

* these things for icons

* compiling fixes

* merge spree on TG

* other updates

* updated maps with deepfryers

* My helpers were not helping
This commit is contained in:
Poojawa
2017-02-06 00:36:56 -06:00
committed by GitHub
parent aeeca195c7
commit 73b6b33f79
279 changed files with 3548 additions and 2585 deletions
+1 -1
View File
@@ -180,7 +180,7 @@ Credit where due:
if(slot == "At your feet")
if(!S.forceMove(get_turf(L)))
qdel(S)
if(S && !qdeleted(S))
if(S && !QDELETED(S))
L << "<b>[slot] is a link to the halls of Reebe and your master. You may use it to perform many tasks, but also become oriented with the workings of Ratvar and how to best complete your \
tasks. This clockwork slab will be instrumental in your triumph. Remember: you can speak discreetly with your fellow servants by using the <span class='brass'>Hierophant Network</span> action button, \
and you can find a concise tutorial by using the slab in-hand and selecting Recollection.</b>"
@@ -47,7 +47,7 @@
return FALSE
/turf/open/floor/clockwork/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
if(locate(/obj/structure/table) in loc)
if(locate(/obj/structure/table) in src)
return FALSE
if(is_blocked_turf(src, TRUE))
user << "<span class='warning'>Something is in the way, preventing you from proselytizing [src] into a clockwork wall.</span>"
@@ -66,7 +66,12 @@ List of nuances:
#define REVERSE_RATVAR_HYPHEN_OF_REPLACEMENT " $1"
/proc/text2ratvar(text) //Takes english and applies ratvarian styling rules (and rot13) to it
/proc/text2ratvar(text) //Takes english and applies ratvarian styling rules (and rot13) to it.
var/ratvarian = add_ratvarian_regex(text) //run the regexes twice, so that you catch people translating it beforehand
ratvarian = rot13(ratvarian)
return add_ratvarian_regex(ratvarian)
/proc/add_ratvarian_regex(text)
var/ratvarian = replacetext(text, RATVAR_OF_MATCH, RATVAR_OF_REPLACEMENT)
ratvarian = replacetext(ratvarian, RATVAR_GUA_MATCH, RATVAR_GUA_REPLACEMENT)
ratvarian = replacetext(ratvarian, RATVAR_TH_MATCH, RATVAR_TH_REPLACEMENT)
@@ -76,19 +81,21 @@ List of nuances:
ratvarian = replacetext(ratvarian, RATVAR_PRE_AND_MATCH, RATVAR_PRE_AND_REPLACEMENT)
ratvarian = replacetext(ratvarian, RATVAR_POST_AND_MATCH, RATVAR_POST_AND_REPLACEMENT)
ratvarian = replacetext(ratvarian, RATVAR_TO_MATCH, RATVAR_TO_REPLACEMENT)
ratvarian = replacetext(ratvarian, RATVAR_MY_MATCH, RATVAR_MY_REPLACEMENT)
return rot13(ratvarian)
return replacetext(ratvarian, RATVAR_MY_MATCH, RATVAR_MY_REPLACEMENT)
/proc/ratvar2text(ratvarian) //Reverts ravarian styling and rot13 in text.
var/text = replacetext(rot13(ratvarian), "`", "")
text = replacetext(text, REVERSE_RATVAR_HYPHEN_GUA_MATCH, REVERSE_RATVAR_HYPHEN_GUA_REPLACEMENT)
var/text = remove_ratvarian_regex(ratvarian) //run the regexes twice, so that you catch people translating it beforehand
text = replacetext(rot13(text), "`", "")
return remove_ratvarian_regex(text)
/proc/remove_ratvarian_regex(ratvarian)
var/text = replacetext(ratvarian, REVERSE_RATVAR_HYPHEN_GUA_MATCH, REVERSE_RATVAR_HYPHEN_GUA_REPLACEMENT)
text = replacetext(text, REVERSE_RATVAR_HYPHEN_PRE_AND_MATCH, REVERSE_RATVAR_HYPHEN_PRE_AND_REPLACEMENT)
text = replacetext(text, REVERSE_RATVAR_HYPHEN_POST_AND_MATCH, REVERSE_RATVAR_HYPHEN_POST_AND_REPLACEMENT)
text = replacetext(text, REVERSE_RATVAR_HYPHEN_TO_MY_MATCH, REVERSE_RATVAR_HYPHEN_TO_MY_REPLACEMENT)
text = replacetext(text, REVERSE_RATVAR_HYPHEN_TE_MATCH, REVERSE_RATVAR_HYPHEN_TE_REPLACEMENT)
text = replacetext(text, REVERSE_RATVAR_HYPHEN_ET_MATCH, REVERSE_RATVAR_HYPHEN_ET_REPLACEMENT)
text = replacetext(text, REVERSE_RATVAR_HYPHEN_OF_MATCH, REVERSE_RATVAR_HYPHEN_OF_REPLACEMENT)
return text
return replacetext(text, REVERSE_RATVAR_HYPHEN_OF_MATCH, REVERSE_RATVAR_HYPHEN_OF_REPLACEMENT)
//Causes the mob or AM in question to speak a message; it assumes that the message is already translated to ratvar speech using text2ratvar()
/proc/clockwork_say(atom/movable/AM, message, whisper=FALSE)
@@ -148,7 +148,7 @@
var/obj/structure/destructible/clockwork/geis_binding/binding
/datum/clockwork_scripture/geis/Destroy()
if(binding && !qdeleted(binding))
if(binding && !QDELETED(binding))
qdel(binding)
return ..()
@@ -213,13 +213,12 @@
addtimer(CALLBACK(invoker, /atom/proc/update_atom_colour), flee_time+grace_period)
if(chant_number != chant_amount) //if this is the last chant, we don't have a movement period because the chant is over
var/endtime = world.time + flee_time
var/starttime = world.time
progbar = new(invoker, flee_time, invoker)
progbar.bar.color = list("#AF0AAF", "#AF0AAF", "#AF0AAF", rgb(0,0,0))
animate(progbar.bar, color = initial(progbar.bar.color), time = flee_time+grace_period)
while(world.time < endtime && can_recite())
sleep(1)
progbar.update(world.time - starttime)
progbar.update(endtime - world.time)
qdel(progbar)
if(can_recite())
sleep(grace_period)
@@ -29,7 +29,8 @@
return ..()
/obj/structure/destructible/clockwork/ratvar_act()
obj_integrity = max_integrity
if(ratvar_awakens || clockwork_gateway_activated)
obj_integrity = max_integrity
/obj/structure/destructible/clockwork/narsie_act()
if(take_damage(rand(25, 50), BRUTE) && src) //if we still exist
@@ -84,7 +84,7 @@
for(var/M in atoms_to_test)
var/atom/movable/A = M
if(!A || qdeleted(A) || A == target_apc)
if(!A || QDELETED(A) || A == target_apc)
continue
power_drained += Floor(A.power_drain(TRUE) * efficiency, MIN_CLOCKCULT_POWER)
@@ -14,9 +14,8 @@
debris = list(/obj/item/clockwork/alloy_shards/large = 1, \
/obj/item/clockwork/alloy_shards/small = 3, \
/obj/item/clockwork/component/geis_capacitor/antennae = 1)
var/mania_cost = 200
var/convert_attempt_cost = 500
var/convert_cost = 500
var/mania_cost = 150
var/convert_cost = 150
var/static/list/mania_messages = list("Go nuts.", "Take a crack at crazy.", "Make a bid for insanity.", "Get kooky.", "Move towards mania.", "Become bewildered.", "Wax wild.", \
"Go round the bend.", "Land in lunacy.", "Try dementia.", "Strive to get a screw loose.")
var/static/list/compel_messages = list("Come closer.", "Approach the transmitter.", "Touch the antennae.", "I always have to deal with idiots. Move towards the mania motor.", \
@@ -28,11 +27,10 @@
"Amazing. You somehow managed to wedge yourself somewhere you can't actually reach the motor from.", "Such a show of idiocy is unparalleled. Perhaps I should put you on display?", \
"Did you do this on purpose? I can't imagine you doing so accidentally. Oh, wait, I can.", "How is it that such smart creatures can still do something AS STUPID AS THIS!")
/obj/structure/destructible/clockwork/powered/mania_motor/examine(mob/user)
..()
if(is_servant_of_ratvar(user) || isobserver(user))
user << "<span class='sevtug_small'>It requires <b>[mania_cost]W</b> to run, and <b>[convert_attempt_cost + convert_cost]W</b> to convert humans adjecent to it.</span>"
user << "<span class='sevtug_small'>It requires <b>[mania_cost]W</b> to run, and at least <b>[convert_cost]W</b> to attempt to convert humans adjacent to it.</span>"
/obj/structure/destructible/clockwork/powered/mania_motor/forced_disable(bad_effects)
if(active)
@@ -58,94 +56,88 @@
SetLuminosity(0)
/obj/structure/destructible/clockwork/powered/mania_motor/process()
if(try_use_power(mania_cost))
var/turf/T = get_turf(src)
var/hum = get_sfx('sound/effects/screech.ogg') //like playsound, same sound for everyone affected
var/efficiency = get_efficiency_mod()
for(var/mob/living/carbon/human/H in view(1, src))
if(is_servant_of_ratvar(H) || H.null_rod_check())
continue
if(H.Adjacent(src) && try_use_power(convert_attempt_cost))
if(is_eligible_servant(H) && try_use_power(convert_cost))
H << "<span class='sevtug'>\"[text2ratvar("You are mine and his, now.")]\"</span>"
H.playsound_local(T, hum, 80, 1)
add_servant_of_ratvar(H)
H.Paralyse(5)
else if(!H.stat)
if(H.getBrainLoss() >= 100)
H.Paralyse(5)
H << "<span class='sevtug'>\"[text2ratvar(pick(convert_messages))]\"</span>"
else
H.adjustBrainLoss(100 * efficiency)
H.visible_message("<span class='warning'>[H] reaches out and touches [src].</span>", "<span class='sevtug'>You touch [src] involuntarily.</span>")
else
visible_message("<span class='warning'>[src]'s antennae fizzle quietly.</span>")
playsound(src, 'sound/effects/light_flicker.ogg', 50, 1)
for(var/mob/living/carbon/human/H in range(10, src))
if(is_servant_of_ratvar(H))
if(H.getBrainLoss() || H.hallucination || H.druggy || H.dizziness || H.confused)
H.adjustBrainLoss(-H.getBrainLoss()) //heals servants of braindamage, hallucination, druggy, dizziness, and confusion
H.hallucination = 0
H.adjust_drugginess(-H.druggy)
H.dizziness = 0
H.confused = 0
else if(!H.null_rod_check() && H.stat == CONSCIOUS)
var/distance = get_dist(T, get_turf(H))
var/falloff_distance = min((110) - distance * 10, 80)
var/sound_distance = falloff_distance * 0.5
var/targetbrainloss = H.getBrainLoss()
if(distance >= 4 && prob(falloff_distance * 0.5))
H << "<span class='sevtug_small'>\"[text2ratvar(pick(mania_messages))]\"</span>"
H.playsound_local(T, hum, sound_distance, 1)
switch(distance)
if(2 to 3)
if(prob(falloff_distance * 0.5))
if(prob(falloff_distance))
H << "<span class='sevtug_small'>\"[text2ratvar(pick(mania_messages))]\"</span>"
else
H << "<span class='sevtug'>\"[text2ratvar(pick(compel_messages))]\"</span>"
if(targetbrainloss <= 50)
H.adjustBrainLoss((50 * efficiency) - targetbrainloss) //got too close had brain eaten
H.adjust_drugginess(Clamp(7 * efficiency, 0, 100 - H.druggy))
H.hallucination = min(H.hallucination + (7 * efficiency), 100)
H.dizziness = min(H.dizziness + (3 * efficiency), 45)
H.confused = min(H.confused + (3 * efficiency), 45)
if(4 to 5)
if(targetbrainloss <= 50)
H.adjustBrainLoss(1 * efficiency)
H.adjust_drugginess(Clamp(5 * efficiency, 0, 80 - H.druggy))
H.hallucination = min(H.hallucination + (5 * efficiency), 80)
H.dizziness = min(H.dizziness + (2 * efficiency), 30)
H.confused = min(H.confused + (2 * efficiency), 30)
if(6 to 7)
if(targetbrainloss <= 30)
H.adjustBrainLoss(1 * efficiency)
H.adjust_drugginess(Clamp(2 * efficiency, 0, 60 - H.druggy))
H.hallucination = min(H.hallucination + (2 * efficiency), 60)
H.dizziness = min(H.dizziness + (2 * efficiency), 15)
H.confused = min(H.confused + (2 * efficiency), 15)
if(8 to 9)
if(targetbrainloss <= 10)
H.adjustBrainLoss(1 * efficiency)
H.adjust_drugginess(Clamp(2 * efficiency, 0, 40 - H.druggy))
H.hallucination = min(H.hallucination + (2 * efficiency), 40)
if(10 to INFINITY)
H.adjust_drugginess(Clamp(2 * efficiency, 0, 20 - H.druggy))
H.hallucination = min(H.hallucination + (2 * efficiency), 20)
else //if it's a distance of 1 and they can't see it/aren't adjacent or they're on top of it(how'd they get on top of it and still trigger this???)
if(prob(falloff_distance * 0.5))
if(prob(falloff_distance))
H << "<span class='sevtug'>\"[text2ratvar(pick(compel_messages))]\"</span>"
else if(prob(falloff_distance * 0.5))
H << "<span class='sevtug'>\"[text2ratvar(pick(close_messages))]\"</span>"
else
H << "<span class='sevtug_small'>\"[text2ratvar(pick(mania_messages))]\"</span>"
if(targetbrainloss <= 99)
H.adjustBrainLoss((99 * efficiency) - targetbrainloss)
H.adjust_drugginess(Clamp(10 * efficiency, 0, 150 - H.druggy))
H.hallucination = min(H.hallucination + (10 * efficiency), 150)
H.dizziness = min(H.dizziness + (5 * efficiency), 60)
H.confused = min(H.confused + (5 * efficiency), 60)
else
if(!try_use_power(mania_cost))
forced_disable(FALSE)
return
var/turf/T = get_turf(src)
var/hum = get_sfx('sound/effects/screech.ogg') //like playsound, same sound for everyone affected
var/efficiency = get_efficiency_mod()
for(var/mob/living/carbon/human/H in view(1, src))
if(is_servant_of_ratvar(H) || H.null_rod_check() || H.stat == DEAD)
continue
if(!H.Adjacent(src))
H << "<span class='sevtug'>\"[text2ratvar(pick(close_messages))]\"</span>"
continue
if(try_use_power(convert_cost))
H.playsound_local(T, hum, 80, 1)
if(!H.stat)
if(H.getBrainLoss() < 100)
H.adjustBrainLoss(30 * efficiency)
H.visible_message("<span class='warning'>[H] reaches out and touches [src].</span>", "<span class='sevtug'>You touch [src] involuntarily.</span>")
else
H.Paralyse(3)
else if(is_eligible_servant(H))
H << "<span class='sevtug'>\"[text2ratvar("You are mine and his, now.")]\"</span>"
add_servant_of_ratvar(H)
H.Paralyse(5)
else
H << "<span class='sevtug'>\"[text2ratvar(pick(convert_messages))]\"</span>"
else
visible_message("<span class='warning'>[src]'s antennae fizzle quietly.</span>")
playsound(src, 'sound/effects/light_flicker.ogg', 50, 1)
for(var/mob/living/carbon/human/H in range(10, src))
if(is_servant_of_ratvar(H)) //heals servants of braindamage, hallucination, druggy, dizziness, and confusion
var/brainloss = H.getBrainLoss()
if(brainloss)
H.adjustBrainLoss(-brainloss)
if(H.hallucination)
H.hallucination = 0
if(H.druggy)
H.adjust_drugginess(-H.druggy)
if(H.dizziness)
H.dizziness = 0
if(H.confused)
H.confused = 0
else if(!H.null_rod_check() && H.stat == CONSCIOUS)
var/distance = 0 + get_dist(T, get_turf(H))
var/falloff_distance = min((110) - distance * 10, 80)
var/sound_distance = falloff_distance * 0.5
var/targetbrainloss = H.getBrainLoss()
if(distance >= 4 && prob(falloff_distance * 0.5))
H << "<span class='sevtug_small'>\"[text2ratvar(pick(mania_messages))]\"</span>"
H.playsound_local(T, hum, sound_distance, 1)
switch(distance)
if(0 to 3)
if(prob(falloff_distance * 0.5))
if(prob(falloff_distance))
H << "<span class='sevtug_small'>\"[text2ratvar(pick(mania_messages))]\"</span>"
else
H << "<span class='sevtug'>\"[text2ratvar(pick(compel_messages))]\"</span>"
if(targetbrainloss <= 50)
H.adjustBrainLoss((50 * efficiency) - targetbrainloss) //got too close had brain eaten
H.adjust_drugginess(Clamp(7 * efficiency, 0, 100 - H.druggy))
H.hallucination = min(H.hallucination + (7 * efficiency), 100)
H.dizziness = min(H.dizziness + (3 * efficiency), 45)
H.confused = min(H.confused + (3 * efficiency), 45)
if(4 to 5)
if(targetbrainloss <= 50)
H.adjustBrainLoss(1 * efficiency)
H.adjust_drugginess(Clamp(5 * efficiency, 0, 80 - H.druggy))
H.hallucination = min(H.hallucination + (5 * efficiency), 80)
H.dizziness = min(H.dizziness + (2 * efficiency), 30)
H.confused = min(H.confused + (2 * efficiency), 30)
if(6 to 7)
if(targetbrainloss <= 30)
H.adjustBrainLoss(1 * efficiency)
H.adjust_drugginess(Clamp(2 * efficiency, 0, 60 - H.druggy))
H.hallucination = min(H.hallucination + (2 * efficiency), 60)
H.dizziness = min(H.dizziness + (2 * efficiency), 15)
H.confused = min(H.confused + (2 * efficiency), 15)
if(8 to 9)
if(targetbrainloss <= 10)
H.adjustBrainLoss(1 * efficiency)
H.adjust_drugginess(Clamp(2 * efficiency, 0, 40 - H.druggy))
H.hallucination = min(H.hallucination + (2 * efficiency), 40)
if(10 to INFINITY)
H.adjust_drugginess(Clamp(2 * efficiency, 0, 20 - H.druggy))
H.hallucination = min(H.hallucination + (2 * efficiency), 20)