Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaces ". = ..()" parent calls with "return ..()" where applicable without changing surrounding code. Forces some abnormality procs to be called by children #1527

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
var/list/dummy_chems = list(/datum/reagent/abnormality/nutrition, /datum/reagent/abnormality/cleanliness, /datum/reagent/abnormality/consensus, /datum/reagent/abnormality/amusement, /datum/reagent/abnormality/violence)

/mob/living/simple_animal/hostile/abnormality/Initialize(mapload)
SHOULD_CALL_PARENT(TRUE)
. = ..()
if(!(type in GLOB.cached_abno_work_rates))
GLOB.cached_abno_work_rates[type] = work_chances.Copy()
Expand Down Expand Up @@ -114,6 +115,7 @@
gift_message += "\nYou are granted a gift by [src]!"

/mob/living/simple_animal/hostile/abnormality/Destroy()
SHOULD_CALL_PARENT(TRUE)
if(istype(datum_reference)) // Respawn the mob on death
datum_reference.current = null
addtimer(CALLBACK (datum_reference, .datum/abnormality/proc/RespawnAbno), 30 SECONDS)
Expand Down Expand Up @@ -142,6 +144,7 @@
..()

/mob/living/simple_animal/hostile/abnormality/Life()
SHOULD_CALL_PARENT(TRUE)
. = ..()
if(!.) // Dead
return FALSE
Expand Down Expand Up @@ -274,6 +277,7 @@

// Called by datum_reference when work is done
/mob/living/simple_animal/hostile/abnormality/proc/WorkComplete(mob/living/carbon/human/user, work_type, pe, work_time, canceled)
SHOULD_CALL_PARENT(TRUE)
if(pe >= datum_reference.success_boxes)
SuccessEffect(user, work_type, pe, work_time, canceled)
else if(pe >= datum_reference.neutral_boxes)
Expand Down Expand Up @@ -302,6 +306,7 @@

// Giving an EGO gift to the user after work is complete
/mob/living/simple_animal/hostile/abnormality/proc/GiftUser(mob/living/carbon/human/user, pe, chance = gift_chance)
SHOULD_CALL_PARENT(TRUE)
if(!istype(user) || isnull(gift_type))
return FALSE
if(istype(user.ego_gift_list[initial(gift_type.slot)], gift_type)) // If we already have same gift - don't run the checks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ GLOBAL_LIST_INIT(unspawned_tools, list(
icon_state = "x4"

/obj/effect/landmark/toolspawn/Initialize()
SHOULD_CALL_PARENT(TRUE)
..()
if(!LAZYLEN(GLOB.unspawned_tools)) // You shouldn't ever need this but I mean go on I guess
return INITIALIZE_HINT_QDEL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
return FALSE
if(awakened_buddy)
awakened_buddy.LoseTarget()
. = ..()
return ..()

/mob/living/simple_animal/hostile/abnormality/blue_shepherd/stop_pulling()
if(pulling == awakened_buddy) //it's tempting to make player controlled shepherd pull you forever but I'll hold off on it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
chance = 100
chance_modifier = 1
depressed = FALSE
. = ..(user, pe, chance)
return ..(user, pe, chance)

/mob/living/simple_animal/hostile/abnormality/galaxy_child/proc/TurfTransform(turf/turf_type)
for(var/turf/T in range(1,src))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@

/datum/status_effect/pranked/on_creation(mob/living/new_owner, ...)
duration = rand(1800,2400)
. = ..()
return ..()

/datum/status_effect/pranked/on_apply()
if(get_attribute_level(owner, PRUDENCE_ATTRIBUTE) >= 80)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@

/obj/effect/mermaid_water/unbuckle_mob(mob/living/carbon/human/buckled_mob, force)
if(buckled_mob.stat == DEAD || buckled_mob.losebreath <= 0) //you can only unbuckle yourself if you somehow survive the oxyloss long enough, or you're dead
. = ..()
return ..()

///the loved's movespeed is nerfed by a LOT while she's out, meaning if you're in the process of being chased by big bird, I have bad news for you.
/datum/movespeed_modifier/unrequited_slowdown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
return FALSE

/mob/living/simple_animal/hostile/abnormality/porccubus/Life()
. =..()
. = ..()
if(status_flags & GODMODE)
return
if(teleport_cooldown < world.time) //if porccubus hasn't taken damage for 5 minutes we make him move so he doesn't stay stuck in whatever cell he got thrown in.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@
///we're doing a bunch of checks for diagonal movement because it acts real weird with forced dragging
/mob/living/simple_animal/hostile/abnormality/red_buddy/Move(atom/newloc)
if(!awakened_master || (moving_diagonally && !target))
return . = ..()
return ..()

if(!awakened_master.Adjacent(newloc) && !awakened_master.moving_diagonally)
return FALSE
. = ..()
return ..()

/mob/living/simple_animal/hostile/abnormality/red_buddy/BreachEffect()
..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,18 +241,12 @@
/mob/living/simple_animal/hostile/grown_strong/Move(atom/newloc, dir, step_x, step_y)
if(status_flags & GODMODE)
return FALSE
. = ..()
return
return ..()

/mob/living/simple_animal/hostile/grown_strong/AttackingTarget(atom/attacked_target)
if(status_flags & GODMODE)
return FALSE
. = ..()
return

/mob/living/simple_animal/hostile/grown_strong/Initialize()
. = ..()
//icon_state = pick("1", "2", "3")
return ..()

/mob/living/simple_animal/hostile/grown_strong/proc/UpdateGear()
manual_emote("shifts into [gear]\th gear!")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
/mob/living/simple_animal/hostile/abnormality/judgement_bird/Move()
if(judging)
return FALSE
. = ..()
return ..()

/mob/living/simple_animal/hostile/abnormality/judgement_bird/AttackingTarget(atom/attacked_target)
return OpenFire()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
if(istype(target, /mob/living/simple_animal/hostile/abnormality/naked_nest))
var/mob/living/simple_animal/hostile/abnormality/naked_nest/nest = target
nest.RecoverSerpent(src)
. = ..()
return ..()

/mob/living/simple_animal/hostile/naked_nest_serpent/CanAttack(atom/the_target)
if(panic_timer > world.time)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@
connected_abno.datum_reference.qliphoth_change(1)
H.adjust_attribute_buff(TEMPERANCE_ATTRIBUTE, -10)
H.adjust_attribute_buff(PRUDENCE_ATTRIBUTE, -10)
. = ..()
return ..()

/datum/status_effect/display/parasite_tree_blessing/proc/facadeFalls()
owner.apply_status_effect(THE_TREE_CURSE)
Expand Down Expand Up @@ -335,7 +335,7 @@
nested_items(N, host.get_item_by_slot(ITEM_SLOT_BACK))
nested_items(N, host.get_item_by_slot(ITEM_SLOT_OCLOTHING))
QDEL_IN(owner, 5) //rabbit sanity implant explodes at 5
. = ..()
return ..()

/datum/status_effect/display/parasite_tree_curse/TweakDisplayIcon()
..()
Expand Down
Loading