diff --git a/code/controllers/hooks-defs.dm b/code/controllers/hooks-defs.dm index 1cd7c4aad8a..54aaf48626f 100644 --- a/code/controllers/hooks-defs.dm +++ b/code/controllers/hooks-defs.dm @@ -16,6 +16,13 @@ */ /hook/roundend +/** + * LateSpawn hook. + * Called in newplayer.dm when a humanoid character joins the round after it started. + * Parameters: var/mob/living/carbon/human, var/rank + */ +/hook/latespawn + /** * Death hook. * Called in death.dm when someone dies. diff --git a/code/game/gamemodes/nations/nations.dm b/code/game/gamemodes/nations/nations.dm new file mode 100644 index 00000000000..b45439985e1 --- /dev/null +++ b/code/game/gamemodes/nations/nations.dm @@ -0,0 +1,49 @@ + +datum/game_mode/nations + name = "nations" + config_tag = "nations" + required_players_secret = 25 + var/const/waittime_l = 3000 //lower bound on time before intercept arrives (in tenths of seconds) + var/const/waittime_h = 6000 //upper bound on time before intercept arrives (in tenths of seconds) + + + + +/datum/game_mode/nations/post_setup() + spawn (rand(waittime_l, waittime_h)) + remove_flags() + spawn(50) + spawn_flags() + send_intercept() + +/datum/game_mode/nations/send_intercept() + command_alert("Due to recent and COMPLETELY UNFOUNDED allegations of massive fraud and insider trading \ + affecting trillions of investors, the Nanotrasen Corporation has decided to liquidate all \ + assets of the Centcom Division in order to pay the massive legal fees that will be incurred \ + during the following centuries long court process. Therefore, all current employment contracts \ + are IMMEDIATELY TERMINATED. Nanotrasen will be unable to send a rescue shuttle to carry you home,\ + however they remain willing for the time being to continue trading cargo. Have a pleasant \ + day.", "FINAL TRANSMISSION, CENTCOM COMMAND.") + + +/datum/game_mode/nations/proc/remove_flags() + for(var/obj/item/flag/F in world) + del(F) + +/datum/game_mode/nations/proc/spawn_flags() + + for(var/obj/effect/landmark/nations/N in landmarks_list) + switch(N.name) + if("Atmosia") + new /obj/item/flag/nation/atmos(get_turf(N)) + if("Brigston") + new /obj/item/flag/nation/sec(get_turf(N)) + if("Cargonia") + new /obj/item/flag/nation/cargo(get_turf(N)) + if("Command") + new /obj/item/flag/nation/command(get_turf(N)) + if("Medistan") + new /obj/item/flag/nation/med(get_turf(N)) + if("Scientopia") + new /obj/item/flag/nation/rnd(get_turf(N)) + diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 8c80446bff9..c8119105a70 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -86,6 +86,19 @@ landmarks_list -= src ..() +/obj/effect/landmark/nations + name = "nations" + icon = 'icons/mob/screen1.dmi' + icon_state = "x" + anchored = 1.0 + +/obj/effect/landmark/nations/New() + ..() + tag = "nations*[name]" + invisibility = 101 + + return 1 + /obj/effect/landmark/start name = "start" icon = 'icons/mob/screen1.dmi' diff --git a/code/game/objects/items/flag.dm b/code/game/objects/items/flag.dm index a8c5e61c6dc..20804d9285d 100644 --- a/code/game/objects/items/flag.dm +++ b/code/game/objects/items/flag.dm @@ -157,6 +157,19 @@ icon_state = "unathiflag" //Nations/Department flags +/obj/item/flag/nation + density = 1 + anchored = 1 + +/obj/item/flag/nation/fire_act() + return + +/obj/item/flag/nation/Ignite() + return + +/obj/item/flag/nation/light() + return + /obj/item/flag/nation/cargo name = "Cargonia flag" @@ -183,6 +196,10 @@ desc = "The flag of the independant, sovereign nation of Atmosia." icon_state = "atmosflag" +/obj/item/flag/nation/command + name = "Command flag" + desc = "The flag of the independant, sovereign nation of Command." + icon_state = "ntflag" //Antags diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 30843add947..124ab184686 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -318,11 +318,12 @@ data_core.manifest_inject(character) ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc. //TODO!!!!! ~Carn AnnounceArrival(character, rank) - + callHook("latespawn", list(character, rank)) else character.Robotize() del(src) + proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank) if (ticker.current_state == GAME_STATE_PLAYING) var/obj/item/device/radio/intercom/a = new /obj/item/device/radio/intercom(null)// BS12 EDIT Arrivals Announcement Computer, rather than the AI.