Merge pull request #3492 from Citadel-Station-13/upstream-merge-31780

[MIRROR] Disentangles blob from blob mode/removes blob mode
This commit is contained in:
LetterJay
2017-10-22 16:39:35 -04:00
committed by GitHub
15 changed files with 110 additions and 253 deletions
+2 -8
View File
@@ -594,19 +594,13 @@
for(var/mob/camera/blob/B in GLOB.mob_list)
blob_minds |= B.mind
if(istype(SSticker.mode, /datum/game_mode/blob) || blob_minds.len)
dat += "<br><table cellspacing=5><tr><td><B>Blob</B></td><td></td><td></td></tr>"
if(istype(SSticker.mode, /datum/game_mode/blob))
var/datum/game_mode/blob/mode = SSticker.mode
blob_minds |= mode.blob_overminds
dat += "<tr><td><i>Progress: [GLOB.blobs_legit.len]/[mode.blobwincount]</i></td></tr>"
for(var/datum/mind/blob in blob_minds)
var/mob/M = blob.current
var/mob/camera/blob/M = blob.current
if(M)
dat += "<tr><td><a href='?_src_=holder;[HrefToken()];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == DEAD ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
dat += "<td><A href='?_src_=holder;[HrefToken()];adminplayerobservefollow=\ref[M]'>FLW</a></td></tr>"
dat += "<tr><td><i>Progress: [M.blobs_legit.len]/[M.blobwincount]</i></td></tr>"
else
dat += "<tr><td><a href='?_src_=vars;[HrefToken()];Vars=\ref[blob]'>[blob.name]([blob.key])</a><i>Blob not found!</i></td>"
dat += "<td><A href='?priv_msg=[blob.key]'>PM</A></td></tr>"
+1 -4
View File
@@ -262,10 +262,7 @@ GLOBAL_PROTECT(LastAdminCalledProc)
if(ishuman(M))
log_admin("[key_name(src)] has blobized [M.key].")
var/mob/living/carbon/human/H = M
spawn(0)
var/mob/camera/blob/B = H.become_overmind(FALSE)
B.place_blob_core(B.base_point_rate, -1) //place them wherever they are
H.become_overmind()
else
alert("Invalid mob")
+29 -38
View File
@@ -1,38 +1,29 @@
/datum/round_event_control/blob
name = "Blob"
typepath = /datum/round_event/ghost_role/blob
weight = 5
max_occurrences = 1
min_players = 20
earliest_start = 18000 //30 minutes
gamemode_blacklist = list("blob") //Just in case a blob survives that long
/datum/round_event/ghost_role/blob
announceWhen = 12
role_name = "blob overmind"
var/new_rate = 2
/datum/round_event/ghost_role/blob/New(my_processing = TRUE, set_point_rate)
..()
if(set_point_rate)
new_rate = set_point_rate
/datum/round_event/ghost_role/blob/announce()
priority_announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/ai/outbreak5.ogg')
/datum/round_event/ghost_role/blob/spawn_role()
if(!GLOB.blobstart.len)
return MAP_ERROR
var/list/candidates = get_candidates("blob", null, ROLE_BLOB)
if(!candidates.len)
return NOT_ENOUGH_PLAYERS
var/mob/dead/observer/new_blob = pick(candidates)
var/obj/structure/blob/core/BC = new/obj/structure/blob/core(pick(GLOB.blobstart), new_blob.client, new_rate)
BC.overmind.blob_points = min(20 + GLOB.player_list.len, BC.overmind.max_blob_points)
spawned_mobs += BC.overmind
message_admins("[key_name_admin(BC.overmind)] has been made into a blob overmind by an event.")
log_game("[key_name(BC.overmind)] was spawned as a blob overmind by an event.")
return SUCCESSFUL_SPAWN
/datum/round_event_control/blob
name = "Blob"
typepath = /datum/round_event/ghost_role/blob
weight = 10
max_occurrences = 1
min_players = 20
gamemode_blacklist = list("blob") //Just in case a blob survives that long
/datum/round_event/ghost_role/blob
announceWhen = 12
role_name = "blob overmind"
/datum/round_event/ghost_role/blob/announce()
priority_announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/ai/outbreak5.ogg')
/datum/round_event/ghost_role/blob/spawn_role()
if(!GLOB.blobstart.len)
return MAP_ERROR
var/list/candidates = get_candidates("blob", null, ROLE_BLOB)
if(!candidates.len)
return NOT_ENOUGH_PLAYERS
var/mob/dead/observer/new_blob = pick(candidates)
var/mob/camera/blob/BC = new_blob.become_overmind()
spawned_mobs += BC
message_admins("[key_name_admin(BC)] has been made into a blob overmind by an event.")
log_game("[key_name(BC)] was spawned as a blob overmind by an event.")
return SUCCESSFUL_SPAWN
@@ -305,15 +305,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/is_active()
return 0
/mob/dead/observer/Stat()
..()
if(statpanel("Status"))
if(SSticker.HasRoundStarted())
if(istype(SSticker.mode, /datum/game_mode/blob))
var/datum/game_mode/blob/B = SSticker.mode
if(B.message_sent)
stat(null, "Blobs to Blob Win: [GLOB.blobs_legit.len]/[B.blobwincount]")
/mob/dead/observer/verb/reenter_corpse()
set category = "Ghost"
set name = "Re-enter Corpse"
+1 -11
View File
@@ -196,7 +196,7 @@
M.pass_flags &= ~PASSMOB
now_pushing = 0
if(!move_failed)
return 1
@@ -780,16 +780,6 @@
/mob/living/proc/get_standard_pixel_y_offset(lying = 0)
return initial(pixel_y)
/mob/living/Stat()
..()
if(statpanel("Status"))
if(SSticker && SSticker.mode)
if(istype(SSticker.mode, /datum/game_mode/blob))
var/datum/game_mode/blob/B = SSticker.mode
if(B.message_sent)
stat(null, "Blobs to Blob Win: [GLOB.blobs_legit.len]/[B.blobwincount]")
/mob/living/cancel_camera()
..()
cameraFollow = null
+2 -2
View File
@@ -462,8 +462,8 @@
. = new_slime
qdel(src)
/mob/proc/become_overmind(mode_made, starting_points = 60)
var/mob/camera/blob/B = new /mob/camera/blob(loc, 0, mode_made, starting_points)
/mob/proc/become_overmind(starting_points = 60)
var/mob/camera/blob/B = new /mob/camera/blob(loc, starting_points)
if(mind)
mind.transfer_to(B)
else