mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 04:22:39 +01:00
pAI Flashlight Fix (#8884)
This commit is contained in:
@@ -202,25 +202,16 @@ var/list/holder_mob_icon_cache = list()
|
||||
|
||||
src.verbs += /mob/living/proc/get_holder_location//This has to be before we move the mob into the holder
|
||||
|
||||
|
||||
spawn(2)
|
||||
var/obj/item/holder/H = new holder_type(loc)
|
||||
|
||||
src.forceMove(H)
|
||||
|
||||
|
||||
H.contained = src
|
||||
|
||||
|
||||
|
||||
if (src.stat == DEAD)
|
||||
H.held_death()//We've scooped up an animal that's already dead. use the proper dead icons
|
||||
else
|
||||
H.isalive = 1//We note that the mob is alive when picked up. If it dies later, we can know that its death happened while held, and play its deathmessage for it
|
||||
|
||||
|
||||
|
||||
|
||||
var/success = 0
|
||||
if (src == user)
|
||||
success = grabber.put_in_any_hand_if_possible(H, 0,1,1)
|
||||
@@ -238,14 +229,18 @@ var/list/holder_mob_icon_cache = list()
|
||||
to_chat(src, "<span class='notice'>[grabber] scoops you up.</span>")
|
||||
|
||||
H.sync(src)
|
||||
|
||||
else
|
||||
to_chat(user, "Failed, try again!")
|
||||
//If the scooping up failed something must have gone wrong
|
||||
H.release_mob()
|
||||
|
||||
post_scoop()
|
||||
|
||||
return success
|
||||
|
||||
// Override to add stuff that should happen when scooping
|
||||
/mob/living/proc/post_scoop()
|
||||
return
|
||||
|
||||
/mob/living/proc/get_holder_location()
|
||||
set category = "Abilities"
|
||||
@@ -601,6 +596,7 @@ var/list/holder_mob_icon_cache = list()
|
||||
/obj/item/holder/pai/rabbit
|
||||
icon_state = "rabbit_rest"
|
||||
item_state = "rabbit"
|
||||
|
||||
/obj/item/holder/pai/custom
|
||||
var/customsprite = 1
|
||||
|
||||
|
||||
@@ -139,6 +139,17 @@
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
/mob/living/silicon/pai/set_light(l_range, l_power, l_color, uv, angle, no_update)
|
||||
..()
|
||||
if(istype(loc, /obj/item/holder/pai))
|
||||
var/obj/item/holder/pai/P = loc
|
||||
P.set_light(l_range, l_power, l_color, uv, angle, no_update)
|
||||
|
||||
/mob/living/silicon/pai/post_scoop()
|
||||
if(istype(loc, /obj/item/holder/pai))
|
||||
var/obj/item/holder/pai/P = loc
|
||||
P.set_light(light_range, light_power, light_color, uv_intensity, light_wedge)
|
||||
|
||||
/mob/living/silicon/pai/Initialize(mapload)
|
||||
var/obj/item/device/paicard/paicard = loc
|
||||
if (!istype(paicard))
|
||||
|
||||
Reference in New Issue
Block a user