Revert "Merge branch 'master' into eye-sprites"

This reverts commit b48f4b91e6, reversing
changes made to dc70d17a1e.
This commit is contained in:
Timothy Teakettle
2020-10-11 16:54:05 +01:00
parent b650fa1761
commit d3a042deaa
20 changed files with 93 additions and 161 deletions
@@ -274,17 +274,7 @@
\"steps out\" of [H.p_them()].</span>",
"<span class='notice'>...and after a moment of disorentation, \
you're besides yourself!</span>")
if(H != spare && isslimeperson(spare) && isslimeperson(H))
// transfer the swap-body ui if it's open
var/datum/action/innate/swap_body/this_swap = origin_datum.swap_body
var/datum/action/innate/swap_body/other_swap = spare_datum.swap_body
var/datum/tgui/ui = SStgui.get_open_ui(H, this_swap, "main") || SStgui.get_open_ui(spare, this_swap, "main")
if(ui)
SStgui.on_close(ui) // basically removes it from lists is all this proc does.
ui.user = spare
ui.src_object = other_swap
SStgui.on_open(ui) // stick it back on the lists
ui.process(force = TRUE)
/datum/action/innate/swap_body
name = "Swap Body"
@@ -337,8 +327,6 @@
stat = "Conscious"
if(UNCONSCIOUS)
stat = "Unconscious"
if(SOFT_CRIT)
stat = "Barely Conscious"
if(DEAD)
stat = "Dead"
var/occupied
@@ -385,6 +373,7 @@
var/mob/living/carbon/human/selected = locate(params["ref"]) in SS.bodies
if(!can_swap(selected))
return
SStgui.close_uis(src)
swap_to_dupe(H.mind, selected)
/datum/action/innate/swap_body/proc/can_swap(mob/living/carbon/human/dupe)
@@ -418,7 +407,6 @@
/datum/action/innate/swap_body/proc/swap_to_dupe(datum/mind/M, mob/living/carbon/human/dupe)
if(!can_swap(dupe)) //sanity check
return
var/mob/living/carbon/human/old = M.current
if(M.current.stat == CONSCIOUS)
M.current.visible_message("<span class='notice'>[M.current] \
stops moving and starts staring vacantly into space.</span>",
@@ -430,20 +418,7 @@
dupe.visible_message("<span class='notice'>[dupe] blinks and looks \
around.</span>",
"<span class='notice'>...and move this one instead.</span>")
if(old != M.current && dupe == M.current && isslimeperson(dupe))
var/datum/species/jelly/slime/other_spec = dupe.dna.species
var/datum/action/innate/swap_body/other_swap = other_spec.swap_body
// theoretically the transfer_to proc is supposed to transfer the ui from the mob.
// so I try to get the UI from one of the two mobs and schlump it over to the new action button
var/datum/tgui/ui = SStgui.get_open_ui(old, src, "main") || SStgui.get_open_ui(dupe, src, "main")
if(ui)
// transfer the UI over. This code is slightly hacky but it fixes the problem
// I'd use SStgui.on_transfer but that doesn't let you transfer the src_object as well s
SStgui.on_close(ui) // basically removes it from lists is all this proc does.
ui.user = dupe
ui.src_object = other_swap
SStgui.on_open(ui) // stick it back on the lists
ui.process(force = TRUE)
////////////////////////////////////////////////////////Round Start Slimes///////////////////////////////////////////////////////////////////
@@ -491,7 +466,7 @@
var/new_color = input(owner, "Choose your skin color:", "Race change","#"+H.dna.features["mcolor"]) as color|null
if(new_color)
var/temp_hsv = RGBtoHSV(new_color)
if(ReadHSV(temp_hsv)[3] >= ReadHSV(MINIMUM_MUTANT_COLOR)[3]) // mutantcolors must be bright
if(ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright
H.dna.features["mcolor"] = sanitize_hexcolor(new_color, 6)
H.update_body()
H.update_hair()
@@ -244,14 +244,7 @@
if((return_list[BLOCK_RETURN_MITIGATION_PERCENT] >= 100) || (damage <= 0))
. |= BLOCK_SUCCESS
var/list/effect_text
var/pacifist_counter_check = TRUE
if(HAS_TRAIT(src, TRAIT_PACIFISM))
switch(parrying)
if(ITEM_PARRY)
pacifist_counter_check = (!active_parry_item.force || active_parry_item.damtype == STAMINA)
else
pacifist_counter_check = FALSE //Both martial and unarmed counter attacks generally are harmful, so no need to have the same line twice.
if(efficiency >= data.parry_efficiency_to_counterattack && pacifist_counter_check)
if(efficiency >= data.parry_efficiency_to_counterattack)
effect_text = run_parry_countereffects(object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, return_list, efficiency)
if(data.parry_flags & PARRY_DEFAULT_HANDLE_FEEDBACK)
handle_parry_feedback(object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, return_list, efficiency, effect_text)
+1
View File
@@ -491,6 +491,7 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
client.prefs.chat_toggles ^= CHAT_OOC
if (!(client.prefs.chat_toggles & CHAT_OOC) && isdead(new_mob))
client.prefs.chat_toggles ^= CHAT_OOC
client.change_view(CONFIG_GET(string/default_view))
new_mob.ckey = ckey
if(send_signal)
SEND_SIGNAL(src, COMSIG_MOB_KEY_CHANGE, new_mob, src)