mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-27 18:51:53 +00:00
Blob Mode Major Overhaul
This commit is contained in:
@@ -10,21 +10,23 @@ var/list/blob_nodes = list()
|
||||
name = "blob"
|
||||
config_tag = "blob"
|
||||
|
||||
required_players = 15
|
||||
required_players_secret = 15
|
||||
required_players = 30
|
||||
required_players_secret = 30
|
||||
required_enemies = 1
|
||||
recommended_enemies = 1
|
||||
restricted_jobs = list("Cyborg", "AI")
|
||||
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
|
||||
|
||||
var/declared = 0
|
||||
var/burst = 0
|
||||
|
||||
var/cores_to_spawn = 1
|
||||
var/players_per_core = 20
|
||||
var/players_per_core = 30
|
||||
var/blob_point_rate = 3
|
||||
|
||||
var/blobwincount = 700
|
||||
var/stage_2_threshold = 0.60
|
||||
var/blobwincount = 350
|
||||
|
||||
var/list/infected_crew = list()
|
||||
|
||||
@@ -56,12 +58,37 @@ var/list/blob_nodes = list()
|
||||
|
||||
return 1
|
||||
|
||||
/datum/game_mode/blob/proc/get_nuke_code()
|
||||
var/nukecode = "ERROR"
|
||||
for(var/obj/machinery/nuclearbomb/bomb in world)
|
||||
if(bomb && bomb.r_code && (bomb.z in config.station_levels))
|
||||
nukecode = bomb.r_code
|
||||
return nukecode
|
||||
/datum/game_mode/blob/proc/get_blob_candidates()
|
||||
var/list/candidates = list()
|
||||
for(var/mob/living/carbon/human/player in player_list)
|
||||
if(!player.stat && player.mind && !player.mind.special_role && !jobban_isbanned(player, "Syndicate") && (player.client.prefs.be_special & BE_BLOB))
|
||||
candidates += player
|
||||
return candidates
|
||||
|
||||
|
||||
/datum/game_mode/blob/proc/blobize(var/mob/living/carbon/human/blob)
|
||||
var/datum/mind/blobmind = blob.mind
|
||||
if(!istype(blobmind))
|
||||
return 0
|
||||
infected_crew += blobmind
|
||||
blobmind.special_role = "Blob"
|
||||
log_game("[blob.key] (ckey) has been selected as a Blob")
|
||||
greet_blob(blobmind)
|
||||
blob << "<span class='userdanger'>You feel very tired and bloated! You don't have long before you burst!</span>"
|
||||
spawn(600)
|
||||
burst_blob(blobmind)
|
||||
return 1
|
||||
|
||||
/datum/game_mode/blob/proc/make_blobs(var/count)
|
||||
var/list/candidates = get_blob_candidates()
|
||||
var/mob/living/carbon/human/blob = null
|
||||
count=min(count, candidates.len)
|
||||
for(var/i = 0, i < count, i++)
|
||||
blob = pick(candidates)
|
||||
candidates -= blob
|
||||
blobize(blob)
|
||||
return count
|
||||
|
||||
|
||||
|
||||
/datum/game_mode/blob/announce()
|
||||
@@ -71,7 +98,7 @@ var/list/blob_nodes = list()
|
||||
|
||||
|
||||
/datum/game_mode/blob/proc/greet_blob(var/datum/mind/blob)
|
||||
blob.current << "<B>\red You are infected by the Blob!</B>"
|
||||
blob.current << "<span class='userdanger'>You are infected by the Blob!</span>"
|
||||
blob.current << "<b>Your body is ready to give spawn to a new blob core which will eat this station.</b>"
|
||||
blob.current << "<b>Find a good location to spawn the core and then take control and overwhelm the station!</b>"
|
||||
blob.current << "<b>When you have found a location, wait until you spawn; this will happen automatically and you cannot speed up the process.</b>"
|
||||
@@ -84,27 +111,40 @@ var/list/blob_nodes = list()
|
||||
|
||||
/datum/game_mode/blob/proc/burst_blobs()
|
||||
for(var/datum/mind/blob in infected_crew)
|
||||
burst_blob(blob)
|
||||
|
||||
var/client/blob_client = null
|
||||
var/turf/location = null
|
||||
/datum/game_mode/blob/proc/burst_blob(var/datum/mind/blob, var/warned=0)
|
||||
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 in config.station_levels) || istype(location, /turf/space))
|
||||
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 != ZLEVEL_STATION || istype(location, /turf/space))
|
||||
if(!warned)
|
||||
C << "<span class='userdanger'>You feel ready to burst, but this isn't an appropriate place! You must return to the station!</span>"
|
||||
message_admins("[key_name(C)] was in space when the blobs burst, and will die if he doesn't return to the station.")
|
||||
spawn(300)
|
||||
burst_blob(blob, 1)
|
||||
else
|
||||
burst ++
|
||||
log_admin("[key_name(C)] was in space when attempting to burst as a blob.")
|
||||
message_admins("[key_name(C)] was in space when attempting to burst as a blob.")
|
||||
C.gib()
|
||||
make_blobs(1)
|
||||
check_finished() //Still needed in case we can't make any blobs
|
||||
|
||||
else if(blob_client && location)
|
||||
burst ++
|
||||
C.gib()
|
||||
|
||||
|
||||
if(blob_client && location)
|
||||
var/obj/effect/blob/core/core = new(location, 200, blob_client, blob_point_rate)
|
||||
if(core.overmind && core.overmind.mind)
|
||||
core.overmind.mind.name = blob.name
|
||||
infected_crew -= blob
|
||||
infected_crew += core.overmind.mind
|
||||
|
||||
var/obj/effect/blob/core/core = new(location, 200, blob_client, blob_point_rate)
|
||||
if(core.overmind && core.overmind.mind)
|
||||
core.overmind.mind.name = blob.name
|
||||
infected_crew -= blob
|
||||
infected_crew += core.overmind.mind
|
||||
core.overmind.mind.special_role = "Blob Overmind"
|
||||
|
||||
/datum/game_mode/blob/post_setup()
|
||||
|
||||
@@ -114,18 +154,6 @@ var/list/blob_nodes = list()
|
||||
if(emergency_shuttle)
|
||||
emergency_shuttle.auto_recall = 1
|
||||
|
||||
/*// Disable the blob event for this round.
|
||||
if(events)
|
||||
var/datum/round_event_control/blob/B = locate() in events.control
|
||||
if(B)
|
||||
B.max_occurrences = 0 // disable the event
|
||||
else
|
||||
error("Events variable is null in blob gamemode post setup.")*/
|
||||
|
||||
spawn(10)
|
||||
start_state = new /datum/station_state()
|
||||
start_state.count()
|
||||
|
||||
spawn(0)
|
||||
|
||||
var/wait_time = rand(waittime_l, waittime_h)
|
||||
@@ -136,30 +164,29 @@ var/list/blob_nodes = list()
|
||||
|
||||
sleep(100)
|
||||
|
||||
show_message("<span class='alert'>You feel tired and bloated.</span>")
|
||||
show_message("<span class='userdanger'>You feel tired and bloated.</span>")
|
||||
|
||||
sleep(wait_time)
|
||||
|
||||
show_message("<span class='alert'>You feel like you are about to burst.</span>")
|
||||
show_message("<span class='userdanger'>You feel like you are about to burst.</span>")
|
||||
|
||||
sleep(wait_time / 2)
|
||||
|
||||
burst_blobs()
|
||||
|
||||
// Stage 0
|
||||
sleep(40)
|
||||
sleep(wait_time)
|
||||
stage(0)
|
||||
|
||||
// Stage 1
|
||||
sleep(2000)
|
||||
sleep(wait_time)
|
||||
stage(1)
|
||||
|
||||
// Stage 2
|
||||
while(blobs.len < blobwincount*stage_2_threshold)
|
||||
sleep(10)
|
||||
sleep(30000)
|
||||
stage(2)
|
||||
|
||||
..()
|
||||
return ..(0)
|
||||
|
||||
/datum/game_mode/blob/proc/stage(var/stage)
|
||||
|
||||
@@ -167,27 +194,11 @@ var/list/blob_nodes = list()
|
||||
if (0)
|
||||
send_intercept(1)
|
||||
declared = 1
|
||||
for (var/mob/living/silicon/ai/aiPlayer in player_list)
|
||||
if (aiPlayer.client)
|
||||
var/law = "The station is under quarantine, prevent biological entities from leaving the station at all costs while minimizing collateral damage."
|
||||
aiPlayer.set_zeroth_law(law)
|
||||
aiPlayer << "\red <b>You have detected a change in your laws information:</b>"
|
||||
aiPlayer << "Laws Updated: [law]"
|
||||
return
|
||||
|
||||
if (1)
|
||||
command_announcement.Announce("Nanotrasen has issued a directive 7-10 for [station_name()]. The station is to be considered quarantined.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
|
||||
return
|
||||
command_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/AI/outbreak5.ogg')
|
||||
|
||||
if (2)
|
||||
command_announcement.Announce("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [get_nuke_code()] ", "Biohazard Alert", new_sound = 'sound/effects/siren.ogg')
|
||||
set_security_level("gamma")
|
||||
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
|
||||
if(V && (V.z in config.station_levels))
|
||||
V.locked = 0
|
||||
V.update_icon()
|
||||
send_intercept(2)
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user