Various Skill Bugfixes (#22533)

This PR fixes a bunch of skills related bugs, the biggest of which were
the result of the system being overly trusting of the database, when in
reality due to a bunch of unpredictable edge cases, the database is not
guaranteed to always have what I think it has. To fix these bugs, I've
had to slightly refactor how skills are generated on player characters
and antagonists, such that the burden of proof for skills is with the
Skills Subsystem rather than the Database.

Skills generated for a fresh character that has NO preferences saved
(Worst case scenario):

<img width="1491" height="849" alt="image"
src="https://github.com/user-attachments/assets/683fb538-106a-4679-8e2a-30dd45f456a1"
/>

Promoting that same character to Antagonist now increases certain skills
to a minimum baseline:

<img width="1315" height="830" alt="image"
src="https://github.com/user-attachments/assets/94bcc69e-cbbe-45fa-956e-f53b7f5d2779"
/>

By Mel's request, Bluespace Technicians spawn with all skills fully
maxed out for debugging purposes:

<img width="1909" height="985" alt="image"
src="https://github.com/user-attachments/assets/db4f3f65-3d87-47fc-907e-c68eae6d4cdb"
/>
This commit is contained in:
VMSolidus
2026-05-29 20:37:57 +00:00
committed by GitHub
parent 3aa4942572
commit 13f87e4a26
9 changed files with 70 additions and 21 deletions
@@ -22,13 +22,16 @@
/datum/action/leadership/proc/get_target(owner, atom/target, modifiers)
SIGNAL_HANDLER
UnregisterSignal(owner, COMSIG_MOB_CLICKON)
if (. == COMSIG_MOB_CANCEL_CLICKON)
return . // Another signal-handler already got to it.
// Both forms of deliver speech will immediately return control to the caller without blocking.
// Unfortunately StrongDMM is apparently incapable of reading that.
if (owner == target)
UNLINT(deliver_speech_area(owner))
else
UNLINT(deliver_speech_target(owner, target))
UnregisterSignal(owner, COMSIG_MOB_CLICKON)
return COMSIG_MOB_CANCEL_CLICKON
/datum/action/leadership/proc/deliver_speech_area(mob/owner)
@@ -27,22 +27,26 @@
/datum/action/ministry/proc/get_target(owner, atom/target, modifiers)
SIGNAL_HANDLER
UnregisterSignal(owner, COMSIG_MOB_CLICKON)
if (. == COMSIG_MOB_CANCEL_CLICKON)
return . // Another signal-handler already got to it somehow.
. = COMSIG_MOB_CANCEL_CLICKON
if (owner == target)
to_chat(owner, SPAN_NOTICE("You cannot offer a blessing to yourself."))
return COMSIG_MOB_CANCEL_CLICKON
return .
if (!astype(target, /mob)?.client)
to_chat(owner, SPAN_NOTICE("[target] cannot receive a blessing."))
return COMSIG_MOB_CANCEL_CLICKON
return .
if (get_dist(owner, target) >= 2)
to_chat(owner, SPAN_NOTICE("You must be adjacent to [target] to offer them a blessing."))
return COMSIG_MOB_CANCEL_CLICKON
return .
// StrongDMM for whatever ungodly reason can't tell that this proc won't block the caller.
UNLINT(try_give_blessing(target))
UnregisterSignal(owner, COMSIG_MOB_CLICKON)
return COMSIG_MOB_CANCEL_CLICKON
return .
/datum/action/ministry/proc/try_give_blessing(mob/target)
set waitfor = FALSE