Skip to content
This repository was archived by the owner on Jul 27, 2021. It is now read-only.
Open
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
4 changes: 4 additions & 0 deletions _maps/RandomRuins/LavaRuins/lavaland_surface_dead_ratvar.dmm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions beestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1431,6 +1431,7 @@
#include "code\modules\antagonists\clock_cult\helpers\battle_of_the_gods.dm"
#include "code\modules\antagonists\clock_cult\helpers\clockcult_ending.dm"
#include "code\modules\antagonists\clock_cult\helpers\clockwork_conversion_tracker.dm"
#include "code\modules\antagonists\clock_cult\helpers\reebe_loader.dm"
#include "code\modules\antagonists\clock_cult\helpers\servant_warp.dm"
#include "code\modules\antagonists\clock_cult\items\brass_clothing.dm"
#include "code\modules\antagonists\clock_cult\items\clock_components.dm"
Expand Down
33 changes: 27 additions & 6 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ SUBSYSTEM_DEF(ticker)
var/admin_delay_notice = "" //a message to display to anyone who tries to restart the world after a delay
var/ready_for_reboot = FALSE //all roundend preparation done with, all that's left is reboot

var/gamemode_setup_completed = FALSE

var/triai = 0 //Global holder for Triumvirate
var/tipped = 0 //Did we broadcast the tip of the day yet?
var/selected_tip // What will be the tip of the day?
Expand All @@ -45,6 +47,8 @@ SUBSYSTEM_DEF(ticker)

var/maprotatechecked = 0

var/list/datum/game_mode/runnable_modes //list of runnable gamemodes

var/news_report

var/late_join_disabled
Expand Down Expand Up @@ -187,13 +191,28 @@ SUBSYSTEM_DEF(ticker)
send_tip_of_the_round()
tipped = TRUE

if(timeLeft <= 300 && !gamemode_setup_completed)
//Setup failed
if(!pre_setup())
timeLeft = null
start_at = world.time + (CONFIG_GET(number/lobby_countdown) * 10)
else
gamemode_setup_completed = TRUE

if(timeLeft <= 0)
current_state = GAME_STATE_SETTING_UP
Master.SetRunLevel(RUNLEVEL_SETUP)
if(start_immediately)
fire()

if(GAME_STATE_SETTING_UP)
if(!gamemode_setup_completed)
if(!pre_setup())
//setup failed
current_state = GAME_STATE_STARTUP
start_at = world.time + (CONFIG_GET(number/lobby_countdown) * 10)
timeLeft = null
Master.SetRunLevel(RUNLEVEL_LOBBY)
if(!setup())
//setup failed
current_state = GAME_STATE_STARTUP
Expand All @@ -213,12 +232,8 @@ SUBSYSTEM_DEF(ticker)
declare_completion(force_ending)
Master.SetRunLevel(RUNLEVEL_POSTGAME)


/datum/controller/subsystem/ticker/proc/setup()
message_admins("Setting up game.")
var/init_start = world.timeofday
//Create and announce mode
var/list/datum/game_mode/runnable_modes
//Select gamemode and load any maps associated with it
/datum/controller/subsystem/ticker/proc/pre_setup()
if(GLOB.master_mode == "random" || GLOB.master_mode == "secret")
runnable_modes = config.get_runnable_modes()

Expand Down Expand Up @@ -248,6 +263,12 @@ SUBSYSTEM_DEF(ticker)
SSjob.ResetOccupations()
return 0

return mode.setup_maps()

/datum/controller/subsystem/ticker/proc/setup()
message_admins("Setting up game.")
var/init_start = world.timeofday

CHECK_TICK
//Configure mode and assign player to special mode stuff
var/can_continue = 0
Expand Down
13 changes: 4 additions & 9 deletions code/game/gamemodes/clock_cult/clockcult.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,11 @@ GLOBAL_VAR(clockcult_eminence)

var/datum/team/clock_cult/main_cult

/datum/game_mode/clockcult/setup_maps()
LoadReebe()
return TRUE

