Delays handing out of Traitor objectives (#24857)

* Idk man

* IT WORKS

* SO CLOSE TO GREATNESS

* IT ALL WORKS AAAAAA

* Actually add a random timer

* Oopsie

* Removes empty proc

* Update code/game/gamemodes/traitor/traitor.dm

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>

* Contra requested changes

* Adds randomness to random_time

* Whoops

* Contra + AA Review

* Removes TODO

* Reverts standard mode

* Makes CI not fail

* Removes unused proc

* FUCK

* Fixes a kit bug (Thanks Erik)

* Tourte Review

* Matt review

* Changes text, adds admin logs

* Clarifies the log

* New and improved version!

* Fixes

* Revert "Fixes"

This reverts commit ea29aa92b2.

* Revert "New and improved version!"

This reverts commit ea053f3b94.

* Properly rerolls objectives at handout

* Adds trifecta support

* Contra and Sirryan review

* Forgor this

* Fix CI

* Final fixes

* Update code/game/gamemodes/traitor/traitor.dm

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* Update code/game/gamemodes/trifecta/trifecta.dm

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* Steel review

* Wow I was silly

* Less whitespace

* Dumbest bug in a while

* No more lavaland player getting autobalanced

* Streamlines a proc + another fix

* AAAAA FUCK

* Update code/game/gamemodes/objective.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* Update code/game/gamemodes/objective.dm

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* Contra review

* Faire review

* Forgor to push this

* Farie + Contra review

* Hal + Contra review

* Uses `replaceobjective` now + Fix

* Farie review

* Farie review

* Farie review 2: electric bogaloo

* Fix

* Update code/game/gamemodes/objective_holder.dm

Co-authored-by: Farie82 <farie82@users.noreply.github.com>
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* Contra review

* Update code/game/gamemodes/objective_holder.dm

Co-authored-by: Farie82 <farie82@users.noreply.github.com>
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

---------

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Co-authored-by: Farie82 <farie82@users.noreply.github.com>
This commit is contained in:
DGamerL
2024-07-24 08:09:14 +00:00
committed by GitHub
co-authored by SteelSlayer Ryan Contrabang Farie82
parent 98f0931c14
commit 3f8aff4374
11 changed files with 238 additions and 80 deletions
+16 -15
View File
@@ -1540,29 +1540,30 @@
* Create and/or add the `datum_type_or_instance` antag datum to the src mind.
*
* Arguments:
* * datum_type - an antag datum typepath or instance
* * antag_datum - an antag datum typepath or instance. If it's a typepath, it will create a new antag datum
* * datum/team/team - the antag team that the src mind should join, if any
*/
/datum/mind/proc/add_antag_datum(datum_type_or_instance, datum/team/team = null)
var/datum/antagonist/A
/datum/mind/proc/add_antag_datum(datum_type_or_instance, datum/team/team)
var/datum/antagonist/antag_datum
if(!ispath(datum_type_or_instance))
A = datum_type_or_instance
if(!istype(A))
antag_datum = datum_type_or_instance
if(!istype(antag_datum))
return
else
A = new datum_type_or_instance()
if(!A.can_be_owned(src))
qdel(A)
antag_datum = new datum_type_or_instance()
if(!antag_datum.can_be_owned(src))
qdel(antag_datum)
return
A.owner = src
LAZYADD(antag_datums, A)
A.create_team(team)
var/datum/team/antag_team = A.get_team()
antag_datum.owner = src
LAZYADD(antag_datums, antag_datum)
antag_datum.create_team(team)
var/datum/team/antag_team = antag_datum.get_team()
if(antag_team)
antag_team.add_member(src)
ASSERT(A.owner && A.owner.current)
A.on_gain()
return A
ASSERT(antag_datum.owner && antag_datum.owner.current)
antag_datum.on_gain()
return antag_datum
/**
* Remove the specified `datum_type` antag datum from the src mind.