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
+3 -1
View File
@@ -123,7 +123,9 @@
/obj/structure/catwalk/Crossed(atom/movable/AM)
. = ..()
if(isliving(AM) && !AM.is_incorporeal())
playsound(src, pick('sound/effects/footstep/catwalk1.ogg', 'sound/effects/footstep/catwalk2.ogg', 'sound/effects/footstep/catwalk3.ogg', 'sound/effects/footstep/catwalk4.ogg', 'sound/effects/footstep/catwalk5.ogg'), 25, 1)
var/mob/living/M = AM
if(!M.is_floating)
playsound(src, pick('sound/effects/footstep/catwalk1.ogg', 'sound/effects/footstep/catwalk2.ogg', 'sound/effects/footstep/catwalk3.ogg', 'sound/effects/footstep/catwalk4.ogg', 'sound/effects/footstep/catwalk5.ogg'), 25, 1)
/obj/effect/catwalk_plated
name = "plated catwalk spawner"
-1
View File
@@ -113,7 +113,6 @@ note dizziness decrements automatically in the mob's Life() proc.
stop_floating()
return
floatiness = n
if(floatiness && !is_floating)
start_floating()
else if(!floatiness && is_floating)
@@ -29,7 +29,7 @@
module_category = ROBOT_MODULE_TYPE_FLYING
can_be_pushed = TRUE
sprites = list(
"Drone" = "drone-standard",
"Drone" = "robot",
"Pyralis" = "Glitterfly-Standard",
"Cabeiri" = "eyebot-standard"
)
@@ -463,8 +463,8 @@
LANGUAGE_ZADDAT = 1,
)
/obj/item/robot_module/robot/clerical/butler
display_name = "Butler"
/obj/item/robot_module/robot/clerical/service
display_name = "Service"
sprites = list(
"M-USE NanoTrasen" = "robotServ",
"Haruka" = "marinaSV",
@@ -504,7 +504,7 @@
)
emag = /obj/item/reagent_containers/food/drinks/bottle/small/beer
/obj/item/robot_module/robot/clerical/butler/flying
/obj/item/robot_module/robot/clerical/service/flying
module_category = ROBOT_MODULE_TYPE_FLYING
can_be_pushed = TRUE
sprites = list(
@@ -514,7 +514,7 @@
"Hydroponics Drone" = "drone-hydro"
)
/obj/item/robot_module/robot/clerical/butler/finalize_emag()
/obj/item/robot_module/robot/clerical/service/finalize_emag()
. = ..()
if(!emag.reagents)
emag.create_reagents(50)
@@ -523,7 +523,7 @@
emag.reagents.add_reagent("beer2", 50)
emag.name = "Mickey Finn's Special Brew"
/obj/item/robot_module/robot/clerical/butler/finalize_equipment()
/obj/item/robot_module/robot/clerical/service/finalize_equipment()
. = ..()
var/obj/item/rsf/M = locate() in modules
M.stored_matter = 30
@@ -7,12 +7,17 @@ GLOBAL_LIST_EMPTY(available_ai_shells)
var/deployed = FALSE
var/mob/living/silicon/ai/mainframe = null
// Premade AI shell, for roundstart shells.
// Premade AI shells, for roundstart landmark spawn.
/mob/living/silicon/robot/ai_shell/Initialize()
mmi = new /obj/item/mmi/inert/ai_remote(src)
post_mmi_setup()
return ..()
/mob/living/silicon/robot/flying/ai_shell/Initialize()
mmi = new /obj/item/mmi/inert/ai_remote(src)
post_mmi_setup()
return ..()
// Call after inserting or instantiating an MMI.
/mob/living/silicon/robot/proc/post_mmi_setup()
if(istype(mmi, /obj/item/mmi/inert/ai_remote))
@@ -128,8 +133,12 @@ GLOBAL_LIST_EMPTY(available_ai_shells)
icon = 'icons/mob/screen1.dmi'
icon_state = "x3"
delete_me = TRUE
var/shell_type = /mob/living/silicon/robot/ai_shell
/obj/effect/landmark/free_ai_shell/Initialize()
if(config.allow_ai_shells && config.give_free_ai_shell)
new /mob/living/silicon/robot/ai_shell(get_turf(src))
new shell_type(get_turf(src))
return ..()
/obj/effect/landmark/free_ai_shell/flying
shell_type = /mob/living/silicon/robot/flying/ai_shell
@@ -1,7 +1,6 @@
/mob/living/silicon/robot/flying
desc = "A utility robot with an anti-gravity hover unit and a lightweight frame."
icon = 'icons/mob/robots/robots_flying.dmi'
icon_state = "drone-standard"
module_category = ROBOT_MODULE_TYPE_FLYING
dismantle_type = /obj/item/robot_parts/frame/flyer
power_efficiency = 0.75
@@ -12,6 +11,12 @@
mob_swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL
mob_push_flags = MONKEY|SLIME|SIMPLE_ANIMAL
/mob/living/silicon/robot/flying/update_floating()
if(hovering)
make_floating(TRUE)
return
..()
/mob/living/silicon/robot/flying/initialize_components()
components["actuator"] = new/datum/robot_component/actuator(src)
components["radio"] = new/datum/robot_component/radio(src)
@@ -29,16 +34,18 @@
start_hovering()
/mob/living/silicon/robot/flying/proc/start_hovering()
hovering = TRUE
pass_flags |= PASSTABLE
default_pixel_y = 0
make_floating(10)
if(!hovering)
hovering = TRUE
pass_flags |= PASSTABLE
default_pixel_y = 0
update_floating()
/mob/living/silicon/robot/flying/proc/stop_hovering()
hovering = FALSE
pass_flags &= ~PASSTABLE
default_pixel_y = -8
stop_floating()
if(hovering)
hovering = FALSE
pass_flags &= ~PASSTABLE
default_pixel_y = -8
update_floating()
/mob/living/silicon/robot/flying/death()
. = ..()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 111 KiB

+1 -1
View File
@@ -14284,7 +14284,7 @@
/obj/effect/floor_decal/industrial/warning{
dir = 1
},
/obj/effect/landmark/free_ai_shell,
/obj/effect/landmark/free_ai_shell/flying,
/turf/simulated/floor/tiled/techfloor,
/area/surface/station/ai)
"iUT" = (