diff --git a/_maps/map_files/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm index b06110d25e..3eeba6668a 100644 --- a/_maps/map_files/BoxStation/BoxStation.dmm +++ b/_maps/map_files/BoxStation/BoxStation.dmm @@ -49988,7 +49988,7 @@ /turf/open/floor/circuit, /area/ai_monitored/turret_protected/aisat/hallway) "cvx" = ( -/obj/effect/landmark/tripai, +/obj/effect/landmark/start/ai/secondary, /obj/item/device/radio/intercom{ anyai = 1; freerange = 1; @@ -50027,7 +50027,7 @@ /turf/open/floor/plasteel/dark, /area/ai_monitored/turret_protected/aisat/hallway) "cvA" = ( -/obj/effect/landmark/tripai, +/obj/effect/landmark/start/ai/secondary, /obj/item/device/radio/intercom{ anyai = 1; freerange = 1; diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index 89db88e0a4..097aa38fab 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -40033,7 +40033,7 @@ pixel_x = 4; req_access_txt = "16" }, -/obj/effect/landmark/tripai, +/obj/effect/landmark/start/ai/secondary, /turf/open/floor/circuit/green, /area/ai_monitored/turret_protected/ai) "bEg" = ( @@ -40147,7 +40147,7 @@ pixel_x = -3; req_access_txt = "16" }, -/obj/effect/landmark/tripai, +/obj/effect/landmark/start/ai/secondary, /turf/open/floor/circuit/green, /area/ai_monitored/turret_protected/ai) "bEn" = ( diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index 14759d5909..e8537b432b 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -24400,7 +24400,7 @@ /turf/open/floor/wood, /area/library) "aZQ" = ( -/obj/effect/landmark/tripai, +/obj/effect/landmark/start/ai/secondary, /obj/item/device/radio/intercom{ anyai = 1; freerange = 1; @@ -24502,7 +24502,7 @@ }, /area/ai_monitored/turret_protected/ai) "aZY" = ( -/obj/effect/landmark/tripai, +/obj/effect/landmark/start/ai/secondary, /obj/item/device/radio/intercom{ anyai = 1; freerange = 1; diff --git a/_maps/map_files/PubbyStation/PubbyStation.dmm b/_maps/map_files/PubbyStation/PubbyStation.dmm index b6d24d940c..01c32123e6 100644 --- a/_maps/map_files/PubbyStation/PubbyStation.dmm +++ b/_maps/map_files/PubbyStation/PubbyStation.dmm @@ -96,7 +96,7 @@ /obj/structure/cable/yellow{ icon_state = "2-4" }, -/obj/effect/landmark/tripai, +/obj/effect/landmark/start/ai/secondary, /obj/item/device/radio/intercom{ anyai = 1; broadcasting = 0; @@ -145,7 +145,7 @@ areastring = "/area/ai_monitored/turret_protected/ai"; pixel_y = 24 }, -/obj/effect/landmark/tripai, +/obj/effect/landmark/start/ai/secondary, /obj/item/device/radio/intercom{ anyai = 1; broadcasting = 0; diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index f8420456de..8f0bbae4b6 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -186,6 +186,12 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark) name = "AI" icon_state = "AI" delete_after_roundstart = FALSE + var/primary_ai = TRUE + +/obj/effect/landmark/start/ai/secondary + icon = 'icons/effects/landmarks_static.dmi' + icon_state = "ai_spawn" + primary_ai = FALSE //Department Security spawns @@ -274,12 +280,6 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player) name = "Observer-Start" icon_state = "observer_start" -// triple ais. -/obj/effect/landmark/tripai - name = "tripai" - icon_state = "ai_spawn" - layer = MOB_LAYER - // xenos. /obj/effect/landmark/xeno_spawn name = "xeno_spawn" diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 968e6fe983..59aeec5b3c 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -329,30 +329,30 @@ return ..() /mob/proc/AIize(transfer_after = TRUE) - if(client) - stop_sound_channel(CHANNEL_LOBBYMUSIC) - - var/turf/loc_landmark - for(var/obj/effect/landmark/start/sloc in GLOB.landmarks_list) - if(sloc.name != "AI") - continue + var/list/turf/landmark_loc = list() + for(var/obj/effect/landmark/start/ai/sloc in GLOB.landmarks_list) if(locate(/mob/living/silicon/ai) in sloc.loc) continue - loc_landmark = sloc.loc - if(!loc_landmark) - for(var/obj/effect/landmark/tripai/L in GLOB.landmarks_list) - if(locate(/mob/living/silicon/ai) in L.loc) - continue - loc_landmark = L.loc - if(!loc_landmark) + if(sloc.primary_ai) + landmark_loc += sloc.loc + break + landmark_loc += sloc.loc + if(!landmark_loc.len) to_chat(src, "Oh god sorry we can't find an unoccupied AI spawn location, so we're spawning you on top of someone.") for(var/obj/effect/landmark/start/ai/sloc in GLOB.landmarks_list) - loc_landmark = sloc.loc + landmark_loc += sloc.loc + + if(!landmark_loc.len) + message_admins("[src] cannot be made an AI as there are no valid spawn points. Yell at a mapper!") + return + + if(client) + stop_sound_channel(CHANNEL_LOBBYMUSIC) if(!transfer_after) mind.active = FALSE - . = new /mob/living/silicon/ai(loc_landmark, null, src) + . = new /mob/living/silicon/ai(pick(landmark_loc), null, src) qdel(src)