/datum/game_mode/clockcult/pre_setup()
//Load Reebe
var/list/errorList = list()
var/list/reebe = SSmapping.LoadGroup(errorList, "Reebe", "map_files/generic", "CityOfCogs.dmm", default_traits=ZTRAITS_REEBE, silent=TRUE)
if(errorList.len)
message_admins("Reebe failed to load")
log_game("Reebe failed to load")
return FALSE
for(var/datum/map_template/map in reebe)
map.initTemplateBounds()
//Generate cultists
for(var/i in 1 to clock_cultists)
if(!antag_candidates.len)
Expand Down
9 changes: 1 addition & 8 deletions code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm
Original file line number Diff line number Diff line change
Expand Up @@ -651,14 +651,7 @@

/datum/dynamic_ruleset/roundstart/clockcult/pre_execute()
//Load Reebe
var/list/errorList = list()
var/list/reebe = SSmapping.LoadGroup(errorList, "Reebe", "map_files/generic", "CityOfCogs.dmm", default_traits=ZTRAITS_REEBE, silent=TRUE)
if(errorList.len)
message_admins("Reebe failed to load")
log_game("Reebe failed to load")
return FALSE
for(var/datum/map_template/map in reebe)
map.initTemplateBounds()
LoadReebe()
//Make cultists
var/starter_servants = 4
var/number_players = mode.roundstart_pop_ready
Expand Down
2 changes: 2 additions & 0 deletions code/game/gamemodes/game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
message_admins("<span class='notice'>DEBUG: GAME STARTING WITHOUT PLAYER NUMBER CHECKS, THIS WILL PROBABLY BREAK SHIT.</span>")
return TRUE

/datum/game_mode/proc/setup_maps()
return 1

///Attempts to select players for special roles the mode might have.
/datum/game_mode/proc/pre_setup()
Expand Down
6 changes: 6 additions & 0 deletions code/game/machinery/buttons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@
playsound(src, "sparks", 100, 1)
obj_flags |= EMAGGED

/obj/machinery/button/eminence_act(mob/living/simple_animal/eminence/eminence)
. = ..()
to_chat(usr, "<span class='brass'>You begin manipulating [src]!</span>")
if(do_after(eminence, 20, target=get_turf(eminence)))
attack_hand(eminence)

/obj/machinery/button/attack_ai(mob/user)
if(!panel_open)
return attack_hand(user)
Expand Down
8 changes: 7 additions & 1 deletion code/game/machinery/firealarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@
"<span class='notice'>You emag [src], disabling its thermal sensors.</span>")
playsound(src, "sparks", 50, 1)

/obj/machinery/firealarm/eminence_act(mob/living/simple_animal/eminence/eminence)
. = ..()
to_chat(usr, "<span class='brass'>You begin manipulating [src]!</span>")
if(do_after(eminence, 20, target=get_turf(eminence)))
attack_hand(eminence)

/obj/machinery/firealarm/temperature_expose(datum/gas_mixture/air, temperature, volume)
if((temperature > T0C + 200 || temperature < BODYTEMP_COLD_DAMAGE_LIMIT) && (last_alarm+FIREALARM_COOLDOWN < world.time) && !(obj_flags & EMAGGED) && detecting && !stat)
alarm()
Expand Down Expand Up @@ -265,7 +271,7 @@

/obj/machinery/firealarm/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
if((buildstage == 0) && (the_rcd.upgrade & RCD_UPGRADE_SIMPLE_CIRCUITS))
return list("mode" = RCD_UPGRADE_SIMPLE_CIRCUITS, "delay" = 20, "cost" = 1)
return list("mode" = RCD_UPGRADE_SIMPLE_CIRCUITS, "delay" = 20, "cost" = 1)
return FALSE

/obj/machinery/firealarm/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
Expand Down
7 changes: 7 additions & 0 deletions code/game/machinery/flasher.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@
if (anchored)
return flash()

/obj/machinery/flasher/eminence_act(mob/living/simple_animal/eminence/eminence)
. = ..()
to_chat(usr, "<span class='brass'>You begin manipulating [src]!</span>")
if(do_after(eminence, 20, target=get_turf(eminence)))
if(anchored)
flash()

/obj/machinery/flasher/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee" && damage_amount < 10) //any melee attack below 10 dmg does nothing
return 0
Expand Down
6 changes: 6 additions & 0 deletions code/game/machinery/lightswitch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,9 @@
return
if(!(stat & (BROKEN|NOPOWER)))
power_change()

