mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-07-17 11:13:15 +01:00
Added grafadreka.
More work on drakes. Added grafadreka den site. Working on refining drake AI. Fixing drake languages.
This commit is contained in:
@@ -76,7 +76,7 @@
|
||||
return TRUE
|
||||
if(try_grab_occupant(user))
|
||||
return TRUE
|
||||
if(!do_after(user, src, 1 SECOND))
|
||||
if(!do_after(user, 1 SECOND, src))
|
||||
return TRUE
|
||||
if(length(contents))
|
||||
to_chat(user, SPAN_WARNING("You can't hide in \the [src]; it's occupied."))
|
||||
@@ -104,7 +104,6 @@
|
||||
/obj/structure/animal_den/ghost_join
|
||||
var/mob/living/critter
|
||||
var/ban_check = "Critter"
|
||||
var/welcome_text
|
||||
|
||||
/obj/structure/animal_den/ghost_join/Initialize()
|
||||
. = ..()
|
||||
@@ -120,40 +119,39 @@
|
||||
critter = null
|
||||
|
||||
/obj/structure/animal_den/ghost_join/examine(mob/user, infix, suffix)
|
||||
. = ..()
|
||||
var/list/output = ..()
|
||||
if(isobserver(user))
|
||||
if(critter)
|
||||
if(ban_check && ckey_is_jobbanned(user.ckey, ban_check))
|
||||
to_chat(user, SPAN_WARNING("You are banned from [ban_check] roles and cannot join via this den."))
|
||||
output += SPAN_WARNING("You are banned from [ban_check] roles and cannot join via this den.")
|
||||
else if(user.MayRespawn(TRUE))
|
||||
to_chat(user, SPAN_NOTICE("<b>Click on the den to join as \a [critter].</b>"))
|
||||
output += SPAN_NOTICE("<b>Click on the den to join as \a [critter].</b>")
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("This den is no longer available for joining."))
|
||||
output += SPAN_WARNING("This den is no longer available for joining.")
|
||||
return output
|
||||
|
||||
/obj/structure/animal_den/ghost_join/attack_ghost(mob/user)
|
||||
if(critter)
|
||||
transfer_personality(user)
|
||||
if(!critter)
|
||||
return ..()
|
||||
if(ban_check && ckey_is_jobbanned(user.ckey, ban_check))
|
||||
to_chat(user, SPAN_WARNING("You are banned from [ban_check] roles and cannot join via this den."))
|
||||
return
|
||||
return ..()
|
||||
transfer_personality(user)
|
||||
|
||||
/obj/structure/animal_den/ghost_join/proc/transfer_personality(var/mob/user)
|
||||
|
||||
set waitfor = FALSE
|
||||
if(!critter)
|
||||
return
|
||||
|
||||
// Transfer over mind and key.
|
||||
if(user.mind)
|
||||
user.mind.transfer_to(critter)
|
||||
else
|
||||
critter.key = user.key
|
||||
critter.key = user.key
|
||||
|
||||
var/mob/living/critter_ref = critter
|
||||
critter = null
|
||||
|
||||
// Sleep long enough for them to login and get any other text out of the way.
|
||||
sleep(1)
|
||||
to_chat(critter_ref, SPAN_NOTICE("<b>You are \a [critter]!</b>"))
|
||||
if(welcome_text)
|
||||
to_chat(critter_ref, SPAN_NOTICE(welcome_text))
|
||||
|
||||
// Sleep long enough for the logged-in critter to update state and regen icon.
|
||||
sleep(SSmobs.wait)
|
||||
if(critter_ref.resting) // get up lazybones
|
||||
|
||||
@@ -97,9 +97,13 @@
|
||||
if(!can_forage(critter))
|
||||
to_chat(critter, SPAN_WARNING("You cannot see any edible fruit on \the [src]."))
|
||||
return TRUE
|
||||
critter.set_AI_busy(TRUE)
|
||||
show_animal_foraging_message(critter)
|
||||
if(!do_after(critter, 2 SECONDS, src) || QDELETED(src) || !can_forage(user))
|
||||
critter.setClickCooldown(5 SECONDS)
|
||||
if(!do_after(critter, 5 SECONDS, src) || QDELETED(src) || !can_forage(user))
|
||||
critter.set_AI_busy(FALSE)
|
||||
return TRUE
|
||||
critter.set_AI_busy(FALSE)
|
||||
show_animal_eating_message(critter)
|
||||
playsound(critter, 'sound/items/eatfood.ogg', rand(10,50), 1)
|
||||
harvest_count++
|
||||
|
||||
Reference in New Issue
Block a user