From e0a2497516cafd83f1c2cd0cd6e1197b5b4802fb Mon Sep 17 00:00:00 2001 From: Chiemi <80381079+scionalu@users.noreply.github.com> Date: Wed, 11 Oct 2023 21:28:30 +0700 Subject: [PATCH] exz --- .../ego_weapons/non_abnormality/_charge.dm | 6 +++--- .../items/ego_weapons/non_abnormality/cane.dm | 2 +- .../non_abnormality/rosespanner.dm | 6 +++--- .../ego_weapons/non_abnormality/wcorp.dm | 10 +++++----- .../items/ego_weapons/subtype/charge.dm | 20 +++++++++---------- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/code/game/objects/items/ego_weapons/non_abnormality/_charge.dm b/code/game/objects/items/ego_weapons/non_abnormality/_charge.dm index 90ad3ccaaae9..c0c757c50f29 100644 --- a/code/game/objects/items/ego_weapons/non_abnormality/_charge.dm +++ b/code/game/objects/items/ego_weapons/non_abnormality/_charge.dm @@ -10,9 +10,9 @@ . += "Spend [charge]/[charge_cost] charge to [charge_effect]" /obj/item/ego_weapon/city/charge/attack(mob/living/target, mob/living/user) - ..() - if(!CanUseEgo(user)) - return + . = ..() + if(!.) + return FALSE if(charge<20 && target.stat != DEAD) charge+=1 diff --git a/code/game/objects/items/ego_weapons/non_abnormality/cane.dm b/code/game/objects/items/ego_weapons/non_abnormality/cane.dm index 95108dbeb246..4b052f5638d4 100644 --- a/code/game/objects/items/ego_weapons/non_abnormality/cane.dm +++ b/code/game/objects/items/ego_weapons/non_abnormality/cane.dm @@ -21,7 +21,7 @@ /obj/item/ego_weapon/city/charge/cane/attack_self(mob/user) ..() if(!CanUseEgo(user)) - return + return FALSE if(charge>=charge_cost) var/target //Didn't even need new var, could literally put anything for first arg, but for consistency sake and less confusion release_charge(target, user) diff --git a/code/game/objects/items/ego_weapons/non_abnormality/rosespanner.dm b/code/game/objects/items/ego_weapons/non_abnormality/rosespanner.dm index 98129560361a..f4d0cde9b253 100644 --- a/code/game/objects/items/ego_weapons/non_abnormality/rosespanner.dm +++ b/code/game/objects/items/ego_weapons/non_abnormality/rosespanner.dm @@ -38,9 +38,9 @@ qdel(I) /obj/item/ego_weapon/city/charge/rosespanner/attack(mob/living/target, mob/living/user) - ..() - if(!CanUseEgo(user)) - return + . = ..() + if(!.) + return FALSE if(charge == 20) overcharged = TRUE activated = TRUE diff --git a/code/game/objects/items/ego_weapons/non_abnormality/wcorp.dm b/code/game/objects/items/ego_weapons/non_abnormality/wcorp.dm index 27cfcf0e84db..f7aaa7aa9a9d 100644 --- a/code/game/objects/items/ego_weapons/non_abnormality/wcorp.dm +++ b/code/game/objects/items/ego_weapons/non_abnormality/wcorp.dm @@ -22,9 +22,9 @@ to_chat(user, "You don't have enough charge.") /obj/item/ego_weapon/city/charge/wcorp/attack(mob/living/target, mob/living/user) - ..() - if(!CanUseEgo(user)) - return + . = ..() + if(!.) + return FALSE if(activated) release_charge(target, user) activated = FALSE @@ -307,9 +307,9 @@ attack_speed = 1.5 /obj/item/ego_weapon/city/charge/wcorp/shield/club/attack(mob/living/target, mob/living/user) - if(!CanUseEgo(user)) - return . = ..() + if(!.) + return FALSE var/atom/throw_target = get_edge_target_turf(target, user.dir) if(!target.anchored) var/whack_speed = (prob(60) ? 1 : 4) diff --git a/code/game/objects/items/ego_weapons/subtype/charge.dm b/code/game/objects/items/ego_weapons/subtype/charge.dm index b76a09806be2..948eddfba882 100644 --- a/code/game/objects/items/ego_weapons/subtype/charge.dm +++ b/code/game/objects/items/ego_weapons/subtype/charge.dm @@ -10,11 +10,11 @@ . += "Spend [charge]/[charge_cost] charge to [charge_effect]" /obj/item/ego_weapon/charge/attack(mob/living/target, mob/living/user) - ..() - if(!CanUseEgo(user)) - return + . = ..() + if(!.) + return FALSE if((target.stat == DEAD) || (GODMODE in target.status_flags))//if the target is dead or godmode - return + return FALSE if(charge<20) charge+=1 @@ -40,9 +40,9 @@ to_chat(user, "You don't have enough charge.") /obj/item/ego_weapon/charge/onattack/attack(mob/living/target, mob/living/user) - ..() - if(!CanUseEgo(user)) - return + . = ..() + if(!.) + return FALSE if(activated) charge -= charge_cost to_chat(user, "[release_message].") @@ -52,9 +52,9 @@ //On use Subtype /obj/item/ego_weapon/charge/onuse/attack_self(mob/user) - ..() - if(!CanUseEgo(user)) - return + . = ..() + if(!.) + return FALSE if(charge>=charge_cost) charge -= charge_cost to_chat(user, "[release_message].")