This commit is contained in:
SandPoot
2023-11-29 22:40:13 -03:00
parent c9b0dedf77
commit 40f1d7401d
704 changed files with 1766 additions and 1743 deletions
+5 -5
View File
@@ -222,7 +222,7 @@
*/
/datum/mafia_controller/proc/start_voting_phase()
phase = MAFIA_PHASE_VOTING
next_phase_timer = addtimer(CALLBACK(src, .proc/check_trial, TRUE),voting_phase_period,TIMER_STOPPABLE) //be verbose!
next_phase_timer = addtimer(CALLBACK(src, PROC_REF(check_trial), TRUE),voting_phase_period,TIMER_STOPPABLE) //be verbose!
send_message("<b>Voting started! Vote for who you want to see on trial today.</b>")
SStgui.update_uis(src)
@@ -283,13 +283,13 @@
if(judgement_guilty_votes.len > judgement_innocent_votes.len) //strictly need majority guilty to lynch
send_message(span_red("<b>Guilty wins majority, [on_trial.body.real_name] has been lynched.</b>"))
on_trial.kill(src,lynch = TRUE)
addtimer(CALLBACK(src, .proc/send_home, on_trial),judgement_lynch_period)
addtimer(CALLBACK(src, PROC_REF(send_home), on_trial),judgement_lynch_period)
else
send_message(span_green("<b>Innocent wins majority, [on_trial.body.real_name] has been spared.</b>"))
on_trial.body.forceMove(get_turf(on_trial.assigned_landmark))
on_trial = null
//day votes are already cleared, so this will skip the trial and check victory/lockdown/whatever else
next_phase_timer = addtimer(CALLBACK(src, .proc/check_trial, FALSE),judgement_lynch_period,TIMER_STOPPABLE)// small pause to see the guy dead, no verbosity since we already did this
next_phase_timer = addtimer(CALLBACK(src, PROC_REF(check_trial), FALSE),judgement_lynch_period,TIMER_STOPPABLE)// small pause to see the guy dead, no verbosity since we already did this
/**
* Teenie helper proc to move players back to their home.
@@ -560,7 +560,7 @@
tally[votes[vote_type][votee]] = 1
else
tally[votes[vote_type][votee]] += 1
sortTim(tally,/proc/cmp_numeric_dsc,associative=TRUE)
sortTim(tally,GLOBAL_PROC_REF(cmp_numeric_dsc),associative=TRUE)
return length(tally) ? tally[1] : null
/**
@@ -604,7 +604,7 @@
// ADD_TRAIT(H, TRAIT_CANNOT_CRYSTALIZE, MAFIA_TRAIT) freon tomfoolery
H.equipOutfit(player_outfit)
H.status_flags |= GODMODE
RegisterSignal(H,COMSIG_ATOM_UPDATE_OVERLAYS,.proc/display_votes)
RegisterSignal(H,COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(display_votes))
var/datum/action/innate/mafia_panel/mafia_panel = new(null,src)
mafia_panel.Grant(H)
var/client/player_client = GLOB.directory[role.player_key]
+29 -29
View File
@@ -159,7 +159,7 @@
/datum/mafia_role/detective/New(datum/mafia_controller/game)
. = ..()
RegisterSignal(game,COMSIG_MAFIA_NIGHT_ACTION_PHASE,.proc/investigate)
RegisterSignal(game,COMSIG_MAFIA_NIGHT_ACTION_PHASE, PROC_REF(investigate))
/datum/mafia_role/detective/validate_action_target(datum/mafia_controller/game,action,datum/mafia_role/target)
. = ..()
@@ -219,7 +219,7 @@
/datum/mafia_role/psychologist/New(datum/mafia_controller/game)
. = ..()
RegisterSignal(game,COMSIG_MAFIA_NIGHT_END,.proc/therapy_reveal)
RegisterSignal(game,COMSIG_MAFIA_NIGHT_END, PROC_REF(therapy_reveal))
/datum/mafia_role/psychologist/validate_action_target(datum/mafia_controller/game, action, datum/mafia_role/target)
. = ..()
@@ -259,7 +259,7 @@
/datum/mafia_role/chaplain/New(datum/mafia_controller/game)
. = ..()
RegisterSignal(game,COMSIG_MAFIA_NIGHT_ACTION_PHASE,.proc/commune)
RegisterSignal(game,COMSIG_MAFIA_NIGHT_ACTION_PHASE, PROC_REF(commune))
/datum/mafia_role/chaplain/validate_action_target(datum/mafia_controller/game, action, datum/mafia_role/target)
. = ..()
@@ -298,8 +298,8 @@
/datum/mafia_role/md/New(datum/mafia_controller/game)
. = ..()
RegisterSignal(game,COMSIG_MAFIA_NIGHT_ACTION_PHASE,.proc/protect)
RegisterSignal(game,COMSIG_MAFIA_NIGHT_END,.proc/end_protection)
RegisterSignal(game,COMSIG_MAFIA_NIGHT_ACTION_PHASE, PROC_REF(protect))
RegisterSignal(game,COMSIG_MAFIA_NIGHT_END, PROC_REF(end_protection))
/datum/mafia_role/md/validate_action_target(datum/mafia_controller/game,action,datum/mafia_role/target)
. = ..()
@@ -326,7 +326,7 @@
if(!target.can_action(game, src, "medical assistance"))
return
RegisterSignal(target,COMSIG_MAFIA_ON_KILL,.proc/prevent_kill)
RegisterSignal(target,COMSIG_MAFIA_ON_KILL, PROC_REF(prevent_kill))
add_note("N[game.turn] - Protected [target.body.real_name]")
/datum/mafia_role/md/proc/prevent_kill(datum/source,datum/mafia_controller/game,datum/mafia_role/attacker,lynch)
@@ -361,8 +361,8 @@
/datum/mafia_role/officer/New(datum/mafia_controller/game)
. = ..()
RegisterSignal(game,COMSIG_MAFIA_NIGHT_ACTION_PHASE,.proc/defend)
RegisterSignal(game,COMSIG_MAFIA_NIGHT_END,.proc/end_defense)
RegisterSignal(game,COMSIG_MAFIA_NIGHT_ACTION_PHASE, PROC_REF(defend))
RegisterSignal(game,COMSIG_MAFIA_NIGHT_END, PROC_REF(end_defense))
/datum/mafia_role/officer/validate_action_target(datum/mafia_controller/game,action,datum/mafia_role/target)
. = ..()
@@ -389,7 +389,7 @@
if(!target.can_action(game, src, "security patrol"))
return
if(target)
RegisterSignal(target,COMSIG_MAFIA_ON_KILL,.proc/retaliate)
RegisterSignal(target,COMSIG_MAFIA_ON_KILL, PROC_REF(retaliate))
add_note("N[game.turn] - Defended [target.body.real_name]")
/datum/mafia_role/officer/proc/retaliate(datum/source,datum/mafia_controller/game,datum/mafia_role/attacker,lynch)
@@ -426,8 +426,8 @@
/datum/mafia_role/lawyer/New(datum/mafia_controller/game)
. = ..()
RegisterSignal(game,COMSIG_MAFIA_SUNDOWN,.proc/roleblock)
RegisterSignal(game,COMSIG_MAFIA_NIGHT_END,.proc/release)
RegisterSignal(game,COMSIG_MAFIA_SUNDOWN, PROC_REF(roleblock))
RegisterSignal(game,COMSIG_MAFIA_NIGHT_END, PROC_REF(release))
/datum/mafia_role/lawyer/proc/roleblock(datum/mafia_controller/game)
SIGNAL_HANDLER
@@ -511,7 +511,7 @@
/datum/mafia_role/hos/New(datum/mafia_controller/game)
. = ..()
RegisterSignal(game,COMSIG_MAFIA_NIGHT_ACTION_PHASE,.proc/execute)
RegisterSignal(game,COMSIG_MAFIA_NIGHT_ACTION_PHASE, PROC_REF(execute))
/datum/mafia_role/hos/validate_action_target(datum/mafia_controller/game,action,datum/mafia_role/target)
. = ..()
@@ -541,7 +541,7 @@
target.reveal_role(game, verbose = TRUE)
if(target.team == MAFIA_TEAM_TOWN)
to_chat(body,span_userdanger("You have killed an innocent crewmember. You will die tomorrow night."))
RegisterSignal(game,COMSIG_MAFIA_SUNDOWN,.proc/internal_affairs)
RegisterSignal(game,COMSIG_MAFIA_SUNDOWN, PROC_REF(internal_affairs))
role_flags |= ROLE_VULNERABLE
/datum/mafia_role/hos/proc/internal_affairs(datum/mafia_controller/game)
@@ -572,8 +572,8 @@
/datum/mafia_role/warden/New(datum/mafia_controller/game)
. = ..()
RegisterSignal(game,COMSIG_MAFIA_SUNDOWN,.proc/night_start)
RegisterSignal(game,COMSIG_MAFIA_NIGHT_END,.proc/night_end)
RegisterSignal(game,COMSIG_MAFIA_SUNDOWN, PROC_REF(night_start))
RegisterSignal(game,COMSIG_MAFIA_NIGHT_END, PROC_REF(night_end))
/datum/mafia_role/warden/handle_action(datum/mafia_controller/game, action, datum/mafia_role/target)
. = ..()
@@ -594,7 +594,7 @@
if(protection_status == WARDEN_WILL_LOCKDOWN)
to_chat(body,span_danger("Any and all visitors are going to eat buckshot tonight."))
RegisterSignal(src,COMSIG_MAFIA_ON_VISIT,.proc/self_defense)
RegisterSignal(src,COMSIG_MAFIA_ON_VISIT, PROC_REF(self_defense))
/datum/mafia_role/warden/proc/night_end(datum/mafia_controller/game)
SIGNAL_HANDLER
@@ -633,7 +633,7 @@
/datum/mafia_role/mafia/New(datum/mafia_controller/game)
. = ..()
RegisterSignal(game,COMSIG_MAFIA_SUNDOWN,.proc/mafia_text)
RegisterSignal(game,COMSIG_MAFIA_SUNDOWN, PROC_REF(mafia_text))
/datum/mafia_role/mafia/proc/mafia_text(datum/mafia_controller/source)
SIGNAL_HANDLER
@@ -654,7 +654,7 @@
/datum/mafia_role/mafia/thoughtfeeder/New(datum/mafia_controller/game)
. = ..()
RegisterSignal(game,COMSIG_MAFIA_NIGHT_ACTION_PHASE,.proc/investigate)
RegisterSignal(game,COMSIG_MAFIA_NIGHT_ACTION_PHASE, PROC_REF(investigate))
/datum/mafia_role/mafia/thoughtfeeder/validate_action_target(datum/mafia_controller/game,action,datum/mafia_role/target)
. = ..()
@@ -701,8 +701,8 @@
/datum/mafia_role/traitor/New(datum/mafia_controller/game)
. = ..()
RegisterSignal(src,COMSIG_MAFIA_ON_KILL,.proc/nightkill_immunity)
RegisterSignal(game,COMSIG_MAFIA_NIGHT_KILL_PHASE,.proc/try_to_kill)
RegisterSignal(src,COMSIG_MAFIA_ON_KILL, PROC_REF(nightkill_immunity))
RegisterSignal(game,COMSIG_MAFIA_NIGHT_KILL_PHASE, PROC_REF(try_to_kill))
/datum/mafia_role/traitor/check_total_victory(alive_town, alive_mafia) //serial killers just want teams dead, they cannot be stopped by killing roles anyways
return alive_town + alive_mafia <= 1
@@ -763,8 +763,8 @@
/datum/mafia_role/nightmare/New(datum/mafia_controller/game)
. = ..()
RegisterSignal(src,COMSIG_MAFIA_ON_KILL,.proc/flickering_immunity)
RegisterSignal(game,COMSIG_MAFIA_NIGHT_KILL_PHASE,.proc/flicker_or_hunt)
RegisterSignal(src,COMSIG_MAFIA_ON_KILL, PROC_REF(flickering_immunity))
RegisterSignal(game,COMSIG_MAFIA_NIGHT_KILL_PHASE, PROC_REF(flicker_or_hunt))
/datum/mafia_role/nightmare/check_total_victory(alive_town, alive_mafia) //nightmares just want teams dead
return alive_town + alive_mafia <= 1
@@ -851,9 +851,9 @@
/datum/mafia_role/fugitive/New(datum/mafia_controller/game)
. = ..()
RegisterSignal(game,COMSIG_MAFIA_SUNDOWN,.proc/night_start)
RegisterSignal(game,COMSIG_MAFIA_NIGHT_END,.proc/night_end)
RegisterSignal(game,COMSIG_MAFIA_GAME_END,.proc/survived)
RegisterSignal(game,COMSIG_MAFIA_SUNDOWN, PROC_REF(night_start))
RegisterSignal(game,COMSIG_MAFIA_NIGHT_END, PROC_REF(night_end))
RegisterSignal(game,COMSIG_MAFIA_GAME_END, PROC_REF(survived))
/datum/mafia_role/fugitive/handle_action(datum/mafia_controller/game, action, datum/mafia_role/target)
. = ..()
@@ -874,7 +874,7 @@
if(protection_status == FUGITIVE_WILL_PRESERVE)
to_chat(body,span_danger("Your preparations are complete. Nothing could kill you tonight!"))
RegisterSignal(src,COMSIG_MAFIA_ON_KILL,.proc/prevent_death)
RegisterSignal(src,COMSIG_MAFIA_ON_KILL, PROC_REF(prevent_death))
/datum/mafia_role/fugitive/proc/night_end(datum/mafia_controller/game)
SIGNAL_HANDLER
@@ -918,7 +918,7 @@
/datum/mafia_role/obsessed/New(datum/mafia_controller/game) //note: obsession is always a townie
. = ..()
RegisterSignal(game,COMSIG_MAFIA_SUNDOWN,.proc/find_obsession)
RegisterSignal(game,COMSIG_MAFIA_SUNDOWN, PROC_REF(find_obsession))
/datum/mafia_role/obsessed/proc/find_obsession(datum/mafia_controller/game)
SIGNAL_HANDLER
@@ -934,7 +934,7 @@
//if you still don't have an obsession you're playing a single player game like i can't help your dumb ass
to_chat(body, span_userdanger("Your obsession is [obsession.body.real_name]! Get them lynched to win!"))
add_note("N[game.turn] - I vowed to watch my obsession, [obsession.body.real_name], hang!") //it'll always be N1 but whatever
RegisterSignal(obsession,COMSIG_MAFIA_ON_KILL,.proc/check_victory)
RegisterSignal(obsession,COMSIG_MAFIA_ON_KILL, PROC_REF(check_victory))
UnregisterSignal(game,COMSIG_MAFIA_SUNDOWN)
/datum/mafia_role/obsessed/proc/check_victory(datum/source,datum/mafia_controller/game,datum/mafia_role/attacker,lynch)
@@ -964,7 +964,7 @@
/datum/mafia_role/clown/New(datum/mafia_controller/game)
. = ..()
RegisterSignal(src,COMSIG_MAFIA_ON_KILL,.proc/prank)
RegisterSignal(src,COMSIG_MAFIA_ON_KILL, PROC_REF(prank))
/datum/mafia_role/clown/proc/prank(datum/source,datum/mafia_controller/game,datum/mafia_role/attacker,lynch)
SIGNAL_HANDLER