Merge pull request #9199 from MistakeNot4892/shells

Various post-flying bots fixes.
This commit is contained in:
Atermonera
2023-08-14 21:38:29 -08:00
committed by GitHub
8 changed files with 65 additions and 45 deletions
+28 -25
View File
@@ -21,7 +21,7 @@
else
for(var/part in required_parts)
if(!parts[part])
var/obj/item/part_type = part
var/obj/item/part_type = required_parts[part]
. += SPAN_WARNING("It is missing \a [initial(part_type.name)]")
/obj/item/robot_parts/frame/update_model_info(var/model)
@@ -85,36 +85,38 @@
var/obj/item/mmi/M = W
var/mob/living/carbon/brain/B = M.brainmob
if(!B)
to_chat(user, SPAN_WARNING("Sticking an empty [W.name] into the frame would sort of defeat the purpose."))
return
if(!istype(M, /obj/item/mmi/inert))
if(!B)
to_chat(user, SPAN_WARNING("Sticking an empty [W.name] into the frame would sort of defeat the purpose."))
return
if(jobban_isbanned(B, "Robot"))
to_chat(user, SPAN_WARNING("\The [W] does not seem to fit."))
return
if(jobban_isbanned(B, "Cyborg"))
to_chat(user, SPAN_WARNING("\The [W] does not seem to fit."))
return
if(B.stat == DEAD)
to_chat(user, SPAN_WARNING("Sticking a dead [W.name] into the frame would sort of defeat the purpose."))
return
if(B.stat == DEAD)
to_chat(user, SPAN_WARNING("Sticking a dead [W.name] into the frame would sort of defeat the purpose."))
return
var/ghost_can_reenter = 0
if(B.mind)
if(B.key)
ghost_can_reenter = TRUE
else
for(var/mob/observer/dead/G in player_list)
if(G.can_reenter_corpse && G.mind == B.mind)
ghost_can_reenter = TRUE
//Jamming a ghosted brain into a borg is likely detrimental, and may result in some problems.
to_chat(user, SPAN_NOTICE("\The [W] is completely unresponsive, but it may be able to auto-resuscitate if you leave it be for awhile."))
break
var/ghost_can_reenter = 0
if(B.mind)
if(B.key)
ghost_can_reenter = TRUE
else
for(var/mob/observer/dead/G in player_list)
if(G.can_reenter_corpse && G.mind == B.mind)
ghost_can_reenter = TRUE
//Jamming a ghosted brain into a borg is likely detrimental, and may result in some problems.
to_chat(user, SPAN_NOTICE("\The [W] is completely unresponsive, but it may be able to auto-resuscitate if you leave it be for awhile."))
break
if(!ghost_can_reenter)
to_chat(user, SPAN_WARNING("\The [W] is completely unresponsive; there's no point."))
return
if(!ghost_can_reenter)
to_chat(user, SPAN_WARNING("\The [W] is completely unresponsive; there's no point."))
return
if(!user.unEquip(W))
return
var/mob/living/silicon/robot/O = new product(get_turf(loc))
if(!O)
return
@@ -123,7 +125,8 @@
O.invisibility = 0
O.custom_name = created_name
O.updatename("Default")
B.mind.transfer_to(O)
if(B)
B.mind.transfer_to(O)
if(O.mind && O.mind.assigned_role)
O.job = O.mind.assigned_role
else