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

Изменение минимального количества игроков для объявления войны #64

Merged
merged 1 commit into from
Dec 28, 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
2 changes: 1 addition & 1 deletion code/__DEFINES/antagonists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define NUKE_RESULT_HIJACK_NO_DISK 10

/// Min players requireed for nukes to declare war
#define CHALLENGE_MIN_PLAYERS 50
#define CHALLENGE_MIN_PLAYERS 25 // MASSMETA EDIT

//fugitive end results
#define FUGITIVE_RESULT_BADASS_HUNTER 0
Expand Down
18 changes: 16 additions & 2 deletions code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#define CHALLENGE_TELECRYSTALS 280
#define CHALLENGE_TIME_LIMIT (5 MINUTES)
#define CHALLENGE_SHUTTLE_DELAY (25 MINUTES) // 25 minutes, so the ops have at least 5 minutes before the shuttle is callable.
// MASSMETA EDIT START
#define WAR_TC_MIN 125
#define WAR_TC_MAX 280
#define WAR_MAX_PAYOUT 50
// MASSMETA EDIT END

GLOBAL_LIST_EMPTY(jam_on_wardec)

Expand All @@ -22,7 +27,11 @@ GLOBAL_LIST_EMPTY(jam_on_wardec)
return

declaring_war = TRUE
var/are_you_sure = tgui_alert(user, "Consult your team carefully before you declare war on [station_name()]. Are you sure you want to alert the enemy crew? You have [DisplayTimeText(CHALLENGE_TIME_LIMIT - world.time - SSticker.round_start_time)] to decide.", "Declare war?", list("Yes", "No"))
// MASSMETA EDIT START
var/are_you_sure = tgui_alert(user, "Consult your team carefully before you declare war on [station_name()]]. Are you sure you want to alert the enemy crew? You will get \
[round(WAR_TC_MIN + (WAR_TC_MAX - WAR_TC_MIN) * (1 - (WAR_MAX_PAYOUT - min(WAR_MAX_PAYOUT, GLOB.joined_player_list.len)) / (WAR_MAX_PAYOUT - CHALLENGE_MIN_PLAYERS)), 1)] \
extra telecystals. You have [DisplayTimeText(CHALLENGE_TIME_LIMIT - world.time - SSticker.round_start_time)] to decide", "Declare war?", list("Yes", "No"))
// MASSMETA EDIT END
declaring_war = FALSE

if(!check_allowed(user))
Expand Down Expand Up @@ -114,7 +123,7 @@ GLOBAL_LIST_EMPTY(jam_on_wardec)
continue
uplinks += uplink

var/tc_to_distribute = CHALLENGE_TELECRYSTALS
var/tc_to_distribute = round(WAR_TC_MIN + (WAR_TC_MAX - WAR_TC_MIN) * (1 - (WAR_MAX_PAYOUT - min(WAR_MAX_PAYOUT, GLOB.joined_player_list.len)) / (WAR_MAX_PAYOUT - CHALLENGE_MIN_PLAYERS)), 1) // MASSMETA EDIT
var/tc_per_nukie = round(tc_to_distribute / (length(orphans)+length(uplinks)))

for (var/datum/component/uplink/uplink in uplinks)
Expand Down Expand Up @@ -197,3 +206,8 @@ GLOBAL_LIST_EMPTY(jam_on_wardec)
#undef CHALLENGE_TELECRYSTALS
#undef CHALLENGE_TIME_LIMIT
#undef CHALLENGE_SHUTTLE_DELAY
// MASSMETA EDIT START
#undef WAR_TC_MIN
#undef WAR_TC_MAX
#undef WAR_MAX_PAYOUT
// MASSMETA EDIT END
Loading