First commit for nations gamemode, setting up the framework I'll be using.

This commit is contained in:
ZomgPonies
2014-05-26 20:02:20 -04:00
parent 36af7c4ba2
commit 3c9dbcc822
5 changed files with 88 additions and 1 deletions
+7
View File
@@ -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.
+49
View File
@@ -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))
+13
View File
@@ -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'
+17
View File
@@ -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
+2 -1
View File
@@ -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.