Initialize bots (#18558)

This commit is contained in:
moxian
2022-07-27 15:07:49 +01:00
committed by GitHub
parent 162ad961ac
commit b8e15e1dce
10 changed files with 30 additions and 47 deletions
-6
View File
@@ -88,12 +88,6 @@
announce(H)
/datum/job/proc/get_access()
if(!GLOB?.configuration?.jobs) //Needed for robots.
// AA TODO: Remove this once mulebots and stuff use Initialize()
// Update: Now that the map is loaded after SSjobs this might not be needed
// However, I dont want to take that chance
return src.minimal_access.Copy()
if(GLOB.configuration.jobs.jobs_have_minimal_access)
return src.minimal_access.Copy()
else
@@ -141,18 +141,8 @@
update_icon(UPDATE_ICON_STATE)
update_controls()
/mob/living/simple_animal/bot/New()
/*
HEY! LISTEN!
I see you're poking the the bot/New() proc
Assuming you are converting this to Initialize() [yay], please see my note in
code\game\jobs\job\job.dm | /datum/job/proc/get_access()
Theres a useless check that bugs me but needs to exist because these things New()
-AA07
*/
..()
/mob/living/simple_animal/bot/Initialize(mapload)
. = ..()
GLOB.bots_list += src
icon_living = icon_state
icon_dead = icon_state
@@ -170,9 +160,9 @@
default_language = GLOB.all_languages["Galactic Common"]
bot_core = new bot_core_type(src)
spawn(30)
if(SSradio && bot_filter)
SSradio.add_object(bot_core, control_freq, bot_filter)
if(SSradio && bot_filter)
SSradio.add_object(bot_core, control_freq, bot_filter)
prepare_huds()
for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds)
@@ -31,8 +31,8 @@
var/next_dest
var/next_dest_loc
/mob/living/simple_animal/bot/cleanbot/New()
..()
/mob/living/simple_animal/bot/cleanbot/Initialize(mapload)
. = ..()
get_targets()
icon_state = "cleanbot[on]"
@@ -47,8 +47,8 @@
var/baton_delayed = FALSE
/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
if(created_lasercolor)
@@ -41,8 +41,8 @@
#define REPLACE_TILE 5
#define TILE_EMAG 6
/mob/living/simple_animal/bot/floorbot/New(mapload, new_toolbox_color)
..()
/mob/living/simple_animal/bot/floorbot/Initialize(mapload, new_toolbox_color)
. = ..()
toolbox_color = new_toolbox_color
update_icon()
var/datum/job/engineer/J = new/datum/job/engineer
@@ -55,13 +55,12 @@
visible_message("[src] flails his swords and pushes [C] out of it's way!" )
C.Weaken(4 SECONDS)
/mob/living/simple_animal/bot/secbot/griefsky/New()
..()
/mob/living/simple_animal/bot/secbot/griefsky/Initialize(mapload)
. = ..()
icon_state = "[base_icon][on]"
spawn(3)
var/datum/job/detective/J = new/datum/job/detective
access_card.access += J.get_access()
prev_access = access_card.access
var/datum/job/detective/J = new/datum/job/detective
access_card.access += J.get_access()
prev_access = access_card.access
/mob/living/simple_animal/bot/secbot/griefsky/Destroy()
QDEL_NULL(weapon)
@@ -92,8 +92,8 @@
radio_channel = "Syndicate"
radio_config = list("Common" = 1, "Medical" = 1, "Syndicate" = 1)
/mob/living/simple_animal/bot/medbot/syndicate/New()
..()
/mob/living/simple_animal/bot/medbot/syndicate/Initialize(mapload)
. = ..()
Radio.syndiekey = new /obj/item/encryptionkey/syndicate
/mob/living/simple_animal/bot/medbot/syndicate/emagged
@@ -118,8 +118,8 @@
if(skin)
. += "medskin_[skin]"
/mob/living/simple_animal/bot/medbot/New(loc, new_skin)
..()
/mob/living/simple_animal/bot/medbot/Initialize(mapload, new_skin)
. = ..()
var/datum/job/doctor/J = new /datum/job/doctor
access_card.access += J.get_access()
prev_access = access_card.access
@@ -53,8 +53,8 @@
/mob/living/simple_animal/bot/mulebot/get_cell()
return cell
/mob/living/simple_animal/bot/mulebot/New()
..()
/mob/living/simple_animal/bot/mulebot/Initialize(mapload)
. = ..()
wires = new /datum/wires/mulebot(src)
var/datum/job/cargo_tech/J = new/datum/job/cargo_tech
access_card.access = J.get_access()
@@ -85,13 +85,13 @@
arrest_type = TRUE
weaponscheck = TRUE
/mob/living/simple_animal/bot/secbot/New()
..()
/mob/living/simple_animal/bot/secbot/Initialize(mapload)
. = ..()
icon_state = "[base_icon][on]"
spawn(3)
var/datum/job/detective/J = new/datum/job/detective
access_card.access += J.get_access()
prev_access = access_card.access
var/datum/job/detective/J = new/datum/job/detective
access_card.access += J.get_access()
prev_access = access_card.access
//SECHUD
var/datum/atom_hud/secsensor = GLOB.huds[DATA_HUD_SECURITY_ADVANCED]
@@ -25,8 +25,8 @@
var/pathing_failed = FALSE
var/turf/spawn_turf
/mob/living/simple_animal/bot/ed209/syndicate/New()
..()
/mob/living/simple_animal/bot/ed209/syndicate/Initialize(mapload)
. = ..()
set_weapon()
update_icon()
spawn_turf = get_turf(src)