From d0493ac471731a76f056f0870fdd40fb06214101 Mon Sep 17 00:00:00 2001 From: Artur Date: Sat, 14 Dec 2019 17:09:39 +0200 Subject: [PATCH] Reviewer and linter fixes, and veil tweak --- .../bloodsucker/bloodsucker_integration.dm | 4 ++-- .../bloodsucker/bloodsucker_powers.dm | 18 +++++++++--------- .../bloodsucker/datum_bloodsucker.dm | 7 ++++--- .../antagonists/bloodsucker/datum_vassal.dm | 3 +-- .../bloodsucker/items/bloodsucker_organs.dm | 11 +++-------- .../bloodsucker/objects/bloodsucker_crypt.dm | 4 ++-- .../antagonists/bloodsucker/powers/bs_veil.dm | 5 ----- code/modules/surgery/organs/heart.dm | 5 +++++ 8 files changed, 26 insertions(+), 31 deletions(-) diff --git a/code/modules/antagonists/bloodsucker/bloodsucker_integration.dm b/code/modules/antagonists/bloodsucker/bloodsucker_integration.dm index 3a2725cf91..bf4ae4b6b5 100644 --- a/code/modules/antagonists/bloodsucker/bloodsucker_integration.dm +++ b/code/modules/antagonists/bloodsucker/bloodsucker_integration.dm @@ -117,14 +117,14 @@ // Normal Creatures: if(!mind || !mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)) - return blood_volume < BLOOD_VOLUME_SAFE + return blood_volume < (BLOOD_VOLUME_SAFE * blood_ratio) var/datum/antagonist/bloodsucker/bloodsuckerdatum = mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER) if(bloodsuckerdatum.poweron_masquerade) return FALSE // If a Bloodsucker is malnourished, AND if his temperature matches his surroundings (aka he hasn't fed recently and looks COLD)... - return blood_volume < BLOOD_VOLUME_OKAY // && !(bodytemperature <= get_temperature() + 2) + return blood_volume < (BLOOD_VOLUME_OKAY * blood_ratio) // && !(bodytemperature <= get_temperature() + 2) /mob/living/carbon/human/ShowAsPaleExamine() // Check for albino, as per human/examine.dm's check. diff --git a/code/modules/antagonists/bloodsucker/bloodsucker_powers.dm b/code/modules/antagonists/bloodsucker/bloodsucker_powers.dm index 821df92a19..dffdeaf7fc 100644 --- a/code/modules/antagonists/bloodsucker/bloodsucker_powers.dm +++ b/code/modules/antagonists/bloodsucker/bloodsucker_powers.dm @@ -128,7 +128,7 @@ /datum/action/bloodsucker/proc/CheckCanDeactivate(display_error) return TRUE -/datum/action/bloodsucker/UpdateButtonIcon() +/datum/action/bloodsucker/UpdateButtonIcon(force = FALSE) background_icon_state = active? background_icon_state_on : background_icon_state_off ..()//UpdateButtonIcon() @@ -197,28 +197,28 @@ // Click power: Begin Aim /datum/action/bloodsucker/targeted/Trigger() - if (active && CheckCanDeactivate(TRUE)) + if(active && CheckCanDeactivate(TRUE)) DeactivateRangedAbility() DeactivatePower() return - if (!CheckCanPayCost(TRUE) || !CheckCanUse(TRUE)) + if(!CheckCanPayCost(TRUE) || !CheckCanUse(TRUE)) return active = !active UpdateButtonIcon() // Create & Link Targeting Proc var/mob/living/L = owner - if (L.ranged_ability) + if(L.ranged_ability) L.ranged_ability.remove_ranged_ability() bs_proc_holder.add_ranged_ability(L) - if (message_Trigger != "") + if(message_Trigger != "") to_chat(owner, "[message_Trigger]") /datum/action/bloodsucker/targeted/CheckCanUse(display_error) . = ..() if(!.) return - if (!owner.client) // <--- We don't allow non client usage so that using powers like mesmerize will FAIL if you try to use them as ghost. Why? because ranged_abvility in spell.dm + if(!owner.client) // <--- We don't allow non client usage so that using powers like mesmerize will FAIL if you try to use them as ghost. Why? because ranged_abvility in spell.dm return FALSE // doesn't let you remove powers if you're not there. So, let's just cancel the power entirely. return TRUE @@ -247,13 +247,13 @@ // Click Target /datum/action/bloodsucker/targeted/proc/ClickWithPower(atom/A) // CANCEL RANGED TARGET check - if (power_in_use || !CheckValidTarget(A)) + if(power_in_use || !CheckValidTarget(A)) return FALSE // Valid? (return true means DON'T cancel power!) - if (!CheckCanPayCost(TRUE) || !CheckCanUse(TRUE) || !CheckCanTarget(A, TRUE)) + if(!CheckCanPayCost(TRUE) || !CheckCanUse(TRUE) || !CheckCanTarget(A, TRUE)) return TRUE // Skip this part so we can return TRUE right away. - if (power_activates_immediately) + if(power_activates_immediately) PowerActivatedSuccessfully() // Mesmerize pays only after success. power_in_use = TRUE // Lock us into this ability until it successfully fires off. Otherwise, we pay the blood even if we fail. FireTargetedPower(A) // We use this instead of ActivatePower(), which has no input diff --git a/code/modules/antagonists/bloodsucker/datum_bloodsucker.dm b/code/modules/antagonists/bloodsucker/datum_bloodsucker.dm index ef59bfe7e0..febf53c324 100644 --- a/code/modules/antagonists/bloodsucker/datum_bloodsucker.dm +++ b/code/modules/antagonists/bloodsucker/datum_bloodsucker.dm @@ -103,7 +103,7 @@ "Sveyn","Aurel","Alexe","Iustin","Theodor","Dimitrie","Octav","Damien","Magnus","Caine","Abel", // Romanian/Ancient "Lucius","Gaius","Otho","Balbinus","Arcadius","Romanos","Alexios","Vitellius", // Latin "Melanthus","Teuthras","Orchamus","Amyntor","Axion", // Greek - "Thoth","Thutmose","Osorkon,","Nofret","Minmotu","Khafra" // Egyptian + "Thoth","Thutmose","Osorkon,","Nofret","Minmotu","Khafra", // Egyptian "Dio") else @@ -113,7 +113,7 @@ "Alcestis","Damaris","Elisavet","Khthonia","Teodora", // Greek "Nefret","Ankhesenpep") // Egyptian -/datum/antagonist/bloodsucker/proc/SelectTitle(am_fledgling = 0, forced=FALSE) +/datum/antagonist/bloodsucker/proc/SelectTitle(am_fledgling = 0, forced = FALSE) // Already have Title if (!forced && vamptitle != null) return @@ -181,6 +181,7 @@ // Powers BuyPower(new /datum/action/bloodsucker/feed) BuyPower(new /datum/action/bloodsucker/masquerade) + BuyPower(new /datum/action/bloodsucker/veil) // Traits for (var/T in defaultTraits) ADD_TRAIT(owner.current, T, "bloodsucker") @@ -334,7 +335,7 @@ datum/antagonist/bloodsucker/proc/SpendRank() // Assign True Reputation if(vamplevel == 4) - SelectReputation(am_fledgling=FALSE, forced=TRUE) + SelectReputation(am_fledgling = FALSE, forced = TRUE) to_chat(owner.current, "You are now a rank [vamplevel] Bloodsucker. Your strength, resistence, health, feed rate, regen rate, and maximum blood have all increased!") to_chat(owner.current, "Your existing powers have all ranked up as well!") update_hud(TRUE) diff --git a/code/modules/antagonists/bloodsucker/datum_vassal.dm b/code/modules/antagonists/bloodsucker/datum_vassal.dm index f582b882d8..71ee0bcc1d 100644 --- a/code/modules/antagonists/bloodsucker/datum_vassal.dm +++ b/code/modules/antagonists/bloodsucker/datum_vassal.dm @@ -62,9 +62,8 @@ flash_protect = -1 //These eyes are weaker to flashes, but let you see in the dark /datum/antagonist/vassal/proc/remove_thrall_eyes() - // Eyes var/obj/item/organ/eyes/E = new - E.Insert(owner.current) + E.Insert(owner.current) /datum/antagonist/vassal/on_removal() SSticker.mode.vassals -= owner // Add if not already in here (and you might be, if you were picked at round start) diff --git a/code/modules/antagonists/bloodsucker/items/bloodsucker_organs.dm b/code/modules/antagonists/bloodsucker/items/bloodsucker_organs.dm index 2664de0df5..5a905857c5 100644 --- a/code/modules/antagonists/bloodsucker/items/bloodsucker_organs.dm +++ b/code/modules/antagonists/bloodsucker/items/bloodsucker_organs.dm @@ -20,16 +20,11 @@ /datum/antagonist/bloodsucker/proc/RemoveVampOrgans() // Heart var/obj/item/organ/heart/H = new - H.Insert(owner.current) + H.Insert(owner.current) // Eyes var/obj/item/organ/eyes/E = new - E.Insert(owner.current) + E.Insert(owner.current) // HEART: OVERWRITE // - -/obj/item/organ/heart/proc/HeartStrengthMessage() - if (beating) - return "a healthy" - return "an unstable" // HEART // /obj/item/organ/heart/vampheart beating = 0 @@ -51,7 +46,7 @@ fakingit = 1 // We're pretending to beat, to fool people. /obj/item/organ/heart/vampheart/HeartStrengthMessage() - if (fakingit) + if(fakingit) return "a healthy" return "no" // Bloodsuckers don't have a heartbeat at all when stopped (default is "an unstable") // EYES // diff --git a/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm b/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm index 99a01fd218..f73912d0f5 100644 --- a/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm +++ b/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm @@ -196,7 +196,7 @@ ..() unbuckle_mob(M) -/obj/structure/bloodsucker/vassalrack/unbuckle_mob(mob/living/buckled_mob)//, force=FALSE) +/obj/structure/bloodsucker/vassalrack/unbuckle_mob(mob/living/buckled_mob, force = FALSE) if(!..()) return var/matrix/m180 = matrix(buckled_mob.transform) @@ -388,7 +388,7 @@ /* if(HAS_TRAIT(target, TRAIT_MINDSHIELD)) alert_text += "\n\nYou will no longer be loyal to the station!" if(SSticker.mode.AmValidAntag(target.mind)) */ - alert_text += "\n\nYou will not lose your current objectives, but they come second to the will of your new master!" + alert_text += "\n\nYou will not lose your current objectives, but they come second to the will of your new master!" switch(alert(target, alert_text,"THE HORRIBLE PAIN! WHEN WILL IT END?!","Yes, Master!", "NEVER!")) if("Yes, Master!") disloyalty_accept(target) diff --git a/code/modules/antagonists/bloodsucker/powers/bs_veil.dm b/code/modules/antagonists/bloodsucker/powers/bs_veil.dm index 02fb49a536..6db699d733 100644 --- a/code/modules/antagonists/bloodsucker/powers/bs_veil.dm +++ b/code/modules/antagonists/bloodsucker/powers/bs_veil.dm @@ -1,8 +1,4 @@ - - - - /datum/action/bloodsucker/veil name = "Veil of Many Faces" desc = "Disguise yourself in the illusion of another identity." @@ -169,7 +165,6 @@ /obj/effect/particle_effect/smoke/vampsmoke opaque = FALSE - amount = 0 lifetime = 0 /obj/effect/particle_effect/smoke/vampsmoke/fade_out(frames = 6) ..(frames) diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index 212605669d..5b74b58cd0 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -55,6 +55,11 @@ update_icon() return 1 +/obj/item/organ/heart/proc/HeartStrengthMessage() + if(beating) + return "a healthy" + return "an unstable" + /obj/item/organ/heart/prepare_eat() var/obj/S = ..() S.icon_state = "[icon_base]-off"