From 1fb9227f773e3053f846212dc59baf6c5da36795 Mon Sep 17 00:00:00 2001 From: Giacomand Date: Sun, 21 Jul 2013 15:13:43 +0100 Subject: [PATCH] Blob/AI cameras can now be followed by ghosts. Added the blob to the check antagonists, displaying how many blobs are left to win and being able to show the player panel for the blob. Gave overminds mind datums which will initialize to give the overmind a blob special role. Re-worded the BE ALIEN candidate so that it is more abstract and could mean becoming a blob. Added another message for when the infected crew is about to burst into a blob. EMPs will now hurt the blob. Fixed blob spores blocking the blob from expanding. Nodes will also slowly recharge their health. Gave a little bit of health to normal blobs so that lasers don't one shot them anymore, barely. --- code/__DEFINES.dm | 4 +- code/__HELPERS/unsorted.dm | 2 + code/datums/mind.dm | 10 +++- code/game/gamemodes/blob/blob.dm | 61 ++++++++++++++--------- code/game/gamemodes/blob/blobs/core.dm | 9 ---- code/game/gamemodes/blob/blobs/factory.dm | 5 ++ code/game/gamemodes/blob/blobs/node.dm | 1 + code/game/gamemodes/blob/overmind.dm | 13 +++++ code/game/gamemodes/blob/theblob.dm | 4 +- code/modules/admin/player_panel.dm | 14 ++++++ code/modules/client/preferences.dm | 8 +-- code/modules/mob/living/login.dm | 3 +- 12 files changed, 91 insertions(+), 43 deletions(-) diff --git a/code/__DEFINES.dm b/code/__DEFINES.dm index 399f4ade816..3c076d306ca 100644 --- a/code/__DEFINES.dm +++ b/code/__DEFINES.dm @@ -425,7 +425,7 @@ var/list/be_special_flags = list( "Wizard" = BE_WIZARD, "Malf AI" = BE_MALF, "Revolutionary" = BE_REV, - "Xenomorph" = BE_ALIEN, + "Alien Lifeform" = BE_ALIEN, "pAI" = BE_PAI, "Cultist" = BE_CULTIST, "Monkey" = BE_MONKEY, @@ -467,4 +467,4 @@ var/list/be_special_flags = list( #define TR_KEEPIMPLANTS 16 #define TR_KEEPSE 32 // changelings shouldn't edit the DNA's SE when turning into a monkey #define TR_DEFAULTMSG 64 -#define TR_KEEPSRC 128 +#define TR_KEEPSRC 128 diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 846c35b171b..a3cbab08d33 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -417,6 +417,8 @@ Turf and target are seperate in case you want to teleport some distance from a t var/list/sortmob = sortAtom(mob_list) for(var/mob/living/silicon/ai/M in sortmob) moblist.Add(M) + for(var/mob/camera/M in sortmob) + moblist.Add(M) for(var/mob/living/silicon/pai/M in sortmob) moblist.Add(M) for(var/mob/living/silicon/robot/M in sortmob) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 7dbf2e2f9df..6aeb278db91 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -1110,9 +1110,12 @@ datum/mind fail |= !ticker.mode.equip_revolutionary(current) +/mob/proc/sync_mind() + mind_initialize() //updates the mind (or creates and initializes one if one doesn't exist) + mind.active = 1 //indicates that the mind is currently synced with a client //Initialisation procs -/mob/living/proc/mind_initialize() +/mob/proc/mind_initialize() if(mind) mind.key = key @@ -1180,6 +1183,11 @@ datum/mind mind.assigned_role = "pAI" mind.special_role = "" +//BLOB +/mob/camera/overmind/mind_initialize() + ..() + mind.special_role = "Blob" + //Animals /mob/living/simple_animal/mind_initialize() ..() diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index 8e172bca70d..5271378738a 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -22,7 +22,6 @@ var/list/blob_nodes = list() var/cores_to_spawn = 1 var/players_per_core = 30 - var/blob_count = 0 var/blobwincount = 500 var/list/infected_crew = list() @@ -69,6 +68,34 @@ var/list/blob_nodes = list() blob.current << "If you go outside of the station level, or in space, then you will die; make sure your location has lots of ground to cover." return +/datum/game_mode/blob/proc/show_message(var/message) + for(var/datum/mind/blob in infected_crew) + blob.current << message + +/datum/game_mode/blob/proc/burst_blobs() + for(var/datum/mind/blob in infected_crew) + + var/client/blob_client = null + var/turf/location = null + + if(iscarbon(blob.current)) + var/mob/living/carbon/C = blob.current + if(directory[ckey(blob.key)]) + blob_client = directory[ckey(blob.key)] + location = get_turf(C) + if(location.z != 1 || istype(location, /turf/space)) + location = null + C.gib() + + + if(blob_client && location) + var/obj/effect/blob/core/core = new(location, 200, blob_client, 2) + if(core.overmind && core.overmind.mind) + core.overmind.mind.name = blob.name + infected_crew -= blob + infected_crew += core.overmind.mind + + /datum/game_mode/blob/post_setup() for(var/datum/mind/blob in infected_crew) @@ -91,42 +118,30 @@ var/list/blob_nodes = list() spawn(0) - sleep(rand(waittime_l, waittime_h)) + var/wait_time = rand(waittime_l, waittime_h) + + sleep(wait_time) send_intercept(0) + sleep(100) - sleep(rand(waittime_l, waittime_h)) + show_message("You feel tired and bloated.") - for(var/datum/mind/blob in infected_crew) - blob.current << "You feel like you are about to burst." + sleep(wait_time) - sleep(rand(waittime_l, waittime_h)) + show_message("You feel like you are about to burst.") - for(var/datum/mind/blob in infected_crew) + sleep(wait_time / 2) - var/client/blob_client = null - var/turf/location = null - - if(iscarbon(blob.current)) - var/mob/living/carbon/C = blob.current - if(directory[ckey(blob.key)]) - blob_client = directory[ckey(blob.key)] - location = get_turf(C) - if(location.z != 1 || istype(location, /turf/space)) - location = null - C.gib() - - - if(blob_client && location) - new /obj/effect/blob/core(location, 200, blob_client, 2) + burst_blobs() // Stage 0 sleep(40) stage(0) // Stage 1 - sleep(4000) + sleep(2000) stage(1) ..() diff --git a/code/game/gamemodes/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm index 29c82fe66d4..8f403e32f4f 100644 --- a/code/game/gamemodes/blob/blobs/core.dm +++ b/code/game/gamemodes/blob/blobs/core.dm @@ -84,15 +84,6 @@ B.key = C.key B.blob_core = src src.overmind = B - - B << "You are the overmind!" - B << "You are the overmind and can control the blob by placing new blob pieces such as..." - B << "Normal Blob will expand your reach and allow you to upgrade into special blobs that perform certain functions." - B << "Shield Blob is a strong and expensive blob which can take more damage. It is fireproof and can block air, use this to protect yourself from station fires." - B << "Resource Blob is a blob which will collect more resources for you, try to build these earlier to get a strong income. It will benefit from being near your core or multiple nodes, by having an increased resource rate; put it alone and it won't create resources at all." - B << "Node Blob is a blob which will grow, like the core. Unlike the core it won't give you a small income but it can power resource and factory blobs to increase their rate." - B << "Factory Blob is a blob which will spawn blob spores which will attack nearby food. Putting this nearby nodes and your core will increase the spawn rate; put it alone and it will not spawn any spores." - return 1 return 0 diff --git a/code/game/gamemodes/blob/blobs/factory.dm b/code/game/gamemodes/blob/blobs/factory.dm index d379146f265..873c696200a 100644 --- a/code/game/gamemodes/blob/blobs/factory.dm +++ b/code/game/gamemodes/blob/blobs/factory.dm @@ -59,6 +59,11 @@ blob_act() return + CanPass(atom/movable/mover, turf/target, height=0, air_group=0) + if(istype(mover, /obj/effect/blob)) + return 1 + return ..() + New(loc, var/obj/effect/blob/factory/linked_node) if(istype(linked_node)) factory = linked_node diff --git a/code/game/gamemodes/blob/blobs/node.dm b/code/game/gamemodes/blob/blobs/node.dm index 6057b0d701f..b4d9add7983 100644 --- a/code/game/gamemodes/blob/blobs/node.dm +++ b/code/game/gamemodes/blob/blobs/node.dm @@ -23,6 +23,7 @@ Life() for(var/i = 1; i < 8; i += i) Pulse(5, i) + health = min(initial(health), health + 1) update_icon() if(health <= 0) diff --git a/code/game/gamemodes/blob/overmind.dm b/code/game/gamemodes/blob/overmind.dm index 6f7312e629b..828c3b86e4e 100644 --- a/code/game/gamemodes/blob/overmind.dm +++ b/code/game/gamemodes/blob/overmind.dm @@ -21,6 +21,19 @@ real_name = new_name ..() +/mob/camera/blob/Login() + ..() + sync_mind() + + src << "You are the overmind!" + src << "You are the overmind and can control the blob by placing new blob pieces such as..." + src << "Normal Blob will expand your reach and allow you to upgrade into special blobs that perform certain functions." + src << "Shield Blob is a strong and expensive blob which can take more damage. It is fireproof and can block air, use this to protect yourself from station fires." + src << "Resource Blob is a blob which will collect more resources for you, try to build these earlier to get a strong income. It will benefit from being near your core or multiple nodes, by having an increased resource rate; put it alone and it won't create resources at all." + src << "Node Blob is a blob which will grow, like the core. Unlike the core it won't give you a small income but it can power resource and factory blobs to increase their rate." + src << "Factory Blob is a blob which will spawn blob spores which will attack nearby food. Putting this nearby nodes and your core will increase the spawn rate; put it alone and it will not spawn any spores." + + mob/camera/blob/Life() hud_used.blobpwrdisplay.maptext = "
[src.blob_points]
" hud_used.blobhealthdisplay.maptext = "
[blob_core.health]
" diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index 0c257095560..cd8b537e2b3 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -153,7 +153,7 @@ /obj/effect/blob/normal icon_state = "blob" luminosity = 0 - health = 20 + health = 21 Delete() src.loc = null @@ -166,4 +166,4 @@ return if(health <= 15) icon_state = "blob_damaged" - return \ No newline at end of file + return diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index b126362a9ea..7734042e3f6 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -476,6 +476,20 @@ dat += "Traitor not found!" dat += "" + if(istype(ticker.mode, /datum/game_mode/blob)) + var/datum/game_mode/blob/mode = ticker.mode + dat += "
" + dat += "" + + for(var/datum/mind/blob in mode.infected_crew) + var/mob/M = blob.current + if(M) + dat += "" + dat += "" + else + dat += "" + dat += "
Blob
Progress: [blobs.len]/[mode.blobwincount]
[M.real_name][M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""]PM
Blob not found!
" + dat += "" usr << browse(dat, "window=roundstatus;size=400x500") else diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index cab7dd9c4ae..14a450937db 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -10,7 +10,7 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set "wizard" = IS_MODE_COMPILED("wizard"), // 3 "malf AI" = IS_MODE_COMPILED("malfunction"), // 4 "revolutionary" = IS_MODE_COMPILED("revolution"), // 5 - "alien candidate" = 1, //always show // 6 + "alien lifeform" = 1, //always show // 6 "pAI candidate" = 1, // -- TLE // 7 "cultist" = IS_MODE_COMPILED("cult"), // 8 "infested monkey" = IS_MODE_COMPILED("monkey"), // 9 @@ -77,7 +77,7 @@ datum/preferences // OOC Metadata: var/metadata = "" - + var/unlock_content = 0 /datum/preferences/New(client/C) @@ -212,11 +212,11 @@ datum/preferences if(unlock_content || (user.client.holder && (user.client.holder.rights & R_ADMIN))) dat += "OOC:     Change
" - + if(unlock_content) dat += "BYOND Membership Publicity: [(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"]
" dat += "Ghost Form: [ghost_form]
" - + dat += "" diff --git a/code/modules/mob/living/login.dm b/code/modules/mob/living/login.dm index d09a0ba7617..3cdd0a47f95 100644 --- a/code/modules/mob/living/login.dm +++ b/code/modules/mob/living/login.dm @@ -1,8 +1,7 @@ /mob/living/Login() ..() //Mind updates - mind_initialize() //updates the mind (or creates and initializes one if one doesn't exist) - mind.active = 1 //indicates that the mind is currently synced with a client + sync_mind() mind.show_memory(src, 0) //Round specific stuff like hud updates