mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
New respawn system is in yay!
This commit is contained in:
@@ -247,7 +247,7 @@
|
||||
new_slime.key = key
|
||||
|
||||
new_slime << "<B>You are now a slime!</B>"
|
||||
|
||||
/*
|
||||
if(new_slime.client)
|
||||
if(babies.len)
|
||||
var/list/candidates = get_active_candidates()
|
||||
@@ -261,7 +261,7 @@
|
||||
|
||||
|
||||
else
|
||||
new_slime << "<i>You're an only child!</i>"
|
||||
new_slime << "<i>You're an only child!</i>"*/
|
||||
else
|
||||
src << "<i>I am not ready to reproduce yet...</i>"
|
||||
else
|
||||
|
||||
@@ -287,7 +287,7 @@ proc/isInSight(var/atom/A, var/atom/B)
|
||||
var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
|
||||
var/i = 0
|
||||
while(candidates.len <= 0 && i < 5)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(((G.client.inactivity/10)/60) <= buffer + i) // the most active players are more likely to become an alien
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G.key
|
||||
@@ -301,7 +301,7 @@ proc/isInSight(var/atom/A, var/atom/B)
|
||||
var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
|
||||
var/i = 0
|
||||
while(candidates.len <= 0 && i < 5)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(G.client.prefs.be_special & BE_ALIEN)
|
||||
if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
@@ -311,7 +311,7 @@ proc/isInSight(var/atom/A, var/atom/B)
|
||||
|
||||
proc/get_candidates(be_special_flag=0)
|
||||
. = list()
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
if(!G.client.is_afk() && (G.client.prefs.be_special & be_special_flag))
|
||||
. += G.client
|
||||
|
||||
@@ -9,6 +9,7 @@ var/global/list/player_list = list() //List of all mobs **with clients attach
|
||||
var/global/list/mob_list = list() //List of all mobs, including clientless
|
||||
var/global/list/living_mob_list = list() //List of all alive mobs, including clientless. Excludes /mob/new_player
|
||||
var/global/list/dead_mob_list = list() //List of all dead mobs, including clientless. Excludes /mob/new_player
|
||||
var/global/list/respawnable_list = list() //List of all mobs, dead or in mindless creatures that still be respawned.
|
||||
|
||||
var/global/list/portals = list() //for use by portals
|
||||
var/global/list/cable_list = list() //Index for all cables, so that powernets don't have to look through the entire world all the time
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
C = new_overmind
|
||||
|
||||
if(C)
|
||||
respawnable_list -= C
|
||||
var/mob/camera/blob/B = new(src.loc)
|
||||
B.key = C.key
|
||||
B.blob_core = src
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
|
||||
new_xeno.key = candidate
|
||||
|
||||
respawnable_list -= candidate
|
||||
candidates -= candidate
|
||||
vents -= vent
|
||||
spawncount--
|
||||
|
||||
@@ -153,7 +153,7 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
|
||||
else
|
||||
|
||||
var/list/candidates = list() //list of candidate keys
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(G.client && !G.client.holder && !G.client.is_afk() && G.client.prefs.be_special & BE_NINJA)
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G
|
||||
|
||||
@@ -91,7 +91,7 @@ Growing it to term with nothing injected will grab a ghost from the observers. *
|
||||
return
|
||||
|
||||
/obj/item/seeds/replicapod/proc/request_player()
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
for(var/mob/O in respawnable_list)
|
||||
if(O.client)
|
||||
if(O.client.prefs.be_special & BE_PLANT)
|
||||
question(O.client)
|
||||
@@ -110,9 +110,8 @@ Growing it to term with nothing injected will grab a ghost from the observers. *
|
||||
/obj/item/seeds/replicapod/proc/transfer_personality(var/client/player)
|
||||
|
||||
if(!player) return
|
||||
|
||||
respawnable_list -= player
|
||||
found_player = 1
|
||||
|
||||
var/mob/living/carbon/monkey/diona/podman = new(parent.loc)
|
||||
podman.ckey = player.ckey
|
||||
|
||||
|
||||
@@ -146,11 +146,11 @@ client/proc/one_click_antag()
|
||||
return 0
|
||||
|
||||
/datum/admins/proc/makeWizard()
|
||||
var/list/mob/dead/observer/candidates = list()
|
||||
var/mob/dead/observer/theghost = null
|
||||
var/list/mob/candidates = list()
|
||||
var/mob/theghost = null
|
||||
var/time_passed = world.time
|
||||
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
|
||||
spawn(0)
|
||||
switch(alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No"))
|
||||
@@ -216,11 +216,11 @@ client/proc/one_click_antag()
|
||||
|
||||
/datum/admins/proc/makeNukeTeam()
|
||||
|
||||
var/list/mob/dead/observer/candidates = list()
|
||||
var/mob/dead/observer/theghost = null
|
||||
var/list/mob/candidates = list()
|
||||
var/mob/theghost = null
|
||||
var/time_passed = world.time
|
||||
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(!jobban_isbanned(G, "operative") && !jobban_isbanned(G, "Syndicate"))
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for a nuke team being sent in?","Please answer in 30 seconds!","Yes","No"))
|
||||
@@ -315,8 +315,8 @@ client/proc/one_click_antag()
|
||||
return 1
|
||||
|
||||
/datum/admins/proc/makeDeathsquad()
|
||||
var/list/mob/dead/observer/candidates = list()
|
||||
var/mob/dead/observer/theghost = null
|
||||
var/list/mob/candidates = list()
|
||||
var/mob/theghost = null
|
||||
var/time_passed = world.time
|
||||
var/input = "Purify the station."
|
||||
if(prob(10))
|
||||
@@ -325,7 +325,7 @@ client/proc/one_click_antag()
|
||||
var/syndicate_leader_selected = 0 //when the leader is chosen. The last person spawned.
|
||||
|
||||
//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos.
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
for(var/mob/G in respawnable_list)
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for an elite syndicate strike team being sent in?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
@@ -434,15 +434,15 @@ client/proc/one_click_antag()
|
||||
|
||||
/datum/admins/proc/makeVoxRaiders()
|
||||
|
||||
var/list/mob/dead/observer/candidates = list()
|
||||
var/mob/dead/observer/theghost = null
|
||||
var/list/mob/candidates = list()
|
||||
var/mob/theghost = null
|
||||
var/time_passed = world.time
|
||||
var/input = "Disregard shinies, acquire hardware."
|
||||
|
||||
var/leader_chosen = 0 //when the leader is chosen. The last person spawned.
|
||||
|
||||
//Generates a list of candidates from active ghosts.
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
for(var/mob/G in respawnable_list)
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for a vox raiding party arriving on the station?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
|
||||
@@ -31,9 +31,10 @@
|
||||
while(spawncount > 0 && vents.len && candidates.len)
|
||||
var/obj/vent = pick_n_take(vents)
|
||||
var/client/C = pick_n_take(candidates)
|
||||
if(C)
|
||||
respawnable_list -= C
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
|
||||
new_xeno.key = C.key
|
||||
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
|
||||
new_xeno.key = C.key
|
||||
|
||||
spawncount--
|
||||
successSpawn = 1
|
||||
spawncount--
|
||||
successSpawn = 1
|
||||
@@ -91,11 +91,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(stat == DEAD)
|
||||
resting = 1
|
||||
ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly.
|
||||
respawnable_list -= src
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/dead/observer/Move(NewLoc, direct)
|
||||
dir = direct
|
||||
if(NewLoc)
|
||||
@@ -146,6 +146,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set category = "Ghost"
|
||||
set name = "Re-enter Corpse"
|
||||
if(!client) return
|
||||
if(!can_reenter_corpse)
|
||||
src << "<span class='warning'>You've given up your right to respawn!</span>"
|
||||
return
|
||||
if(!(mind && mind.current && can_reenter_corpse))
|
||||
src << "<span class='warning'>You have no body.</span>"
|
||||
return
|
||||
@@ -273,7 +276,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
/mob/dead/observer/verb/become_mouse()
|
||||
set name = "Become mouse"
|
||||
set category = "Ghost"
|
||||
set category = "OOC"
|
||||
|
||||
var/timedifference = world.time - client.time_died_as_mouse
|
||||
if(client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600)
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
gibs(loc, viruses, dna)
|
||||
|
||||
dead_mob_list -= src
|
||||
if(client)
|
||||
respawnable_list += src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
@@ -42,6 +44,8 @@
|
||||
new /obj/effect/decal/cleanable/ash(loc)
|
||||
|
||||
dead_mob_list -= src
|
||||
if(client)
|
||||
respawnable_list += src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
@@ -52,4 +56,6 @@
|
||||
|
||||
living_mob_list -= src
|
||||
dead_mob_list += src
|
||||
if(client)
|
||||
respawnable_list += src
|
||||
return ..(gibbed)
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
spawn(6)
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc)
|
||||
new_xeno.key = picked
|
||||
respawnable_list -= picked
|
||||
new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100) //To get the player's attention
|
||||
if(gib_on_success)
|
||||
affected_mob.gib()
|
||||
|
||||
@@ -643,3 +643,59 @@
|
||||
CM.legcuffed.loc = usr.loc
|
||||
CM.legcuffed = null
|
||||
CM.update_inv_legcuffed()
|
||||
|
||||
|
||||
/mob/living/verb/respawn()
|
||||
set name = "Respawn as Mindless"
|
||||
set category = "OOC"
|
||||
|
||||
if(usr in respawnable_list)
|
||||
var/list/creatures = list("Mouse")
|
||||
for(var/mob/living/simple_animal/S in living_mob_list)
|
||||
if(safe_animal(S.type))
|
||||
if(!S.key)
|
||||
creatures += S
|
||||
var/picked = input("Please select a creature to respawn as", "Respawn as Mindless Creature") as null|anything in creatures
|
||||
switch(picked)
|
||||
if("Mouse")
|
||||
become_mouse()
|
||||
else
|
||||
var/mob/living/simple_animal/picked_animal = picked
|
||||
if(istype(picked_animal) && !picked_animal.key)
|
||||
picked_animal.key = key
|
||||
else
|
||||
message_admins("Failed to check type")
|
||||
else
|
||||
usr << "You are not dead or you have given up your right to be respawned!"
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/verb/become_mouse()
|
||||
if(usr in respawnable_list)
|
||||
var/timedifference = world.time - client.time_died_as_mouse
|
||||
if(client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600)
|
||||
var/timedifference_text
|
||||
timedifference_text = time2text(mouse_respawn_time * 600 - timedifference,"mm:ss")
|
||||
src << "<span class='warning'>You may only spawn again as a mouse more than [mouse_respawn_time] minutes after your death. You have [timedifference_text] left.</span>"
|
||||
return
|
||||
|
||||
//find a viable mouse candidate
|
||||
var/mob/living/simple_animal/mouse/host
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
||||
var/list/found_vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in world)
|
||||
if(!v.welded && v.z == src.z)
|
||||
found_vents.Add(v)
|
||||
if(found_vents.len)
|
||||
vent_found = pick(found_vents)
|
||||
host = new /mob/living/simple_animal/mouse(vent_found.loc)
|
||||
else
|
||||
src << "<span class='warning'>Unable to find any unwelded vents to spawn mice at.</span>"
|
||||
|
||||
if(host)
|
||||
host.ckey = src.ckey
|
||||
host << "<span class='info'>You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.</span>"
|
||||
else
|
||||
usr << "You are not dead or you have given up your right to be respawned!"
|
||||
return
|
||||
|
||||
@@ -426,6 +426,8 @@
|
||||
/mob/living/simple_animal/proc/Die()
|
||||
living_mob_list -= src
|
||||
dead_mob_list += src
|
||||
if(key)
|
||||
respawnable_list += src
|
||||
icon_state = icon_dead
|
||||
stat = DEAD
|
||||
density = 0
|
||||
|
||||
@@ -331,7 +331,7 @@ var/list/slot_equipment_priority = list( \
|
||||
src << browse('html/help.html', "window=help")
|
||||
return
|
||||
*/
|
||||
|
||||
/*
|
||||
/mob/verb/abandon_mob()
|
||||
set name = "Respawn"
|
||||
set category = "OOC"
|
||||
@@ -384,7 +384,7 @@ var/list/slot_equipment_priority = list( \
|
||||
M.key = key
|
||||
// M.Login() //wat
|
||||
return
|
||||
|
||||
*/
|
||||
/mob/verb/observe()
|
||||
set name = "Observe"
|
||||
set category = "OOC"
|
||||
|
||||
+7234
-7234
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user