mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 03:26:37 +01:00
Robot code clean up and fixes.
Fixes runtime when a borg is reset. Fixes issue where /proc/select_active_ai_with_fewest_borgs() would not always return the intended AI. Fixes issues with new borgs spamming the master AI with creation messages under some circumstances.
This commit is contained in:
@@ -226,7 +226,6 @@
|
||||
|
||||
feedback_inc("cyborg_birth",1)
|
||||
callHook("borgify", list(O))
|
||||
O.notify_ai(1)
|
||||
O.Namepick()
|
||||
|
||||
del(src)
|
||||
|
||||
@@ -36,12 +36,12 @@
|
||||
icon = 'icons/mob/custom-synthetic.dmi'
|
||||
R.icon_state = "[R.ckey]-Standard"
|
||||
del(R.module)
|
||||
R.notify_ai(ROBOT_NOTIFICATION_MODULE_RESET, R.module.name)
|
||||
R.module = null
|
||||
R.camera.remove_networks(list("Engineering","Medical","MINE"))
|
||||
R.updatename("Default")
|
||||
R.status_flags |= CANPUSH
|
||||
R.updateicon()
|
||||
R.notify_ai(2)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
/obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
R.notify_ai(3, R.name, heldname)
|
||||
R.notify_ai(ROBOT_NOTIFICATION_NEW_NAME, R.name, heldname)
|
||||
R.name = heldname
|
||||
R.custom_name = heldname
|
||||
R.real_name = heldname
|
||||
@@ -84,7 +84,7 @@
|
||||
R.stat = CONSCIOUS
|
||||
dead_mob_list -= R
|
||||
living_mob_list |= R
|
||||
R.notify_ai(1)
|
||||
R.notify_ai(ROBOT_NOTIFICATION_NEW_UNIT)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user