Skip to content

Commit

Permalink
Merge pull request Civ13#2574 from savethetreez/master
Browse files Browse the repository at this point in the history
Misc stuff
  • Loading branch information
savethetreez authored Jan 18, 2024
2 parents 617ec57 + 9acb672 commit e1a9314
Show file tree
Hide file tree
Showing 20 changed files with 460 additions and 3,987 deletions.
3 changes: 1 addition & 2 deletions civ13.dme
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,6 @@
#include "code\game\objects\map_metadata\african_warlords.dm"
#include "code\game\objects\map_metadata\alleyway.dm"
#include "code\game\objects\map_metadata\arab_town.dm"
#include "code\game\objects\map_metadata\arctic_sub.dm"
#include "code\game\objects\map_metadata\ardennes.dm"
#include "code\game\objects\map_metadata\bank_robbery.dm"
#include "code\game\objects\map_metadata\barbarossa.dm"
Expand All @@ -451,6 +450,7 @@
#include "code\game\objects\map_metadata\east_los_santos.dm"
#include "code\game\objects\map_metadata\eft_factory.dm"
#include "code\game\objects\map_metadata\event_city.dm"
#include "code\game\objects\map_metadata\fallujah.dm"
#include "code\game\objects\map_metadata\fields.dm"
#include "code\game\objects\map_metadata\football.dm"
#include "code\game\objects\map_metadata\forest.dm"
Expand Down Expand Up @@ -743,7 +743,6 @@
#include "code\modules\1713\jobs\_special.dm"
#include "code\modules\1713\jobs\american.dm"
#include "code\modules\1713\jobs\ancient.dm"
#include "code\modules\1713\jobs\arctic_sub.dm"
#include "code\modules\1713\jobs\badguys.dm"
#include "code\modules\1713\jobs\british.dm"
#include "code\modules\1713\jobs\campaign_jobs.dm"
Expand Down
1 change: 1 addition & 0 deletions code/__defines/maps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
#define MAP_EAST_LOS_SANTOS "EAST_LOS_SANTOS"
#define MAP_DETROIT "DETROIT"
#define MAP_SYRIA "SYRIA"
#define MAP_FALLUJAH "FALLUJAH"

#define MAP_OPERATION_FALCON "OPERATION_FALCON"
#define MAP_VADSO_CITY "VADSO_CITY"
Expand Down
13 changes: 13 additions & 0 deletions code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,19 @@
if (istype(B))
B.throw_impact(new_loc, speed)

/atom/movable/proc/dropInto(atom/destination)
while(istype(destination))
var/atom/drop_destination = destination.onDropInto(src)
if(!istype(drop_destination) || drop_destination == destination)
return forceMove(destination)
destination = drop_destination
return forceMove(null)

/atom/proc/onDropInto(atom/movable/AM)
return // If onDropInto returns null, then dropInto will forceMove AM into us.

/atom/movable/onDropInto(atom/movable/AM)
return loc // If onDropInto returns something, then dropInto will attempt to drop AM there.

//Overlays
/atom/movable/overlay
Expand Down
63 changes: 0 additions & 63 deletions code/game/objects/map_metadata/dvojka.dm

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,154 +1,153 @@
/obj/map_metadata/arctic_sub
ID = MAP_ARCTIC_SUB
title = "Battle for the Submarine"
lobby_icon = "icons/lobby/arcticsub.png"
caribbean_blocking_area_types = list(/area/caribbean/no_mans_land/invisible_wall/tundra/one)
/obj/map_metadata/fallujah
ID = MAP_FALLUJAH
title = "Fallujah"
lobby_icon = "icons/lobby/fallujah.png"
caribbean_blocking_area_types = list(/area/caribbean/no_mans_land/invisible_wall/desert)
respawn_delay = 1200
no_winner = "The siege is still underway."
gamemode = "Submarine siege."
no_hardcore = FALSE
no_winner = "The operation is still underway."

faction_organization = list(
RUSSIAN,
ARAB,
AMERICAN)

roundend_condition_sides = list(
list(AMERICAN) = /area/caribbean/british/land/inside/objective,
list(RUSSIAN) = /area/caribbean/no_mans_land/capturable/one
list(ARAB) = /area/caribbean/arab,
list(AMERICAN) = /area/caribbean/british
)
age = "1960"
ordinal_age = 7
faction_distribution_coeffs = list(RUSSIAN = 0.7, AMERICAN = 0.3)
battle_name = "Battle for the Submarine."
mission_start_message = "<font size=4>Both factions have <b>8 minutes</b> to prepare before the ceasefire ends!<br>The Submarine Crew will win if they hold out for <b>40 minutes</b>. Soviets will win if they enter and occupy the command room for 5 minutes!.</font>"
faction1 = AMERICAN
faction2 = RUSSIAN
valid_weather_types = list(WEATHER_NONE, WEATHER_WET, WEATHER_EXTREME)
songs = list(
"Visonia - Antarctic Love:1" = "sound/music/antarcticlove.ogg",)
gamemode = "Siege"

