mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 14:00:18 +01:00
Some Robot Fixes (#20049)
Fixed robots duplication on insertion of posibrain without a player. Fixed runtime that caused the above. Fixed runtime on cyborg building inspection. Fixed runtime on cyborg building due to uninitalized list vars. Fixes #20040
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
/obj/item/robot_parts/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
if(is_adjacent)
|
||||
. = report_missing_parts(user)
|
||||
. += report_missing_parts(user)
|
||||
|
||||
/obj/item/robot_parts/proc/report_missing_parts(var/mob/user)
|
||||
. = list()
|
||||
@@ -259,7 +259,7 @@
|
||||
C.replace_cell(chest.cell)
|
||||
//so people won't mess around with the chassis until it is deleted
|
||||
forceMove(new_shell)
|
||||
M.brainmob.mind.transfer_to(new_shell)
|
||||
M.brainmob.mind?.transfer_to(new_shell)
|
||||
qdel(M)
|
||||
new_shell.add_language(LANGUAGE_EAL)
|
||||
var/newname = sanitizeSafe( tgui_input_text(new_shell, "Enter a name, or leave blank for the default name.", "Name change", "", MAX_NAME_LEN), MAX_NAME_LEN )
|
||||
@@ -289,7 +289,7 @@
|
||||
O.custom_name = created_name
|
||||
O.updatename("Default")
|
||||
|
||||
M.brainmob.mind.transfer_to(O)
|
||||
M.brainmob.mind?.transfer_to(O)
|
||||
|
||||
O.job = "Cyborg"
|
||||
O.cell = chest.cell
|
||||
|
||||
@@ -132,9 +132,9 @@
|
||||
// Overlays
|
||||
var/has_cut_eye_overlay
|
||||
var/image/eye_overlay
|
||||
var/list/image/cached_eye_overlays
|
||||
var/list/image/cached_eye_overlays = list()
|
||||
var/image/panel_overlay
|
||||
var/list/image/cached_panel_overlays
|
||||
var/list/image/cached_panel_overlays = list()
|
||||
var/image/shield_overlay
|
||||
var/datum/weakref/holo_map
|
||||
|
||||
@@ -400,6 +400,9 @@
|
||||
/mob/living/silicon/robot/verb/Namepick()
|
||||
set category = "Robot Commands"
|
||||
|
||||
if(!src.mind)
|
||||
return
|
||||
|
||||
spawn(0)
|
||||
var/newname
|
||||
newname = sanitizeSafe(input(src, "You are a robot. Enter a name, or leave blank for the default name.", "Name change") as text, MAX_NAME_LEN)
|
||||
|
||||
Reference in New Issue
Block a user