mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
pAI mulebots no longer stuns people (#18965)
* pAI mulebots no longer stun * Makes the pAI insertion a proc so it can be overidden for the mulebot feedback
This commit is contained in:
@@ -257,29 +257,7 @@
|
||||
else
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
else if(istype(W, /obj/item/device/paicard))
|
||||
if(paicard)
|
||||
user << "<span class='warning'>A [paicard] is already inserted!</span>"
|
||||
else if(allow_pai && !key)
|
||||
if(!locked && !open)
|
||||
var/obj/item/device/paicard/card = W
|
||||
if(card.pai && card.pai.mind)
|
||||
if(!user.drop_item())
|
||||
return
|
||||
W.forceMove(src)
|
||||
paicard = card
|
||||
user.visible_message("[user] inserts [W] into [src]!","<span class='notice'>You insert [W] into [src].</span>")
|
||||
paicard.pai.mind.transfer_to(src)
|
||||
src << "<span class='notice'>You sense your form change as you are uploaded into [src].</span>"
|
||||
bot_name = name
|
||||
name = paicard.pai.name
|
||||
faction = user.faction
|
||||
add_logs(user, paicard.pai, "uploaded to [src.bot_name],")
|
||||
else
|
||||
user << "<span class='warning'>[W] is inactive.</span>"
|
||||
else
|
||||
user << "<span class='warning'>The personality slot is locked.</span>"
|
||||
else
|
||||
user << "<span class='warning'>[src] is not compatible with [W]</span>"
|
||||
insertpai(user, W)
|
||||
else if(istype(W, /obj/item/weapon/hemostat) && paicard)
|
||||
if(open)
|
||||
user << "<span class='warning'>Close the access panel before manipulating the personality slot!</span>"
|
||||
@@ -864,6 +842,31 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
eject += "<BR>"
|
||||
return eject
|
||||
|
||||
/mob/living/simple_animal/bot/proc/insertpai(mob/user, obj/item/device/paicard/card)
|
||||
if(paicard)
|
||||
user << "<span class='warning'>A [paicard] is already inserted!</span>"
|
||||
else if(allow_pai && !key)
|
||||
if(!locked && !open)
|
||||
if(card.pai && card.pai.mind)
|
||||
if(!user.drop_item())
|
||||
return
|
||||
card.forceMove(src)
|
||||
paicard = card
|
||||
user.visible_message("[user] inserts [card] into [src]!","<span class='notice'>You insert [card] into [src].</span>")
|
||||
paicard.pai.mind.transfer_to(src)
|
||||
src << "<span class='notice'>You sense your form change as you are uploaded into [src].</span>"
|
||||
bot_name = name
|
||||
name = paicard.pai.name
|
||||
faction = user.faction
|
||||
add_logs(user, paicard.pai, "uploaded to [bot_name],")
|
||||
return 1
|
||||
else
|
||||
user << "<span class='warning'>[card] is inactive.</span>"
|
||||
else
|
||||
user << "<span class='warning'>The personality slot is locked.</span>"
|
||||
else
|
||||
user << "<span class='warning'>[src] is not compatible with [card]</span>"
|
||||
|
||||
/mob/living/simple_animal/bot/proc/ejectpai(mob/user = null, announce = 1)
|
||||
if(paicard)
|
||||
if(mind && paicard.pai)
|
||||
@@ -918,4 +921,4 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
if(!data_hud_type)
|
||||
return
|
||||
var/datum/atom_hud/datahud = huds[data_hud_type]
|
||||
datahud.add_hud_to(src)
|
||||
datahud.add_hud_to(src)
|
||||
|
||||
@@ -639,11 +639,12 @@ var/global/mulebot_count = 0
|
||||
if(istype(M,/mob/living/silicon/robot))
|
||||
visible_message("<span class='danger'>[src] bumps into [M]!</span>")
|
||||
else
|
||||
add_logs(src, M, "knocked down")
|
||||
visible_message("<span class='danger'>[src] knocks over [M]!</span>")
|
||||
M.stop_pulling()
|
||||
M.Stun(8)
|
||||
M.Weaken(5)
|
||||
if(!paicard)
|
||||
add_logs(src, M, "knocked down")
|
||||
visible_message("<span class='danger'>[src] knocks over [M]!</span>")
|
||||
M.stop_pulling()
|
||||
M.Stun(8)
|
||||
M.Weaken(5)
|
||||
return ..()
|
||||
|
||||
// called from mob/living/carbon/human/Crossed()
|
||||
@@ -737,6 +738,10 @@ var/global/mulebot_count = 0
|
||||
unload(get_dir(loc, A))
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/insertpai(mob/user, obj/item/device/paicard/card)
|
||||
if(..())
|
||||
visible_message("[src] safeties are locked on.")
|
||||
|
||||
#undef SIGH
|
||||
#undef ANNOYED
|
||||
|
||||
Reference in New Issue
Block a user