/obj/machinery/light_switch/eminence_act(mob/living/simple_animal/eminence/eminence)
. = ..()
to_chat(usr, "<span class='brass'>You begin manipulating [src]!</span>")
if(do_after(eminence, 20, target=get_turf(eminence)))
interact(eminence)
4 changes: 4 additions & 0 deletions code/game/objects/items/pneumaticCannon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,11 @@
throw_amount = 1
maxWeightClass = 4 //a single magspear or spear
spin_item = FALSE
<<<<<<< HEAD
var/static/list/magspear_typecache = typecacheof(list(/obj/item/throwing_star/magspear, /obj/item/twohanded/spear, /obj/item/stack/rods/fifty, /obj/item/stack/rods, /obj/item/stack/rods/twentyfive, /obj/item/stack/rods/ten, /obj/item/katana, /obj/item/katana/cursed, /obj/item/toy/katana, /obj/item/twohanded/spear/explosive, /obj/item/twohanded/clockwork/brass_spear))
=======
var/static/list/magspear_typecache = typecacheof(list(/obj/item/throwing_star/magspear, /obj/item/spear, /obj/item/stack/rods/fifty, /obj/item/stack/rods, /obj/item/stack/rods/twentyfive, /obj/item/stack/rods/ten, /obj/item/katana, /obj/item/katana/cursed, /obj/item/toy/katana, /obj/item/spear/explosive, /obj/item/clockwork/weapon/brass_spear))
>>>>>>> debaaab8bd (Clockwork fixes, gamemode map load refactor, eminence refactoring (#4612))

/obj/item/pneumatic_cannon/speargun/Initialize()
. = ..()
Expand Down
12 changes: 12 additions & 0 deletions code/modules/antagonists/clock_cult/clockwork_outfits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,30 @@
name = "Servant of Ratvar - Armaments"

suit = /obj/item/clothing/suit/clockwork
<<<<<<< HEAD
weapon = /obj/item/twohanded/clockwork/brass_spear
=======
weapon = /obj/item/clockwork/weapon/brass_spear
>>>>>>> debaaab8bd (Clockwork fixes, gamemode map load refactor, eminence refactoring (#4612))
head = /obj/item/clothing/head/helmet/clockcult
shoes = /obj/item/clothing/shoes/clockcult
gloves = /obj/item/clothing/gloves/clockcult

/datum/outfit/clockcult/armaments/hammer
name = "Servant of Ratvar - Armaments (hammer)"
<<<<<<< HEAD
weapon = /obj/item/twohanded/clockwork/brass_battlehammer

/datum/outfit/clockcult/armaments/sword
name = "Servant of Ratvar - Armaments (sword)"
weapon = /obj/item/twohanded/clockwork/brass_sword
=======
weapon = /obj/item/clockwork/weapon/brass_battlehammer

/datum/outfit/clockcult/armaments/sword
name = "Servant of Ratvar - Armaments (sword)"
weapon = /obj/item/clockwork/weapon/brass_sword
>>>>>>> debaaab8bd (Clockwork fixes, gamemode map load refactor, eminence refactoring (#4612))

/datum/outfit/clockcult/armaments/bow
name = "Servant of Ratvar - Armaments (sword)"
Expand Down
8 changes: 2 additions & 6 deletions code/modules/antagonists/clock_cult/clockwork_turfs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,6 @@
planetary_atmos = TRUE
var/list/heal_people

/turf/open/floor/clockwork/reebe/Initialize()
. = ..()
heal_people = list()

/turf/open/floor/clockwork/reebe/Destroy()
if(LAZYLEN(heal_people))
STOP_PROCESSING(SSprocessing, src)
Expand All @@ -258,12 +254,12 @@
if(istype(M) && is_servant_of_ratvar(M))
if(!LAZYLEN(heal_people))
START_PROCESSING(SSprocessing, src)
heal_people += M
LAZYADD(heal_people, M)

/turf/open/floor/clockwork/reebe/Exited(atom/movable/A, atom/newloc)
. = ..()
if(A in heal_people)
heal_people -= A
LAZYREMOVE(heal_people, A)
if(!LAZYLEN(heal_people))
STOP_PROCESSING(SSprocessing, src)

Expand Down
3 changes: 3 additions & 0 deletions code/modules/antagonists/clock_cult/helpers/reebe_loader.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/proc/LoadReebe()
var/datum/map_template/template = new("_maps/map_files/generic/CityOfCogs.dmm", "Reebe")
template.load_new_z(ZTRAITS_REEBE)
Loading