Mob Initialization (#24840)

* Mob Initialization

* new_player Repath

* Fix the dme

* Fix the shit

* Fix a loc

* Fix another loc

* But, in my haste, I forgot the cola!

* Another loc

* ANOTHER LOC

* Further docs

* Where'd that s come from

* Fix shit

* Better
This commit is contained in:
Cyberboss
2017-03-13 15:21:12 -04:00
committed by AnturK
parent 29d9da3760
commit 012eaec1b9
107 changed files with 233 additions and 219 deletions
+1 -1
View File
@@ -107,7 +107,7 @@
//Misc mobs
#define isobserver(A) (istype(A, /mob/dead/observer))
#define isnewplayer(A) (istype(A, /mob/new_player))
#define isnewplayer(A) (istype(A, /mob/dead/new_player))
#define isovermind(A) (istype(A, /mob/camera/blob))
+1 -1
View File
@@ -331,7 +331,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
moblist.Add(M)
for(var/mob/dead/observer/M in sortmob)
moblist.Add(M)
for(var/mob/new_player/M in sortmob)
for(var/mob/dead/new_player/M in sortmob)
moblist.Add(M)
for(var/mob/living/carbon/monkey/M in sortmob)
moblist.Add(M)
+3 -3
View File
@@ -7,10 +7,10 @@ var/list/stealthminID = list() //reference list with IDs that store ckeys,
//Since it didn't really belong in any other category, I'm putting this here
//This is for procs to replace all the goddamn 'in world's that are chilling around the code
var/global/list/player_list = list() //all mobs **with clients attached**. Excludes /mob/new_player
var/global/list/player_list = list() //all mobs **with clients attached**. Excludes /mob/dead/new_player
var/global/list/mob_list = list() //all mobs, including clientless
var/global/list/living_mob_list = list() //all alive mobs, including clientless. Excludes /mob/new_player
var/global/list/dead_mob_list = list() //all dead mobs, including clientless. Excludes /mob/new_player
var/global/list/living_mob_list = list() //all alive mobs, including clientless. Excludes /mob/dead/new_player
var/global/list/dead_mob_list = list() //all dead mobs, including clientless. Excludes /mob/dead/new_player
var/global/list/joined_player_list = list() //all clients that have joined the game at round-start or as a latejoin.
var/global/list/silicon_mobs = list() //all silicon mobs
var/global/list/pai_list = list()
+1 -1
View File
@@ -200,5 +200,5 @@
New Players:
Have no reason to click on anything at all.
*/
/mob/new_player/ClickOn()
/mob/dead/new_player/ClickOn()
return
+17 -18
View File
@@ -68,8 +68,7 @@ var/datum/controller/subsystem/job/SSjob
SetupOccupations()
return type_occupations[jobtype]
/datum/controller/subsystem/job/proc/AssignRole(mob/new_player/player, rank, latejoin=0)
/datum/controller/subsystem/job/proc/AssignRole(mob/dead/new_player/player, rank, latejoin=0)
Debug("Running AR, Player: [player], Rank: [rank], LJ: [latejoin]")
if(player && player.mind && rank)
var/datum/job/job = GetJob(rank)
@@ -94,7 +93,7 @@ var/datum/controller/subsystem/job/SSjob
/datum/controller/subsystem/job/proc/FindOccupationCandidates(datum/job/job, level, flag)
Debug("Running FOC, Job: [job], Level: [level], Flag: [flag]")
var/list/candidates = list()
for(var/mob/new_player/player in unassigned)
for(var/mob/dead/new_player/player in unassigned)
if(jobban_isbanned(player, job.title))
Debug("FOC isbanned failed, Player: [player]")
continue
@@ -115,7 +114,7 @@ var/datum/controller/subsystem/job/SSjob
candidates += player
return candidates
/datum/controller/subsystem/job/proc/GiveRandomJob(mob/new_player/player)
/datum/controller/subsystem/job/proc/GiveRandomJob(mob/dead/new_player/player)
Debug("GRJ Giving random job, Player: [player]")
for(var/datum/job/job in shuffle(occupations))
if(!job)
@@ -151,7 +150,7 @@ var/datum/controller/subsystem/job/SSjob
break
/datum/controller/subsystem/job/proc/ResetOccupations()
for(var/mob/new_player/player in player_list)
for(var/mob/dead/new_player/player in player_list)
if((player) && (player.mind))
player.mind.assigned_role = null
player.mind.special_role = null
@@ -174,7 +173,7 @@ var/datum/controller/subsystem/job/SSjob
var/list/candidates = FindOccupationCandidates(job, level)
if(!candidates.len)
continue
var/mob/new_player/candidate = pick(candidates)
var/mob/dead/new_player/candidate = pick(candidates)
if(AssignRole(candidate, command_position))
return 1
return 0
@@ -192,7 +191,7 @@ var/datum/controller/subsystem/job/SSjob
var/list/candidates = FindOccupationCandidates(job, level)
if(!candidates.len)
continue
var/mob/new_player/candidate = pick(candidates)
var/mob/dead/new_player/candidate = pick(candidates)
AssignRole(candidate, command_position)
return
@@ -207,7 +206,7 @@ var/datum/controller/subsystem/job/SSjob
var/list/candidates = list()
candidates = FindOccupationCandidates(job, level)
if(candidates.len)
var/mob/new_player/candidate = pick(candidates)
var/mob/dead/new_player/candidate = pick(candidates)
if(AssignRole(candidate, "AI"))
ai_selected++
break
@@ -231,7 +230,7 @@ var/datum/controller/subsystem/job/SSjob
A.spawn_positions = 3
//Get the players who are ready
for(var/mob/new_player/player in player_list)
for(var/mob/dead/new_player/player in player_list)
if(player.ready && player.mind && !player.mind.assigned_role)
unassigned += player
@@ -261,7 +260,7 @@ var/datum/controller/subsystem/job/SSjob
var/datum/job/assist = new /datum/job/assistant()
var/list/assistant_candidates = FindOccupationCandidates(assist, 3)
Debug("AC1, Candidates: [assistant_candidates.len]")
for(var/mob/new_player/player in assistant_candidates)
for(var/mob/dead/new_player/player in assistant_candidates)
Debug("AC1 pass, Player: [player]")
AssignRole(player, "Assistant")
assistant_candidates -= player
@@ -292,7 +291,7 @@ var/datum/controller/subsystem/job/SSjob
CheckHeadPositions(level)
// Loop through all unassigned players
for(var/mob/new_player/player in unassigned)
for(var/mob/dead/new_player/player in unassigned)
if(PopcapReached())
RejectPlayer(player)
@@ -330,13 +329,13 @@ var/datum/controller/subsystem/job/SSjob
// Hand out random jobs to the people who didn't get any in the last check
// Also makes sure that they got their preference correct
for(var/mob/new_player/player in unassigned)
for(var/mob/dead/new_player/player in unassigned)
if(PopcapReached())
RejectPlayer(player)
else if(jobban_isbanned(player, "Assistant"))
GiveRandomJob(player) //you get to roll for random before everyone else just to be sure you don't get assistant. you're so speshul
for(var/mob/new_player/player in unassigned)
for(var/mob/dead/new_player/player in unassigned)
if(PopcapReached())
RejectPlayer(player)
else if(player.client.prefs.joblessrole == BERANDOMJOB)
@@ -347,7 +346,7 @@ var/datum/controller/subsystem/job/SSjob
Debug("DO, Running AC2")
// For those who wanted to be assistant if their preferences were filled, here you go.
for(var/mob/new_player/player in unassigned)
for(var/mob/dead/new_player/player in unassigned)
if(PopcapReached())
RejectPlayer(player)
if(player.client.prefs.joblessrole == BEASSISTANT)
@@ -356,14 +355,14 @@ var/datum/controller/subsystem/job/SSjob
else // For those who don't want to play if their preference were filled, back you go.
RejectPlayer(player)
for(var/mob/new_player/player in unassigned) //Players that wanted to back out but couldn't because they're antags (can you feel the edge case?)
for(var/mob/dead/new_player/player in unassigned) //Players that wanted to back out but couldn't because they're antags (can you feel the edge case?)
GiveRandomJob(player)
return 1
//Gives the player the stuff he should have with his rank
/datum/controller/subsystem/job/proc/EquipRank(mob/M, rank, joined_late=0)
var/mob/new_player/N
var/mob/dead/new_player/N
var/mob/living/H
if(!joined_late)
N = M
@@ -473,7 +472,7 @@ var/datum/controller/subsystem/job/SSjob
var/level4 = 0 //never
var/level5 = 0 //banned
var/level6 = 0 //account too young
for(var/mob/new_player/player in player_list)
for(var/mob/dead/new_player/player in player_list)
if(!(player.ready && player.mind && !player.mind.assigned_role))
continue //This player is not ready
if(jobban_isbanned(player, job.title))
@@ -500,7 +499,7 @@ var/datum/controller/subsystem/job/SSjob
return 1
return 0
/datum/controller/subsystem/job/proc/RejectPlayer(mob/new_player/player)
/datum/controller/subsystem/job/proc/RejectPlayer(mob/dead/new_player/player)
if(player.mind && player.mind.special_role)
return
if(PopcapReached())
+7 -7
View File
@@ -86,7 +86,7 @@ var/datum/controller/subsystem/ticker/ticker
timeLeft = max(0,start_at - world.time)
totalPlayers = 0
totalPlayersReady = 0
for(var/mob/new_player/player in player_list)
for(var/mob/dead/new_player/player in player_list)
++totalPlayers
if(player.ready)
++totalPlayersReady
@@ -364,7 +364,7 @@ var/datum/controller/subsystem/ticker/ticker
M.gib()
/datum/controller/subsystem/ticker/proc/create_characters()
for(var/mob/new_player/player in player_list)
for(var/mob/dead/new_player/player in player_list)
if(player.ready && player.mind)
joined_player_list += player.ckey
player.create_character(FALSE)
@@ -373,7 +373,7 @@ var/datum/controller/subsystem/ticker/ticker
CHECK_TICK
/datum/controller/subsystem/ticker/proc/collect_minds()
for(var/mob/new_player/P in player_list)
for(var/mob/dead/new_player/P in player_list)
if(P.new_character && P.new_character.mind)
ticker.minds += P.new_character.mind
CHECK_TICK
@@ -381,7 +381,7 @@ var/datum/controller/subsystem/ticker/ticker
/datum/controller/subsystem/ticker/proc/equip_characters()
var/captainless=1
for(var/mob/new_player/N in player_list)
for(var/mob/dead/new_player/N in player_list)
var/mob/living/carbon/human/player = N.new_character
if(istype(player) && player.mind && player.mind.assigned_role)
if(player.mind.assigned_role == "Captain")
@@ -390,14 +390,14 @@ var/datum/controller/subsystem/ticker/ticker
SSjob.EquipRank(N, player.mind.assigned_role, 0)
CHECK_TICK
if(captainless)
for(var/mob/new_player/N in player_list)
for(var/mob/dead/new_player/N in player_list)
if(N.new_character)
to_chat(N, "Captainship not forced on anyone.")
CHECK_TICK
/datum/controller/subsystem/ticker/proc/transfer_characters()
var/list/livings = list()
for(var/mob/new_player/player in player_list)
for(var/mob/dead/new_player/player in player_list)
var/mob/living = player.transfer_character()
if(living)
qdel(player)
@@ -624,7 +624,7 @@ var/datum/controller/subsystem/ticker/ticker
return
queue_delay++
var/mob/new_player/next_in_line = queued_players[1]
var/mob/dead/new_player/next_in_line = queued_players[1]
switch(queue_delay)
if(5) //every 5 ticks check if there is a slot available
+1 -1
View File
@@ -77,7 +77,7 @@
return
/datum/datacore/proc/manifest()
for(var/mob/new_player/N in player_list)
for(var/mob/dead/new_player/N in player_list)
if(ishuman(N.new_character))
manifest_inject(N.new_character, N.client)
CHECK_TICK
+2 -2
View File
@@ -81,11 +81,11 @@ var/datum/atom_hud/huds = list( \
if(src in hud.hudusers)
hud.add_hud_to(src)
/mob/new_player/reload_huds()
/mob/dead/new_player/reload_huds()
return
/mob/proc/add_click_catcher()
client.screen += client.void
/mob/new_player/add_click_catcher()
/mob/dead/new_player/add_click_catcher()
return
+1 -1
View File
@@ -1544,7 +1544,7 @@
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
/mob/new_player/sync_mind()
/mob/dead/new_player/sync_mind()
return
/mob/dead/observer/sync_mind()
+3
View File
@@ -53,6 +53,9 @@
//Note: the following functions don't call the base for optimization and must copypasta:
// /turf/Initialize
// /turf/open/space/Initialize
// /mob/dead/new_player/Initialize
//Do also note that this proc always runs in New for /mob/dead
/atom/proc/Initialize(mapload, ...)
if(initialized)
stack_trace("Warning: [src]([type]) initialized multiple times!")
+2 -2
View File
@@ -102,7 +102,7 @@
var/is_zombie = 0
gold_core_spawnable = 1
/mob/living/simple_animal/hostile/blob/blobspore/New(loc, var/obj/structure/blob/factory/linked_node)
/mob/living/simple_animal/hostile/blob/blobspore/Initialize(mapload, var/obj/structure/blob/factory/linked_node)
if(istype(linked_node))
factory = linked_node
factory.spores += src
@@ -222,7 +222,7 @@
see_in_dark = 8
var/independent = FALSE
/mob/living/simple_animal/hostile/blob/blobbernaut/New()
/mob/living/simple_animal/hostile/blob/blobbernaut/Initialize()
..()
if(!independent) //no pulling people deep into the blob
verbs -= /mob/living/verb/pulled
+1 -1
View File
@@ -29,7 +29,7 @@
var/manualplace_min_time = 600 //in deciseconds //a minute, to get bearings
var/autoplace_max_time = 3600 //six minutes, as long as should be needed
/mob/camera/blob/New(loc, pre_placed = 0, mode_made = 0, starting_points = 60)
/mob/camera/blob/Initialize(mapload, pre_placed = 0, mode_made = 0, starting_points = 60)
blob_points = starting_points
if(pre_placed) //we already have a core!
manualplace_min_time = 0
@@ -19,7 +19,7 @@
opposable thumbs.</b>"
var/movement_delay_time //how long the fragment is slowed after being hit
/mob/living/simple_animal/hostile/clockwork/fragment/New()
/mob/living/simple_animal/hostile/clockwork/fragment/Initialize()
..()
set_light(2, 0.8)
if(prob(1))
@@ -29,7 +29,7 @@
Stay near your host to protect and heal them; being too far from your host will rapidly cause you massive damage. Recall to your host if you are too weak and believe you cannot continue \
fighting safely. As a final note, you should probably avoid harming any fellow servants of Ratvar.</span>"
/mob/living/simple_animal/hostile/clockwork/marauder/New()
/mob/living/simple_animal/hostile/clockwork/marauder/Initialize()
..()
true_name = pick(possible_true_names)
set_light(2, 1.1)
+1 -1
View File
@@ -38,7 +38,7 @@
Though you are not obligated to help, perhaps by aiding a higher ranking devil, you might just get a promotion. However, you are incapable \
of intentionally harming a fellow devil.</B>"
/mob/living/simple_animal/imp/New()
/mob/living/simple_animal/imp/Initialize()
..()
boost = world.time + 30
@@ -27,7 +27,7 @@
/mob/living/carbon/true_devil/New()
/mob/living/carbon/true_devil/Initialize()
create_bodyparts() //initialize bodyparts
create_internal_organs()
+7 -7
View File
@@ -53,7 +53,7 @@
///Checks to see if the game can be setup and ran with the current number of players or whatnot.
/datum/game_mode/proc/can_start()
var/playerC = 0
for(var/mob/new_player/player in player_list)
for(var/mob/dead/new_player/player in player_list)
if((player.client)&&(player.ready))
playerC++
if(!Debug2)
@@ -302,7 +302,7 @@
var/datum/mind/applicant = null
// Ultimate randomizing code right here
for(var/mob/new_player/player in player_list)
for(var/mob/dead/new_player/player in player_list)
if(player.client && player.ready)
players += player
@@ -310,7 +310,7 @@
// Goodbye antag dante
players = shuffle(players)
for(var/mob/new_player/player in players)
for(var/mob/dead/new_player/player in players)
if(player.client && player.ready)
if(role in player.client.prefs.be_special)
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans
@@ -324,7 +324,7 @@
candidates -= player
if(candidates.len < recommended_enemies)
for(var/mob/new_player/player in players)
for(var/mob/dead/new_player/player in players)
if(player.client && player.ready)
if(!(role in player.client.prefs.be_special)) // We don't have enough people who want to be antagonist, make a seperate list of people who don't want to be one
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans
@@ -349,7 +349,7 @@
break
/*
if(candidates.len < recommended_enemies && override_jobbans) //If we still don't have enough people, we're going to start drafting banned people.
for(var/mob/new_player/player in players)
for(var/mob/dead/new_player/player in players)
if (player.client && player.ready)
if(jobban_isbanned(player, "Syndicate") || jobban_isbanned(player, roletext)) //Nodrak/Carn: Antag Job-bans
drafted += player.mind
@@ -377,7 +377,7 @@
// Less if there are not enough valid players in the game entirely to make recommended_enemies.
/*
/datum/game_mode/proc/check_player_role_pref(var/role, var/mob/new_player/player)
/datum/game_mode/proc/check_player_role_pref(var/role, var/mob/dead/new_player/player)
if(player.preferences.be_special & role)
return 1
return 0
@@ -385,7 +385,7 @@
/datum/game_mode/proc/num_players()
. = 0
for(var/mob/new_player/P in player_list)
for(var/mob/dead/new_player/P in player_list)
if(P.client && P.ready)
. ++
@@ -110,8 +110,8 @@ var/total_borer_hosts_needed = 10
var/datum/action/innate/borer/punish_victim/punish_victim_action = new
var/datum/action/innate/borer/jumpstart_host/jumpstart_host_action = new
/mob/living/simple_animal/borer/New(atom/newloc, var/gen=1)
..(newloc)
/mob/living/simple_animal/borer/Initialize(mapload, gen=1)
..()
generation = gen
notify_ghosts("A cortical borer has been created in [get_area(src)]!", enter_link = "<a href=?src=\ref[src];ghostjoin=1>(Click to enter)</a>", source = src, action = NOTIFY_ATTACK)
real_name = "Cortical Borer [rand(1000,9999)]"
@@ -300,8 +300,8 @@ var/total_borer_hosts_needed = 10
message = copytext(message,2)
for(var/borer in borers)
to_chat(borer, "<span class='borer'>Cortical Link: [truename] sings, \"[message]\"")
for(var/mob/dead in dead_mob_list)
to_chat(dead, "<span class='borer'>Cortical Link: [truename] sings, \"[message]\"")
for(var/mob/D in dead_mob_list)
to_chat(D, "<span class='borer'>Cortical Link: [truename] sings, \"[message]\"")
return
if(!victim)
to_chat(src, "<span class='warning'>You cannot speak without a host!</span>")
@@ -8,7 +8,7 @@
materials = list(MAT_METAL=10000, MAT_GLASS=4000)
/obj/item/device/unactivated_swarmer/New()
/obj/item/device/unactivated_swarmer/Initialize()
if(!crit_fail)
notify_ghosts("An unactivated swarmer has been created in [get_area(src)]!", enter_link = "<a href=?src=\ref[src];ghostjoin=1>(Click to enter)</a>", source = src, action = NOTIFY_ATTACK)
..()
@@ -118,7 +118,7 @@
..()
to_chat(src, login_text_dump)
/mob/living/simple_animal/hostile/swarmer/New()
/mob/living/simple_animal/hostile/swarmer/Initialize()
..()
verbs -= /mob/living/verb/pulled
var/datum/atom_hud/data/diagnostic/diag_hud = huds[DATA_HUD_DIAGNOSTIC]
@@ -62,7 +62,7 @@
var/image/ghostimage = null //Visible to ghost with darkness off
var/generated_objectives_and_spells = FALSE
/mob/living/simple_animal/revenant/New()
/mob/living/simple_animal/revenant/Initialize()
..()
ghostimage = image(src.icon,src,src.icon_state)
@@ -46,7 +46,7 @@
del_on_death = 1
deathmessage = "screams in anger as it collapses into a puddle of viscera!"
/mob/living/simple_animal/slaughter/New()
/mob/living/simple_animal/slaughter/Initialize()
..()
var/obj/effect/proc_holder/spell/bloodcrawl/bloodspell = new
AddSpell(bloodspell)
+1 -1
View File
@@ -656,7 +656,7 @@ var/global/list/possible_items_special = list()
if (ticker)
var/n_p = 1 //autowin
if (ticker.current_state == GAME_STATE_SETTING_UP)
for(var/mob/new_player/P in player_list)
for(var/mob/dead/new_player/P in player_list)
if(P.client && P.ready && P.mind!=owner)
n_p ++
else if (ticker.current_state == GAME_STATE_PLAYING)
+2 -2
View File
@@ -70,7 +70,7 @@
for(var/datum/mind/rev_mind in head_revolutionaries) //People with return to lobby may still be in the lobby. Let's pick someone else in that case.
if(istype(rev_mind.current,/mob/new_player))
if(istype(rev_mind.current,/mob/dead/new_player))
head_revolutionaries -= rev_mind
var/list/newcandidates = shuffle(antag_candidates)
if(newcandidates.len == 0)
@@ -79,7 +79,7 @@
var/datum/mind/lenin = M
antag_candidates -= lenin
newcandidates -= lenin
if(istype(lenin.current,/mob/new_player)) //We don't want to make the same mistake again
if(istype(lenin.current,/mob/dead/new_player)) //We don't want to make the same mistake again
continue
else
var/mob/Nm = lenin.current
+1 -1
View File
@@ -157,7 +157,7 @@ update_label("John Doe", "Clowny")
if(user.mind.special_role || anyone)
if(alert(user, "Action", "Agent ID", "Show", "Forge") == "Forge")
var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", registered_name ? registered_name : (ishuman(user) ? user.real_name : user.name))as text | null),1,26)
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/new_player/prefrences.dm
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/dead/new_player/prefrences.dm
if (t)
alert("Invalid name.")
return
+1 -1
View File
@@ -20,7 +20,7 @@
var/userloc = H.loc
//see code/modules/mob/new_player/preferences.dm at approx line 545 for comments!
//see code/modules/mob/dead/new_player/preferences.dm at approx line 545 for comments!
//this is largely copypasted from there.
//handle facial hair (if necessary)
+1 -1
View File
@@ -6,7 +6,7 @@
var/datum/action/quit_vr/quit_action
/mob/living/carbon/human/virtual_reality/New()
/mob/living/carbon/human/virtual_reality/Initialize()
..()
quit_action = new()
quit_action.Grant(src)
+2 -2
View File
@@ -1339,7 +1339,7 @@
log_admin("[key_name(usr)] has sent [key_name(M)] back to the Lobby.")
message_admins("[key_name(usr)] has sent [key_name(M)] back to the Lobby.")
var/mob/new_player/NP = new()
var/mob/dead/new_player/NP = new()
NP.ckey = M.ckey
qdel(M)
@@ -1525,7 +1525,7 @@
var/mob/M = locate(href_list["makeanimal"])
if(isnewplayer(M))
to_chat(usr, "This cannot be used on instances of type /mob/new_player.")
to_chat(usr, "This cannot be used on instances of type /mob/dead/new_player.")
return
usr.client.cmd_admin_animalize(M)
+1 -1
View File
@@ -41,7 +41,7 @@
/obj/item/projectile/magic/death, /obj/item/projectile/magic/teleport, /obj/item/projectile/magic/door, /obj/item/projectile/magic/aoe/fireball,
/obj/item/projectile/magic/spellblade, /obj/item/projectile/magic/arcane_barrage)
/mob/living/simple_animal/hostile/carp/ranged/New()
/mob/living/simple_animal/hostile/carp/ranged/Initialize()
projectiletype = pick(allowed_projectile_types)
..()
+2 -2
View File
@@ -129,7 +129,7 @@
layer = 4
var/timer = 0
/mob/living/simple_animal/shade/howling_ghost/New()
/mob/living/simple_animal/shade/howling_ghost/Initialize()
..()
icon_state = pick("ghost","ghostian","ghostian2","ghostking","ghost1","ghost2")
icon_living = icon_state
@@ -193,7 +193,7 @@
unsuitable_atmos_damage = 0
var/timer
/mob/living/simple_animal/hostile/retaliate/clown/insane/New()
/mob/living/simple_animal/hostile/retaliate/clown/insane/Initialize()
..()
timer = rand(5,15)
status_flags = (status_flags | GODMODE)
+1 -1
View File
@@ -144,7 +144,7 @@
/datum/holiday/april_fools/celebrate()
if(ticker)
ticker.login_music = 'sound/ambience/clown.ogg'
for(var/mob/new_player/P in mob_list)
for(var/mob/dead/new_player/P in mob_list)
if(P.client)
P.stopLobbySound()
P.client.playtitlemusic()
+2 -2
View File
@@ -6,9 +6,9 @@
icon_state = "construction_drone"
var/area/starting_area
mob/camera/aiEye/remote/base_construction/New(loc)
starting_area = get_area(loc)
/mob/camera/aiEye/remote/base_construction/Initialize()
..()
starting_area = get_area(loc)
/mob/camera/aiEye/remote/base_construction/setLoc(var/t)
var/area/curr_area = get_area(t)
+1 -1
View File
@@ -48,7 +48,7 @@
var/datum/action/innate/minedrone/toggle_mode/toggle_mode_action
var/datum/action/innate/minedrone/dump_ore/dump_ore_action
/mob/living/simple_animal/hostile/mining_drone/New()
/mob/living/simple_animal/hostile/mining_drone/Initialize()
..()
toggle_light_action = new()
toggle_light_action.Grant(src)
+12
View File
@@ -0,0 +1,12 @@
//Dead mobs can exist whenever. This is needful
/mob/dead/New(loc)
..()
if(!initialized)
args[1] = FALSE
Initialize(arglist(args)) //EXIST DAMN YOU!!!
/mob/dead/dust() //ghosts can't be vaporised.
return
/mob/dead/gib() //ghosts can't be gibbed.
return
-5
View File
@@ -1,5 +0,0 @@
/mob/dead/dust() //ghosts can't be vaporised.
return
/mob/dead/gib() //ghosts can't be gibbed.
return
@@ -1,4 +1,4 @@
/mob/new_player/Login()
/mob/dead/new_player/Login()
if(!mind)
mind = new /datum/mind(key)
mind.active = 1
@@ -1,4 +1,4 @@
/mob/new_player/Logout()
/mob/dead/new_player/Logout()
ready = 0
..()
if(!spawning)//Here so that if they are spawning and log out, the other procs can play out and they will have a mob to come back to.
@@ -1,6 +1,6 @@
/mob/new_player
/mob/dead/new_player
var/ready = 0
var/spawning = 0//Referenced when you want to delete the new_player later on in the code.
@@ -15,7 +15,10 @@
anchored = 1 // don't get pushed around
var/mob/living/new_character //for instant transfer once the round is set up
/mob/new_player/New()
/mob/dead/new_player/Initialize()
if(initialized)
stack_trace("Warning: [src]([type]) initialized multiple times!")
initialized = TRUE
tag = "mob_[next_mob_id++]"
mob_list += src
@@ -28,7 +31,7 @@
else
loc = locate(1,1,1)
/mob/new_player/proc/new_player_panel()
/mob/dead/new_player/proc/new_player_panel()
var/output = "<center><p><a href='byond://?src=\ref[src];show_preferences=1'>Setup Character</A></p>"
@@ -70,7 +73,7 @@
popup.open(0)
return
/mob/new_player/Stat()
/mob/dead/new_player/Stat()
..()
if(statpanel("Lobby"))
@@ -88,7 +91,7 @@
stat("Players Ready:", "[ticker.totalPlayersReady]")
/mob/new_player/Topic(href, href_list[])
/mob/dead/new_player/Topic(href, href_list[])
if(src != usr)
return 0
@@ -273,7 +276,7 @@
return
to_chat(src, "<span class='notice'>Vote successful.</span>")
/mob/new_player/proc/IsJobAvailable(rank)
/mob/dead/new_player/proc/IsJobAvailable(rank)
var/datum/job/job = SSjob.GetJob(rank)
if(!job)
return 0
@@ -295,7 +298,7 @@
return 1
/mob/new_player/proc/AttemptLateSpawn(rank)
/mob/dead/new_player/proc/AttemptLateSpawn(rank)
if(!IsJobAvailable(rank))
to_chat(src, alert("[rank] is not available. Please try another."))
return 0
@@ -369,7 +372,7 @@
ticker.mode.make_antag_chance(humanc)
qdel(src)
/mob/new_player/proc/AddEmploymentContract(mob/living/carbon/human/employee)
/mob/dead/new_player/proc/AddEmploymentContract(mob/living/carbon/human/employee)
//TODO: figure out a way to exclude wizards/nukeops/demons from this.
sleep(30)
for(var/C in employmentCabinets)
@@ -378,7 +381,7 @@
employmentCabinet.addFile(employee)
/mob/new_player/proc/LateChoices()
/mob/dead/new_player/proc/LateChoices()
var/mills = world.time - round_start_time // 1/10 of a second, not real milliseconds but whatever
//var/secs = ((mills % 36000) % 600) / 10 //Not really needed, but I'll leave it here for refrence.. or something
var/mins = (mills % 36000) / 600
@@ -439,7 +442,7 @@
popup.open(0) // 0 is passed to open so that it doesn't use the onclose() proc
/mob/new_player/proc/create_character(transfer_after)
/mob/dead/new_player/proc/create_character(transfer_after)
spawning = 1
close_spawn_windows()
@@ -461,24 +464,24 @@
if(transfer_after)
transfer_character()
/mob/new_player/proc/transfer_character()
/mob/dead/new_player/proc/transfer_character()
. = new_character
if(.)
new_character.key = key //Manually transfer the key to log them in
new_character.stopLobbySound()
/mob/new_player/proc/ViewManifest()
/mob/dead/new_player/proc/ViewManifest()
var/dat = "<html><body>"
dat += "<h4>Crew Manifest</h4>"
dat += data_core.get_manifest(OOC = 1)
src << browse(dat, "window=manifest;size=387x420;can_close=1")
/mob/new_player/Move()
/mob/dead/new_player/Move()
return 0
/mob/new_player/proc/close_spawn_windows()
/mob/dead/new_player/proc/close_spawn_windows()
src << browse(null, "window=latechoices") //closes late choices window
src << browse(null, "window=playersetup") //closes the player setup window
@@ -2,7 +2,7 @@
var/optionid
var/optiontext
/mob/new_player/proc/handle_player_polling()
/mob/dead/new_player/proc/handle_player_polling()
if(!dbcon.IsConnected())
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
@@ -19,7 +19,7 @@
output += "</table>"
src << browse(output,"window=playerpolllist;size=500x300")
/mob/new_player/proc/poll_player(pollid)
/mob/dead/new_player/proc/poll_player(pollid)
if(!pollid)
return
if (!dbcon.Connect())
@@ -323,7 +323,7 @@
src << browse(output,"window=playerpoll;size=500x500")
return
/mob/new_player/proc/poll_check_voted(pollid, text = FALSE)
/mob/dead/new_player/proc/poll_check_voted(pollid, text = FALSE)
var/table = "poll_vote"
if (text)
table = "poll_textreply"
@@ -342,7 +342,7 @@
return .
/mob/new_player/proc/vote_rig_check()
/mob/dead/new_player/proc/vote_rig_check()
if (usr != src)
if (!usr || !src)
return 0
@@ -354,7 +354,7 @@
return 0
return 1
/mob/new_player/proc/vote_valid_check(pollid, holder, type)
/mob/dead/new_player/proc/vote_valid_check(pollid, holder, type)
if (!dbcon.Connect())
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
return 0
@@ -369,7 +369,7 @@
return 0
return 1
/mob/new_player/proc/vote_on_irv_poll(pollid, list/votelist)
/mob/dead/new_player/proc/vote_on_irv_poll(pollid, list/votelist)
if (!dbcon.Connect())
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
return 0
@@ -438,7 +438,7 @@
return 1
/mob/new_player/proc/vote_on_poll(pollid, optionid)
/mob/dead/new_player/proc/vote_on_poll(pollid, optionid)
if (!dbcon.Connect())
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
return 0
@@ -458,7 +458,7 @@
usr << browse(null,"window=playerpoll")
return 1
/mob/new_player/proc/log_text_poll_reply(pollid, replytext)
/mob/dead/new_player/proc/log_text_poll_reply(pollid, replytext)
if (!dbcon.Connect())
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
return 0
@@ -485,7 +485,7 @@
usr << browse(null,"window=playerpoll")
return 1
/mob/new_player/proc/vote_on_numval_poll(pollid, optionid, rating)
/mob/dead/new_player/proc/vote_on_numval_poll(pollid, optionid, rating)
if (!dbcon.Connect())
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
return 0
@@ -512,7 +512,7 @@
usr << browse(null,"window=playerpoll")
return 1
/mob/new_player/proc/vote_on_multi_poll(pollid, optionid)
/mob/dead/new_player/proc/vote_on_multi_poll(pollid, optionid)
if (!dbcon.Connect())
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
return 0
+2 -1
View File
@@ -59,7 +59,7 @@ var/global/static/observer_default_invisibility = INVISIBILITY_OBSERVER
// of the mob
var/deadchat_name
/mob/dead/observer/New(mob/body)
/mob/dead/observer/Initialize()
invisibility = observer_default_invisibility
verbs += /mob/dead/observer/proc/dead_tele
@@ -79,6 +79,7 @@ var/global/static/observer_default_invisibility = INVISIBILITY_OBSERVER
updateallghostimages()
var/turf/T
var/mob/body = loc
if(ismob(body))
T = get_turf(body) //Where is the body located?
logging = body.logging //preserve our logs by copying them to our ghost
+5 -5
View File
@@ -381,7 +381,7 @@
faction -= "neutral"
faction += "hostile"
/mob/living/carbon/human/interactive/New()
/mob/living/carbon/human/interactive/Initialize()
..()
set_species(/datum/species/synth)
@@ -1605,13 +1605,13 @@
nearby += M
//END OF MODULES
/mob/living/carbon/human/interactive/angry/New()
/mob/living/carbon/human/interactive/angry/Initialize()
TRAITS |= TRAIT_ROBUST
TRAITS |= TRAIT_MEAN
faction += "bot_angry"
..()
/mob/living/carbon/human/interactive/friendly/New()
/mob/living/carbon/human/interactive/friendly/Initialize()
TRAITS |= TRAIT_FRIENDLY
TRAITS |= TRAIT_UNROBUST
faction += "bot_friendly"
@@ -1619,7 +1619,7 @@
functions -= "combat"
..()
/mob/living/carbon/human/interactive/greytide/New()
/mob/living/carbon/human/interactive/greytide/Initialize()
TRAITS |= TRAIT_ROBUST
TRAITS |= TRAIT_MEAN
TRAITS |= TRAIT_THIEVING
@@ -1631,7 +1631,7 @@
..()
//Walk softly and carry a big stick
/mob/living/carbon/human/interactive/robust/New()
/mob/living/carbon/human/interactive/robust/Initialize()
TRAITS |= TRAIT_FRIENDLY
TRAITS |= TRAIT_ROBUST
TRAITS |= TRAIT_SMART
+2 -2
View File
@@ -10,13 +10,13 @@
stat = DEAD //we start dead by default
see_invisible = SEE_INVISIBLE_MINIMUM
/mob/living/brain/New(loc)
/mob/living/brain/Initialize()
..()
create_dna(src)
stored_dna.initialize_dna(random_blood_type())
if(isturf(loc)) //not spawned in an MMI or brain organ (most likely adminspawned)
var/obj/item/organ/brain/OB = new(loc) //we create a new brain organ for it.
src.loc = OB
loc = OB
OB.brainmob = src
@@ -33,7 +33,7 @@
var/static/regex/alien_name_regex = new("alien (larva|sentinel|drone|hunter|praetorian|queen)( \\(\\d+\\))?")
/mob/living/carbon/alien/New()
/mob/living/carbon/alien/Initialize()
verbs += /mob/living/proc/mob_sleep
verbs += /mob/living/proc/lay_down
@@ -6,7 +6,7 @@
icon_state = "aliend"
/mob/living/carbon/alien/humanoid/drone/New()
/mob/living/carbon/alien/humanoid/drone/Initialize()
AddAbility(new/obj/effect/proc_holder/alien/evolve(null))
..()
@@ -7,7 +7,7 @@
/mob/living/carbon/alien/humanoid/royal/praetorian/New()
/mob/living/carbon/alien/humanoid/royal/praetorian/Initialize()
real_name = name
@@ -6,7 +6,7 @@
icon_state = "aliens"
/mob/living/carbon/alien/humanoid/sentinel/New()
/mob/living/carbon/alien/humanoid/sentinel/Initialize()
AddAbility(new /obj/effect/proc_holder/alien/sneak)
..()
@@ -21,7 +21,7 @@
//This is fine right now, if we're adding organ specific damage this needs to be updated
/mob/living/carbon/alien/humanoid/New()
/mob/living/carbon/alien/humanoid/Initialize()
AddAbility(new/obj/effect/proc_holder/alien/regurgitate(null))
..()
@@ -44,7 +44,7 @@
owner.remove_alt_appearance("smallqueen")
small = 0
/mob/living/carbon/alien/humanoid/royal/queen/New()
/mob/living/carbon/alien/humanoid/royal/queen/Initialize()
//there should only be one queen
for(var/mob/living/carbon/alien/humanoid/royal/queen/Q in living_mob_list)
if(Q == src)
@@ -18,7 +18,7 @@
//This is fine right now, if we're adding organ specific damage this needs to be updated
/mob/living/carbon/alien/larva/New()
/mob/living/carbon/alien/larva/Initialize()
AddAbility(new/obj/effect/proc_holder/alien/hide(null))
AddAbility(new/obj/effect/proc_holder/alien/larva_evolve(null))
+1 -1
View File
@@ -1,7 +1,7 @@
/mob/living/carbon
blood_volume = BLOOD_VOLUME_NORMAL
/mob/living/carbon/New()
/mob/living/carbon/Initialize()
create_reagents(1000)
update_body_parts() //to update the carbon's new bodyparts appearance
..()
@@ -13,7 +13,7 @@
/mob/living/carbon/human/New()
/mob/living/carbon/human/Initialize()
verbs += /mob/living/proc/mob_sleep
verbs += /mob/living/proc/lay_down
@@ -18,7 +18,7 @@
/mob/living/carbon/monkey/New()
/mob/living/carbon/monkey/Initialize()
verbs += /mob/living/proc/mob_sleep
verbs += /mob/living/proc/lay_down
@@ -9,7 +9,7 @@
var/list/pet_monkey_names = list("Pun Pun", "Bubbles", "Mojo", "George", "Darwin", "Aldo", "Caeser", "Kanzi", "Kong", "Terk", "Grodd", "Mala", "Bojangles", "Coco", "Able", "Baker", "Scatter", "Norbit", "Travis")
var/list/rare_pet_monkey_names = list("Professor Bobo", "Deempisi's Revenge", "Furious George", "King Louie", "Dr. Zaius", "Jimmy Rustles", "Dinner", "Lanky")
/mob/living/carbon/monkey/punpun/New()
/mob/living/carbon/monkey/punpun/Initialize()
Read_Memory()
if(ancestor_name)
name = ancestor_name
+1 -1
View File
@@ -1,4 +1,4 @@
/mob/living/New()
/mob/living/Initialize()
. = ..()
generateStaticOverlay()
if(staticOverlays.len)
+2 -2
View File
@@ -85,7 +85,7 @@ var/list/ai_list = list()
var/obj/structure/AIcore/deactivated/linked_core //For exosuit control
/mob/living/silicon/ai/New(loc, datum/ai_laws/L, mob/target_ai)
/mob/living/silicon/ai/Initialize(mapload, datum/ai_laws/L, mob/target_ai)
..()
if(!target_ai) //If there is no player/brain inside.
new/obj/structure/AIcore/deactivated(loc) //New empty terminal.
@@ -910,7 +910,7 @@ var/list/ai_list = list()
/mob/living/silicon/ai/resist()
return
/mob/living/silicon/ai/spawned/New(loc, datum/ai_laws/L, mob/target_ai)
/mob/living/silicon/ai/spawned/Initialize(mapload, datum/ai_laws/L, mob/target_ai)
if(!target_ai)
target_ai = src //cheat! just give... ourselves as the spawned AI, because that's technically correct
..()
+2 -1
View File
@@ -81,7 +81,8 @@
pai_list -= src
..()
/mob/living/silicon/pai/New(var/obj/item/device/paicard/P)
/mob/living/silicon/pai/Initialize()
var/obj/item/device/paicard/P = loc
START_PROCESSING(SSfastprocess, src)
pai_list += src
make_laws()
@@ -93,7 +93,7 @@
buckle_lying = FALSE
can_ride_typecache = list(/mob/living/carbon/human)
/mob/living/silicon/robot/New(loc)
/mob/living/silicon/robot/Initialize(mapload)
spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -816,7 +816,7 @@
<i>Help the operatives secure the disk at all costs!</i></b>"
var/set_module = /obj/item/weapon/robot_module/syndicate
/mob/living/silicon/robot/syndicate/New(loc)
/mob/living/silicon/robot/syndicate/Initialize()
..()
cell.maxcharge = 25000
cell.charge = 25000
+1 -1
View File
@@ -39,7 +39,7 @@
var/law_change_counter = 0
/mob/living/silicon/New()
/mob/living/silicon/Initialize()
..()
silicon_mobs += src
var/datum/atom_hud/data/diagnostic/diag_hud = huds[DATA_HUD_DIAGNOSTIC]
@@ -114,7 +114,7 @@
bot_reset() //Resets an AI's call, should it exist.
update_icon()
/mob/living/simple_animal/bot/New()
/mob/living/simple_animal/bot/Initialize()
..()
access_card = new /obj/item/weapon/card/id(src)
//This access is so bots can be immediately set to patrol and leave Robotics, instead of having to be let out first.
@@ -800,7 +800,7 @@ Pass a positive integer as an argument to override a bot's default speed.
use_power = 0
var/mob/living/simple_animal/bot/owner = null
/obj/machinery/bot_core/New(loc)
/obj/machinery/bot_core/Initialize()
..()
owner = loc
if(!istype(owner))
@@ -31,7 +31,7 @@
var/next_dest
var/next_dest_loc
/mob/living/simple_animal/bot/cleanbot/New()
/mob/living/simple_animal/bot/cleanbot/Initialize()
..()
get_targets()
icon_state = "cleanbot[on]"
@@ -42,7 +42,7 @@
var/shoot_sound = 'sound/weapons/Taser.ogg'
/mob/living/simple_animal/bot/ed209/New(loc,created_name,created_lasercolor)
/mob/living/simple_animal/bot/ed209/Initialize(mapload,created_name,created_lasercolor)
..()
if(created_name)
name = created_name
@@ -38,7 +38,7 @@
#define REPLACE_TILE 6
#define TILE_EMAG 7
/mob/living/simple_animal/bot/floorbot/New()
/mob/living/simple_animal/bot/floorbot/Initialize()
..()
update_icon()
var/datum/job/engineer/J = new/datum/job/engineer
@@ -85,7 +85,7 @@
else
icon_state = "medibot1"
/mob/living/simple_animal/bot/medbot/New()
/mob/living/simple_animal/bot/medbot/Initialize()
..()
update_icon()
@@ -48,7 +48,7 @@ var/global/mulebot_count = 0
var/obj/item/weapon/stock_parts/cell/cell
var/bloodiness = 0
/mob/living/simple_animal/bot/mulebot/New()
/mob/living/simple_animal/bot/mulebot/Initialize()
..()
wires = new /datum/wires/mulebot(src)
var/datum/job/cargo_tech/J = new/datum/job/cargo_tech
@@ -52,7 +52,7 @@
desc = "It's Officer Pingsky! Delegated to satellite guard duty for harbouring anti-human sentiment."
radio_channel = "AI Private"
/mob/living/simple_animal/bot/secbot/New()
/mob/living/simple_animal/bot/secbot/Initialize()
..()
icon_state = "secbot[on]"
spawn(3)
@@ -32,7 +32,7 @@
var/playstyle_string = "<b>You are a generic construct! Your job is to not exist, and you should probably adminhelp this.</b>"
/mob/living/simple_animal/hostile/construct/New()
/mob/living/simple_animal/hostile/construct/Initialize()
..()
for(var/spell in construct_spells)
AddSpell(new spell(null))
@@ -24,7 +24,7 @@
verb_exclaim = "flutters intensely"
verb_yell = "flutters intensely"
/mob/living/simple_animal/butterfly/New()
/mob/living/simple_animal/butterfly/Initialize()
..()
var/newcolor = rgb(rand(0, 255), rand(0, 255), rand(0, 255))
add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY)
@@ -30,7 +30,7 @@
var/mob/living/simple_animal/mouse/movement_target
gold_core_spawnable = 2
/mob/living/simple_animal/pet/cat/New()
/mob/living/simple_animal/pet/cat/Initialize()
..()
verbs += /mob/living/proc/lay_down
@@ -85,7 +85,7 @@
var/cats_deployed = 0
var/memory_saved = 0
/mob/living/simple_animal/pet/cat/Runtime/New()
/mob/living/simple_animal/pet/cat/Runtime/Initialize()
if(prob(5))
icon_state = "original"
icon_living = "original"
@@ -43,7 +43,7 @@
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/slab/pug = 3)
gold_core_spawnable = 2
/mob/living/simple_animal/pet/dog/corgi/New()
/mob/living/simple_animal/pet/dog/corgi/Initialize()
..()
regenerate_icons()
@@ -281,7 +281,7 @@
var/memory_saved = 0
var/saved_head //path
/mob/living/simple_animal/pet/dog/corgi/Ian/New()
/mob/living/simple_animal/pet/dog/corgi/Ian/Initialize()
..()
//parent call must happen first to ensure IAN
//is not in nullspace when child puppies spawn
@@ -68,7 +68,7 @@
var/hacked = 0 //If we have laws to destroy the station
var/can_be_held = TRUE //if assholes can pick us up
/mob/living/simple_animal/drone/New()
/mob/living/simple_animal/drone/Initialize()
. = ..()
access_card = new /obj/item/weapon/card/id(src)
@@ -30,7 +30,7 @@
seeStatic = 0 //Our programming is superior.
hacked = TRUE
/mob/living/simple_animal/drone/syndrone/New()
/mob/living/simple_animal/drone/syndrone/Initialize()
..()
internal_storage.hidden_uplink.telecrystals = 10
@@ -43,7 +43,7 @@
default_hatmask = /obj/item/clothing/head/helmet/space/hardsuit/syndi/elite
default_storage = /obj/item/device/radio/uplink/nuclear
/mob/living/simple_animal/drone/syndrone/badass/New()
/mob/living/simple_animal/drone/syndrone/badass/Initialize()
..()
internal_storage.hidden_uplink.telecrystals = 30
var/obj/item/weapon/implant/weapons_auth/W = new/obj/item/weapon/implant/weapons_auth(src)
@@ -52,7 +52,7 @@
/mob/living/simple_animal/drone/snowflake
default_hatmask = /obj/item/clothing/head/chameleon/drone
/mob/living/simple_animal/drone/snowflake/New()
/mob/living/simple_animal/drone/snowflake/Initialize()
..()
desc += " This drone appears to have a complex holoprojector built on its 'head'."
@@ -76,7 +76,7 @@
default_hatmask = null
picked = TRUE
/mob/living/simple_animal/drone/polymorphed/New()
/mob/living/simple_animal/drone/polymorphed/Initialize()
. = ..()
liberate()
visualAppearence = pick(MAINTDRONE, REPAIRDRONE, SCOUTDRONE)
@@ -126,7 +126,7 @@
/mob/living/simple_animal/drone/cogscarab/admin //an admin-only subtype of cogscarab with a no-cost proselytizer and slab in its box
default_storage = /obj/item/weapon/storage/toolbox/brass/prefilled/ratvar/admin
/mob/living/simple_animal/drone/cogscarab/New()
/mob/living/simple_animal/drone/cogscarab/Initialize()
. = ..()
set_light(2, 0.5)
qdel(access_card) //we don't have free access
@@ -29,7 +29,7 @@
blood_volume = BLOOD_VOLUME_NORMAL
var/obj/item/udder/udder = null
/mob/living/simple_animal/hostile/retaliate/goat/New()
/mob/living/simple_animal/hostile/retaliate/goat/Initialize()
udder = new()
..()
/mob/living/simple_animal/hostile/retaliate/goat/Destroy()
@@ -106,7 +106,7 @@
gold_core_spawnable = 2
blood_volume = BLOOD_VOLUME_NORMAL
/mob/living/simple_animal/cow/New()
/mob/living/simple_animal/cow/Initialize()
udder = new()
..()
@@ -181,7 +181,7 @@
mob_size = MOB_SIZE_TINY
gold_core_spawnable = 2
/mob/living/simple_animal/chick/New()
/mob/living/simple_animal/chick/Initialize()
..()
pixel_x = rand(-6, 6)
pixel_y = rand(0, 10)
@@ -238,7 +238,7 @@ var/global/chicken_count = 0
var/list/validColors = list("brown","black","white")
gold_core_spawnable = 2
/mob/living/simple_animal/chicken/New()
/mob/living/simple_animal/chicken/Initialize()
..()
if(!body_color)
body_color = pick(validColors)
@@ -297,7 +297,7 @@ var/global/chicken_count = 0
/obj/item/udder
name = "udder"
/obj/item/udder/New()
/obj/item/udder/Initialize()
reagents = new(50)
reagents.my_atom = src
reagents.add_reagent("milk", 20)
@@ -25,7 +25,7 @@
gold_core_spawnable = 2
var/chew_probability = 1
/mob/living/simple_animal/mouse/New()
/mob/living/simple_animal/mouse/Initialize()
..()
if(!body_color)
body_color = pick( list("brown","gray","white") )
@@ -29,7 +29,7 @@
else
..()
/mob/living/simple_animal/pet/New()
/mob/living/simple_animal/pet/Initialize()
..()
if(pcollar)
pcollar = new(src)
@@ -50,7 +50,7 @@ var/global/list/parasites = list() //all currently existing/living guardians
var/tech_fluff_string = "<span class='holoparasite'>BOOT SEQUENCE COMPLETE. ERROR MODULE LOADED. THIS SHOULDN'T HAPPEN. Submit a bug report!</span>"
var/carp_fluff_string = "<span class='holoparasite'>CARP CARP CARP SOME SORT OF HORRIFIC BUG BLAME THE CODERS CARP CARP CARP</span>"
/mob/living/simple_animal/hostile/guardian/New(loc, theme)
/mob/living/simple_animal/hostile/guardian/Initialize(mapload, theme)
parasites |= src
setthemename(theme)
@@ -659,7 +659,7 @@ var/global/list/parasites = list() //all currently existing/living guardians
/obj/item/weapon/storage/box/syndie_kit/guardian
name = "holoparasite injector kit"
/obj/item/weapon/storage/box/syndie_kit/guardian/New()
/obj/item/weapon/storage/box/syndie_kit/guardian/Initialize()
..()
new /obj/item/weapon/guardiancreator/tech/choose/traitor(src)
new /obj/item/weapon/paper/guardian(src)
@@ -16,7 +16,7 @@
var/obj/screen/alert/canstealthalert
var/obj/screen/alert/instealthalert
/mob/living/simple_animal/hostile/guardian/assassin/New()
/mob/living/simple_animal/hostile/guardian/assassin/Initialize()
..()
stealthcooldown = 0
@@ -15,7 +15,7 @@
var/beacon_cooldown = 0
var/toggle = FALSE
/mob/living/simple_animal/hostile/guardian/healer/New()
/mob/living/simple_animal/hostile/guardian/healer/Initialize()
..()
var/datum/atom_hud/medsensor = huds[DATA_HUD_MEDICAL_ADVANCED]
medsensor.add_hud_to(src)
@@ -56,7 +56,7 @@
return 1
/mob/living/simple_animal/hostile/poison/bees/New()
/mob/living/simple_animal/hostile/poison/bees/Initialize()
..()
generate_bee_visuals()
@@ -209,7 +209,7 @@
BB.bees |= src
beehome = BB
/mob/living/simple_animal/hostile/poison/bees/toxin/New()
/mob/living/simple_animal/hostile/poison/bees/toxin/Initialize()
. = ..()
var/datum/reagent/R = pick(typesof(/datum/reagent/toxin))
assign_reagent(chemical_reagents_list[initial(R.id)])
@@ -283,12 +283,12 @@
..()
/obj/item/queen_bee/bought/New()
/obj/item/queen_bee/bought/Initialize()
..()
queen = new(src)
/obj/item/queen_bee/Destroy()
qdel(queen)
QDEL_NULL(queen)
return ..()
@@ -11,7 +11,7 @@
var/point_regen_delay = 1
/mob/living/simple_animal/hostile/boss/New()
/mob/living/simple_animal/hostile/boss/Initialize()
..()
atb = new()
@@ -90,7 +90,7 @@
/datum/boss_active_timed_battle/New()
..()
SSobj.processing.Add(src)
START_PROCESSING(SSobj, src)
/datum/boss_active_timed_battle/proc/assign_abilities(list/L)
@@ -34,7 +34,7 @@
var/spelldamage = 15
var/spellcasttime = 15 //if you varedit this also varedit ranged_cooldown_time else the mob will attack again before the spell hits, looking weird but still working
/mob/living/simple_animal/hostile/flan/New() //Required for the inheritance of casting animations.
/mob/living/simple_animal/hostile/flan/Initialize() //Required for the inheritance of casting animations.
..()
casting = 0
icon_state = "[initial(icon_state)][casting]"
@@ -28,7 +28,7 @@
del_on_death = 1
loot = list(/obj/effect/decal/cleanable/robot_debris)
/mob/living/simple_animal/hostile/hivebot/New()
/mob/living/simple_animal/hostile/hivebot/Initialize()
..()
deathmessage = "[src] blows apart!"
@@ -54,7 +54,7 @@
var/lose_patience_timeout = 300 //30 seconds by default, so there's no major changes to AI behaviour, beyond actually bailing if stuck forever
/mob/living/simple_animal/hostile/New()
/mob/living/simple_animal/hostile/Initialize()
..()
if(!targets_from)
@@ -39,7 +39,7 @@
spawn_mecha_type = null
search_objects = 2
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/no_mech/New()
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/no_mech/Initialize()
..()
wanted_objects = typecacheof(/obj/mecha/combat, ignore_root_path=TRUE)
@@ -59,7 +59,7 @@
faction = list("nanotrasen")
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/New()
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/Initialize()
..()
if(spawn_mecha_type)
var/obj/mecha/M = new spawn_mecha_type (get_turf(src))
@@ -103,7 +103,7 @@ Difficulty: Hard
INVOKE_ASYNC(src, .proc/warp_charge)
/mob/living/simple_animal/hostile/megafauna/bubblegum/New()
/mob/living/simple_animal/hostile/megafauna/bubblegum/Initialize()
..()
for(var/mob/living/simple_animal/hostile/megafauna/bubblegum/B in mob_list)
if(B != src)
@@ -91,7 +91,7 @@ Difficulty: Very Hard
INVOKE_ASYNC(src, .proc/alternating_dir_shots)
/mob/living/simple_animal/hostile/megafauna/colossus/New()
/mob/living/simple_animal/hostile/megafauna/colossus/Initialize()
..()
internal = new/obj/item/device/gps/internal/colossus(src)
@@ -105,7 +105,7 @@ Difficulty: Very Hard
duration = 8
var/target
/obj/effect/overlay/temp/at_shield/New(new_loc, new_target)
/obj/effect/overlay/temp/at_shield/Initialize(mapload, new_target)
..()
target = new_target
INVOKE_ASYNC(src, /atom/movable/proc/orbit, target, 0, FALSE, 0, 0, FALSE, TRUE)
@@ -631,7 +631,7 @@ Difficulty: Very Hard
stop_automated_movement = 1
var/heal_power = 5
/mob/living/simple_animal/hostile/lightgeist/New()
/mob/living/simple_animal/hostile/lightgeist/Initialize()
..()
verbs -= /mob/living/verb/pulled
verbs -= /mob/verb/me_verb
@@ -53,7 +53,7 @@ Difficulty: Medium
deathmessage = "collapses into a pile of bones, its flesh sloughing away."
death_sound = 'sound/magic/demon_dies.ogg'
/mob/living/simple_animal/hostile/megafauna/dragon/New()
/mob/living/simple_animal/hostile/megafauna/dragon/Initialize()
..()
internal = new/obj/item/device/gps/internal/dragon(src)
@@ -96,7 +96,7 @@ Difficulty: Medium
duration = 12
pixel_z = 500
/obj/effect/overlay/temp/fireball/New(loc)
/obj/effect/overlay/temp/fireball/Initialize(loc)
..()
animate(src, pixel_z = 0, time = 12)
@@ -121,7 +121,7 @@ Difficulty: Medium
/obj/effect/overlay/temp/target/ex_act()
return
/obj/effect/overlay/temp/target/New(loc)
/obj/effect/overlay/temp/target/Initialize(loc)
..()
INVOKE_ASYNC(src, .proc/fall)
@@ -73,7 +73,7 @@ Difficulty: Hard
del_on_death = TRUE
death_sound = 'sound/magic/Repulse.ogg'
/mob/living/simple_animal/hostile/megafauna/hierophant/New()
/mob/living/simple_animal/hostile/megafauna/hierophant/Initialize()
..()
internal = new/obj/item/device/gps/internal/hierophant(src)
spawned_beacon = new(loc)
@@ -50,7 +50,7 @@ Difficulty: Medium
appearance_flags = 0
mouse_opacity = 1
/mob/living/simple_animal/hostile/megafauna/legion/New()
/mob/living/simple_animal/hostile/megafauna/legion/Initialize()
..()
internal = new/obj/item/device/gps/internal/legion(src)
@@ -65,7 +65,7 @@ var/global/list/AISwarmerCapsByType = list(/mob/living/simple_animal/hostile/swa
var/static/list/swarmer_caps
/mob/living/simple_animal/hostile/megafauna/swarmer_swarm_beacon/New()
/mob/living/simple_animal/hostile/megafauna/swarmer_swarm_beacon/Initialize()
..()
swarmer_caps = AISwarmerCapsByType //for admin-edits
internal = new/obj/item/device/gps/internal/swarmer_beacon(src)
@@ -108,7 +108,7 @@ var/global/list/AISwarmerCapsByType = list(/mob/living/simple_animal/hostile/swa
AIStatus = AI_ON
/mob/living/simple_animal/hostile/swarmer/ai/New()
/mob/living/simple_animal/hostile/swarmer/ai/Initialize()
..()
ToggleLight() //so you can see them eating you out of house and home/shooting you/stunlocking you for eternity
LAZYINITLIST(AISwarmersByType[type])
@@ -178,7 +178,7 @@ var/global/list/AISwarmerCapsByType = list(/mob/living/simple_animal/hostile/swa
var/static/list/sharedIgnore = list()
/mob/living/simple_animal/hostile/swarmer/ai/resource/New()
/mob/living/simple_animal/hostile/swarmer/ai/resource/Initialize()
..()
sharedWanted = typecacheof(sharedWanted)
sharedIgnore = typecacheof(sharedIgnore)
@@ -110,8 +110,8 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
var/image/googly_eyes = null
gold_core_spawnable = 0
/mob/living/simple_animal/hostile/mimic/copy/New(loc, obj/copy, mob/living/creator, destroy_original = 0)
..(loc)
/mob/living/simple_animal/hostile/mimic/copy/Initialize(mapload, obj/copy, mob/living/creator, destroy_original = 0)
..()
CopyObject(copy, creator, destroy_original)
/mob/living/simple_animal/hostile/mimic/copy/Life()
@@ -141,7 +141,7 @@
var/chase_time = 100
var/will_burrow = TRUE
/mob/living/simple_animal/hostile/asteroid/goldgrub/New()
/mob/living/simple_animal/hostile/asteroid/goldgrub/Initialize()
..()
var/i = rand(1,3)
while(i)
@@ -249,7 +249,7 @@
var/inert = 0
var/preserved = 0
/obj/item/organ/hivelord_core/New()
/obj/item/organ/hivelord_core/Initialize()
..()
addtimer(CALLBACK(src, .proc/inert_check), 2400)
@@ -337,7 +337,7 @@
pass_flags = PASSTABLE
del_on_death = 1
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/New()
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/Initialize()
..()
addtimer(CALLBACK(src, .proc/death), 100)
@@ -355,7 +355,7 @@
reagents.reaction(get_turf(src))
..()
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/blood/New()
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/blood/Initialize()
create_reagents(30)
..()
@@ -896,7 +896,7 @@
wanted_objects = list(/obj/effect/decal/cleanable/xenoblood/xgibs, /obj/effect/decal/cleanable/blood/gibs/)
var/obj/item/udder/gutlunch/udder = null
/mob/living/simple_animal/hostile/asteroid/gutlunch/New()
/mob/living/simple_animal/hostile/asteroid/gutlunch/Initialize()
udder = new()
..()
@@ -946,7 +946,7 @@
name = "gubbuck"
gender = MALE
/mob/living/simple_animal/hostile/asteroid/gutlunch/gubbuck/New()
/mob/living/simple_animal/hostile/asteroid/gutlunch/gubbuck/Initialize()
..()
add_atom_colour(pick("#E39FBB", "#D97D64", "#CF8C4A"), FIXED_COLOUR_PRIORITY)
resize = 0.85
@@ -993,7 +993,7 @@
del_on_death = 1
var/gps = null
/mob/living/simple_animal/hostile/spawner/lavaland/New()
/mob/living/simple_animal/hostile/spawner/lavaland/Initialize()
..()
for(var/F in RANGE_TURFS(1, src))
if(ismineralturf(F))
@@ -48,7 +48,7 @@
if(!stat)//Mushrooms slowly regenerate if conscious, for people who want to save them from being eaten
adjustBruteLoss(-2)
/mob/living/simple_animal/hostile/mushroom/New()//Makes every shroom a little unique
/mob/living/simple_animal/hostile/mushroom/Initialize()//Makes every shroom a little unique
melee_damage_lower += rand(3, 5)
melee_damage_upper += rand(10,20)
maxHealth += rand(40,60)
@@ -25,7 +25,7 @@
mob_size = MOB_SIZE_TINY
gold_core_spawnable = 1
/mob/living/simple_animal/hostile/retaliate/frog/New()
/mob/living/simple_animal/hostile/retaliate/frog/Initialize()
..()
if(prob(1))
name = "rare frog"
@@ -38,7 +38,7 @@
var/image/ghost_facial_hair = null
var/random = TRUE //if you want random names for ghosts or not
/mob/living/simple_animal/hostile/retaliate/ghost/New()
/mob/living/simple_animal/hostile/retaliate/ghost/Initialize()
..()
if(!random)
give_hair()
@@ -51,7 +51,7 @@
// No movement while seen code.
/mob/living/simple_animal/hostile/statue/New(loc, var/mob/living/creator)
/mob/living/simple_animal/hostile/statue/Initialize(mapload, var/mob/living/creator)
..()
// Give spells
mob_spell_list += new /obj/effect/proc_holder/spell/aoe_turf/flicker_lights(src)
@@ -50,7 +50,7 @@
icon_living = "stickdog"
icon_dead = "stickdog_dead"
/mob/living/simple_animal/hostile/stickman/New(var/turf/loc, var/wizard_summoned)
/mob/living/simple_animal/hostile/stickman/Initialize(mapload, var/wizard_summoned)
..()
new /obj/effect/overlay/temp/paper_scatter(src)
summoned_by_wizard = wizard_summoned
@@ -37,7 +37,7 @@
var/next_cast = 0
/mob/living/simple_animal/hostile/wizard/New()
/mob/living/simple_animal/hostile/wizard/Initialize()
..()
fireball = new /obj/effect/proc_holder/spell/aimed/fireball
fireball.clothes_req = 0
@@ -99,7 +99,7 @@
var/obj/item/held_item = null
/mob/living/simple_animal/parrot/New()
/mob/living/simple_animal/parrot/Initialize()
..()
if(!ears)
var/headset = pick(/obj/item/device/radio/headset/headset_sec, \
@@ -876,7 +876,7 @@
var/longest_survival = 0
var/longest_deathstreak = 0
/mob/living/simple_animal/parrot/Poly/New()
/mob/living/simple_animal/parrot/Poly/Initialize()
ears = new /obj/item/device/radio/headset/headset_eng(src)
available_channels = list(":e")
Read_Memory()
@@ -949,7 +949,7 @@
incorporeal_move = 1
butcher_results = list(/obj/item/weapon/ectoplasm = 1)
/mob/living/simple_animal/parrot/Poly/ghost/New()
/mob/living/simple_animal/parrot/Poly/ghost/Initialize()
memory_saved = 1 //At this point nothing is saved
..()
@@ -85,7 +85,7 @@
//domestication
var/tame = 0
/mob/living/simple_animal/New()
/mob/living/simple_animal/Initialize()
..()
handcrafting = new()
if(gender == PLURAL)

Some files were not shown because too many files have changed in this diff Show More