/obj/map_metadata/arctic_sub/faction1_can_cross_blocks()
return (processes.ticker.playtime_elapsed >= 60000 || admin_ended_all_grace_periods)
age = "2004"
ordinal_age = 8

/obj/map_metadata/arctic_sub/faction2_can_cross_blocks()
return (processes.ticker.playtime_elapsed >= 4800 || admin_ended_all_grace_periods)
faction_distribution_coeffs = list(ARAB = 0.5, AMERICAN = 0.5)
battle_name = "Operation Phantom Fury"
mission_start_message = "<font size=4>The <b>Insurgents</b> are holding the city. The <b>USMC</b> must clear out the area within <b>40 minutes</b>!</font>"
faction1 = ARAB
faction2 = AMERICAN
valid_weather_types = list(WEATHER_NONE, WEATHER_EXTREME)
songs = list(
"The Handsome Family - Far From Any Road:1" = "sound/music/farfromanyroad.ogg",)
artillery_count = 3
valid_artillery = list("Explosive")

/obj/map_metadata/arctic_sub/short_win_time(faction)
if (!(alive_n_of_side(faction1)) || !(alive_n_of_side(faction2)))
return 600
/obj/map_metadata/fallujah/job_enabled_specialcheck(var/datum/job/J)
..()
if (J.is_modernday && istype(J, /datum/job/american) && !istype(J, /datum/job/american/idf))
. = TRUE
else if (J.is_specops && istype(J, /datum/job/arab))
. = TRUE
else
return 3000 // 5 minutes
. = FALSE
/obj/map_metadata/fallujah/faction1_can_cross_blocks()
return (processes.ticker.playtime_elapsed >= 30000 || admin_ended_all_grace_periods)

/obj/map_metadata/fallujah/faction2_can_cross_blocks()
return (processes.ticker.playtime_elapsed >= 3000 || admin_ended_all_grace_periods)

/obj/map_metadata/arctic_sub/long_win_time(faction)
if (!(alive_n_of_side(faction1)) || !(alive_n_of_side(faction2)))
return 600
else
return 3000 // 5 minutes

/obj/map_metadata/arctic_sub/roundend_condition_def2name(define)
/obj/map_metadata/fallujah/roundend_condition_def2name(define)
..()
switch (define)
if (ARAB)
return "Insurents"
if (AMERICAN)
return "Crew"
if (RUSSIAN)
return "Soviets"
/obj/map_metadata/arctic_sub/roundend_condition_def2army(define)
return "USMC"
/obj/map_metadata/fallujah/roundend_condition_def2army(define)
..()
switch (define)
if (ARAB)
return "Insurgents"
if (AMERICAN)
return "Crew"
if (RUSSIAN)
return "Soviets"
return "USMC"

/obj/map_metadata/arctic_sub/army2name(army)
/obj/map_metadata/fallujah/army2name(army)
..()
switch (army)
if ("Crew")
return "Crew"
if ("Soviets")
return "Soviet"
if ("Insurgents")
return "Insurgents"
if ("USMC")
return "US Marines"


/obj/map_metadata/arctic_sub/cross_message(faction)
if (faction == RUSSIAN)
return "<font size = 4>The Soviets may now cross the invisible wall!</font>"
else if (faction == AMERICAN)
/obj/map_metadata/fallujah/cross_message(faction)
if (faction == AMERICAN)
return "<font size = 4>The USMC may now cross the invisible wall!</font>"
else if (faction == ARAB)
return ""
else
return ""

/obj/map_metadata/berlin/reverse_cross_message(faction)
if (faction == RUSSIAN)
return "<span class = 'userdanger'>The Soviets may no longer cross the invisible wall!</span>"
else if (faction == AMERICAN)
/obj/map_metadata/fallujah/reverse_cross_message(faction)
if (faction == AMERICAN)
return "<span class = 'userdanger'>The USMC may no longer cross the invisible wall!</span>"
else if (faction == ARAB)
return ""
else
return ""


/obj/map_metadata/arctic_sub/update_win_condition()
var/no_loop_fj = FALSE

/obj/map_metadata/fallujah/update_win_condition()

