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

Issue with tests when you add strain for queen #8165

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

blackcrystall
Copy link
Contributor

@blackcrystall blackcrystall commented Jan 19, 2025

About the pull request

basic: we don't want to take away ability and then give it back, also we want to clear ref right in time

What heppened: when I tried to add strain to queen... I got this>

Young Queen (/mob/living/carbon/xenomorph/queen/combat_ready): find references(null)
  ImmediateInvokeAsync(Young Queen (/mob/living/carbon/xenomorph/queen/combat_ready), "find_references")
  Garbage (/datum/controller/subsystem/garbage): HandleQueue(2)
  Garbage (/datum/controller/subsystem/garbage): fire(0)
  Garbage (/datum/controller/subsystem/garbage): ignite(0)
  Master (/datum/controller/master): RunQueue()
  Master (/datum/controller/master): Loop(2)
  Master (/datum/controller/master): StartProcessing(0)
  ## TESTING: GC: -- [0x3000042] | /mob/living/carbon/xenomorph/queen/combat_ready was unable to be GC'd -- (ref count of 6)
  ## REF SEARCH Finished searching atoms
  ## REF SEARCH Found /mob/living/carbon/xenomorph/queen/combat_ready [0x3000042] in list Datums -> /datum/controller/subsystem/garbage [0x21000040] -> queues (list) -> /list (list) -> /list (list).
  ## REF SEARCH List contents: 1055,Young Queen,924,
  ## REF SEARCH Found /mob/living/carbon/xenomorph/queen/combat_ready [0x3000042] in /datum/action/xeno_action/onclick/tacmap's [0x21025dff] tracked_queen var. Datums -> /datum/action/xeno_action/onclick/tacmap
  ## REF SEARCH Finished searching datums
  ## REF SEARCH Finished searching clients
  ## REF SEARCH Completed search for references to 'Young Queen' a /mob/living/carbon/xenomorph/queen/combat_ready.
  Error: /mob/living/carbon/xenomorph/queen/combat_ready hard deleted 1 times out of a total del count of 3
  	FAILURE #1: /mob/living/carbon/xenomorph/queen/combat_ready hard deleted 1 times out of a total del count of 3 at 

Changelog

No player facing changes

@cmss13-ci cmss13-ci bot added the Missing Changelog Maintainers always document their changes. label Jan 19, 2025
@TheKillfish
Copy link
Contributor

Currently working on a solution as part of a Queen rework, as strain code is not very queen compatible even aside from these errors. I will probably make that workaround a seperate PR.

@blackcrystall
Copy link
Contributor Author

blackcrystall commented Jan 20, 2025

What you mean by "not very queen compatible"?
There mostly issue in timing, so test supposed to fail prev, but because of some issues in it, never run in to this problem
So basically issue are not in queen, but more in tests and other code, that I fixed here

@TheKillfish
Copy link
Contributor

By that I mean ability removal and adding doesn't work properly as they don't affect the queen's some 4 extra lists of abilities, and that once queen gets on/off ovi whatever changes to her ability list was done by initially taking a strain will effectively be undone since getting on/off ovi essentially resets all her abilities to match one of those given lists.

The solution I've found is having all her abilities on her base_actions list and adding hide_from and unhide_from procs to the can_use_action checks for her abilities based off if she should be able to use them while on ovi or not, which would allow strain code to affect her normally as her ability list wouldn't be getting removed and readded every time she gets on/off ovi.

@blackcrystall
Copy link
Contributor Author

You can do it by yourself... I did it this way

/datum/xeno_strain/royal_charger/apply_strain(mob/living/carbon/xenomorph/queen/queen)
	queen.health_modifier += XENO_HEALTH_MOD_VERY_LARGE

	queen.mobile_aged_abilities -= /datum/action/xeno_action/onclick/screech
	queen.mobile_abilities -= /datum/action/xeno_action/onclick/screech

	queen.mobile_aged_abilities += /datum/action/xeno_action/onclick/charger_charge/queen
	queen.mobile_aged_abilities += /datum/action/xeno_action/activable/fling/charger/queen
	queen.mobile_abilities += /datum/action/xeno_action/onclick/charger_charge/queen
	queen.mobile_abilities += /datum/action/xeno_action/activable/fling/charger/queen

	queen.recalculate_everything()

@TheKillfish
Copy link
Contributor

Oh, that works. I feel like an idiot for not trying that. Although I still plan on refactoring queen's ability stuff so it's less snowflakey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing Changelog Maintainers always document their changes.
Projects
Status: Awaiting Review
Development

Successfully merging this pull request may close these issues.

2 participants