Skip to content

Commit

Permalink
Fixing drones/robots/bots spawning meat when gibbed.
Browse files Browse the repository at this point in the history
  • Loading branch information
MistakeNot4892 committed Feb 8, 2025
1 parent 6ed1773 commit d21758d
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 17 deletions.
3 changes: 3 additions & 0 deletions code/modules/mob/living/bot/bot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@

layer = HIDING_MOB_LAYER

/mob/living/bot/isSynthetic()
return TRUE

/mob/living/bot/Initialize()
. = ..()
update_icon()
Expand Down
10 changes: 10 additions & 0 deletions code/modules/mob/living/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1174,3 +1174,13 @@

/mob/living/human/get_attack_telegraph_delay()
return client ? 0 : DEFAULT_ATTACK_COOLDOWN

/mob/living/human/isSynthetic()
if(isnull(full_prosthetic))
robolimb_count = 0
var/list/limbs = get_external_organs()
for(var/obj/item/organ/external/E in limbs)
if(BP_IS_PROSTHETIC(E))
robolimb_count++
full_prosthetic = robolimb_count > 0 && (robolimb_count == LAZYLEN(limbs)) //If no organs, no way to tell
return full_prosthetic
2 changes: 2 additions & 0 deletions code/modules/mob/living/silicon/silicon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -461,3 +461,5 @@
stance_damage = 0
return

/mob/living/silicon/isSynthetic()
return TRUE
6 changes: 5 additions & 1 deletion code/modules/mob/living/simple_animal/hostile/bad_drone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
mob_size = MOB_SIZE_TINY
gene_damage = -1
attack_delay = DEFAULT_QUICK_COOLDOWN
butchery_data = /decl/butchery_data/synthetic
ai = /datum/mob_controller/aggressive/rogue_drone
var/corpse = /obj/effect/decal/cleanable/blood/gibs/robot

Expand Down Expand Up @@ -43,4 +44,7 @@
if(. && !gibbed)
if(corpse)
new corpse (loc)
qdel(src)
qdel(src)

/mob/living/simple_animal/hostile/rogue_drone/isSynthetic()
return TRUE
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@
C.origin_tech = @'{"[TECH_ESOTERIC]":[rand(3, 6)]}'
return ..()

/mob/living/simple_animal/hostile/malf_drone/isSynthetic()
return TRUE

/obj/item/projectile/beam/drone
damage = 15

Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1488,3 +1488,6 @@
/mob/proc/has_magnetised_footing()
var/obj/item/shoes = get_equipped_item(slot_shoes_str)
return istype(shoes) && (shoes.item_flags & ITEM_FLAG_MAGNETISED)

/mob/proc/isSynthetic()
return FALSE
16 changes: 0 additions & 16 deletions code/modules/mob/mob_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,6 @@
/proc/mob_size_difference(var/mob_size_A, var/mob_size_B)
return round(log(2, mob_size_A/mob_size_B), 1)

/mob/proc/isSynthetic()
return 0

/mob/living/human/isSynthetic()
if(isnull(full_prosthetic))
robolimb_count = 0
var/list/limbs = get_external_organs()
for(var/obj/item/organ/external/E in limbs)
if(BP_IS_PROSTHETIC(E))
robolimb_count++
full_prosthetic = robolimb_count > 0 && (robolimb_count == LAZYLEN(limbs)) //If no organs, no way to tell
return full_prosthetic

/mob/living/silicon/isSynthetic()
return 1

/mob/proc/isMonkey()
return 0

Expand Down

0 comments on commit d21758d

Please sign in to comment.