if (world.time >= 24000)
if (win_condition_spam_check)
return FALSE
ticker.finished = TRUE
var/message = "The <b>Crew</b> has successfully defended the submarine! The Raiders have retreated!"
var/message = "The Insurgents pushed back the USMC from the city!"
world << "<font size = 4><span class = 'notice'>[message]</span></font>"
show_global_battle_report(null)
win_condition_spam_check = TRUE
return FALSE
if ((current_winner && current_loser && world.time > next_win) && no_loop_r == FALSE)
if ((current_winner && current_loser && world.time > next_win) && no_loop_fj == FALSE)
ticker.finished = TRUE
var/message = "The <b>Soviets</b> have captured the Submarine! The battle for the submarine is over!"
var/message = "The USMC has captured the city! The Insurgents retreat!"
world << "<font size = 4><span class = 'notice'>[message]</span></font>"
show_global_battle_report(null)
win_condition_spam_check = TRUE
no_loop_r = TRUE
no_loop_arab = TRUE
return FALSE
// German major
else if (win_condition.check(typesof(roundend_condition_sides[roundend_condition_sides[2]]), roundend_condition_sides[1], roundend_condition_sides[2], 1.33, TRUE))
if (!win_condition.check(typesof(roundend_condition_sides[roundend_condition_sides[1]]), roundend_condition_sides[2], roundend_condition_sides[1], 1.33))
if (last_win_condition != win_condition.hash)
current_win_condition = "The <b>Soviets</b> have reached the Command room! They will win in {time} minutes."
next_win = world.time + short_win_time(RUSSIAN)
current_win_condition = "The USMC controls the main sector! They will win in {time} minutes."
next_win = world.time + short_win_time(ARAB)
announce_current_win_condition()
current_winner = roundend_condition_def2army(roundend_condition_sides[1][1])
current_loser = roundend_condition_def2army(roundend_condition_sides[2][1])
// German minor
else if (win_condition.check(typesof(roundend_condition_sides[roundend_condition_sides[2]]), roundend_condition_sides[1], roundend_condition_sides[2], 1.01, TRUE))
if (!win_condition.check(typesof(roundend_condition_sides[roundend_condition_sides[1]]), roundend_condition_sides[2], roundend_condition_sides[1], 1.01))
if (last_win_condition != win_condition.hash)
current_win_condition = "The <b>Soviets</b> have reached the Command room! They will win in {time} minutes."
next_win = world.time + short_win_time(RUSSIAN)
current_win_condition = "The USMC controls the main sector! They will win in {time} minutes."
next_win = world.time + short_win_time(ARAB)
announce_current_win_condition()
current_winner = roundend_condition_def2army(roundend_condition_sides[1][1])
current_loser = roundend_condition_def2army(roundend_condition_sides[2][1])
// Soviet major
else if (win_condition.check(typesof(roundend_condition_sides[roundend_condition_sides[1]]), roundend_condition_sides[2], roundend_condition_sides[1], 1.33, TRUE))
if (!win_condition.check(typesof(roundend_condition_sides[roundend_condition_sides[2]]), roundend_condition_sides[1], roundend_condition_sides[2], 1.33))
if (last_win_condition != win_condition.hash)
current_win_condition = "The <b>Soviets</b> have reached the Command room! They will win in {time} minutes."
next_win = world.time + short_win_time(RUSSIAN)
current_win_condition = "The USMC controls the main sector! They will win in {time} minutes."
next_win = world.time + short_win_time(AMERICAN)
announce_current_win_condition()
current_winner = roundend_condition_def2army(roundend_condition_sides[2][1])
current_loser = roundend_condition_def2army(roundend_condition_sides[1][1])
// Soviet minor
else if (win_condition.check(typesof(roundend_condition_sides[roundend_condition_sides[1]]), roundend_condition_sides[2], roundend_condition_sides[1], 1.01, TRUE))
if (!win_condition.check(typesof(roundend_condition_sides[roundend_condition_sides[2]]), roundend_condition_sides[1], roundend_condition_sides[2], 1.01))
if (last_win_condition != win_condition.hash)
current_win_condition = "The <b>Soviets</b> have reached the Command room! They will win in {time} minutes."
next_win = world.time + short_win_time(RUSSIAN)
current_win_condition = "The USMC controls the main sector! They will win in {time} minutes."
next_win = world.time + short_win_time(AMERICAN)
announce_current_win_condition()
current_winner = roundend_condition_def2army(roundend_condition_sides[2][1])
current_loser = roundend_condition_def2army(roundend_condition_sides[1][1])
else
if (current_win_condition != no_winner && current_winner && current_loser)
world << "<font size = 3>The <b>Crew</b> has recaptured the Command room!</font>"
world << "<font size = 3>The Insurgents reclaime their sector!</font>"
current_winner = null
current_loser = null
next_win = -1
current_win_condition = no_winner
win_condition.hash = 0
last_win_condition = win_condition.hash
return TRUE
return TRUE
Loading

0 comments on commit e1a9314

Please sign in to comment.