Tweak alien eggs

This commit is contained in:
Chompstation Bot
2021-07-20 03:19:59 +00:00
parent 4a6c523aa6
commit ba4dc7c3ff
4 changed files with 67 additions and 26 deletions

View File

@@ -37,54 +37,95 @@
/obj/structure/alien/egg/update_icon()
if(progress == -1)
icon_state = "egg_hatched"
icon_state = "egg_opened"
else if(progress < MAX_PROGRESS)
icon_state = "egg_growing"
else
icon_state = "egg"
/obj/structure/alien/egg/attack_ghost(var/mob/observer/ghost/user)
if(progress == -1) //Egg has been hatched.
return
// Ghostjoinable icon
var/static/image/I
if(!I)
I = image('icons/mob/hud_vr.dmi', "ghostjoin")
I.invisibility = INVISIBILITY_OBSERVER
I.plane = PLANE_GHOSTS
I.appearance_flags = KEEP_APART|RESET_TRANSFORM
if(progress < MAX_PROGRESS)
to_chat(user, "\The [src] has not yet matured.")
return
if(progress >= MAX_PROGRESS)
add_overlay(I)
else
cut_overlay(I)
if(!user.MayRespawn(1))
/obj/structure/alien/egg/attack_ghost(var/mob/observer/dead/user)
// Still a ghost?
if(!istype(user))
tgui_alert_async(user, "You have to be an observer to join as this Xenomorph larva.")
return
// Check for bans properly.
<<<<<<< HEAD:code/game/objects/effects/alien/alien egg.dm
if(jobban_isbanned(user, MODE_XENOMORPH))
to_chat(user, "<span class='danger'>You are banned from playing a Genaprawn.</span>") //CHOMPedit
||||||| parent of b004256516... Merge pull request #11163 from VOREStation/Arokha/alientweaks:code/game/objects/structures/alien/alien egg.dm
if(jobban_isbanned(user, "Xenomorph"))
to_chat(user, "<span class='danger'>You are banned from playing a Xenomorph.</span>")
=======
if(jobban_isbanned(user, "Xenomorph"))
tgui_alert_async(user, "You are banned from playing a Xenomorph, so you can't join as this Xenomorph larva.")
>>>>>>> b004256516... Merge pull request #11163 from VOREStation/Arokha/alientweaks:code/game/objects/structures/alien/alien egg.dm
return
<<<<<<< HEAD:code/game/objects/effects/alien/alien egg.dm
var/confirm = alert(user, "Are you sure you want to join as a Genaprawn larva?", "Become Larva", "No", "Yes") //CHOMPedit
if(!src || confirm != "Yes")
||||||| parent of b004256516... Merge pull request #11163 from VOREStation/Arokha/alientweaks:code/game/objects/structures/alien/alien egg.dm
var/confirm = alert(user, "Are you sure you want to join as a Xenomorph larva?", "Become Larva", "No", "Yes")
if(!src || confirm != "Yes")
=======
// Check for respawn
if(!user.MayRespawn(1))
tgui_alert_async(user, "You aren't allowed to respawn, so you can't join as this Xenomorph larva.")
>>>>>>> b004256516... Merge pull request #11163 from VOREStation/Arokha/alientweaks:code/game/objects/structures/alien/alien egg.dm
return
if(!user || !user.ckey)
if(progress == -1)
tgui_alert_async(user, "That egg has already hatched.")
else if(progress >= MAX_PROGRESS)
tgui_alert_async(user, "Are you sure you want to join as a Xenomorph larva?", "Become Larva", list("Yes","No"), CALLBACK(src, .proc/ghost_dunk), 20 SECONDS)
else
tgui_alert_async(user, "\The [src] has not yet matured.")
/obj/structure/alien/egg/proc/ghost_dunk(choice)
if(choice != "Yes")
return
var/mob/observer/dead/user = usr
if(progress < MAX_PROGRESS || !istype(user))
return
if(progress == -1) //Egg has been hatched.
to_chat(user, "Too slow...")
return
flick("egg_opening",src)
progress = -1 // No harvesting pls.
sleep(5)
flick("egg_opening",src)
sleep(5) //5ds animation
if(!src || !user)
if(!src || !istype(user))
visible_message("<span class='alium'>\The [src] writhes with internal motion, but nothing comes out.</span>")
progress = MAX_PROGRESS // Someone else can have a go.
return // What a pain.
// Create the mob, transfer over key.
var/mob/living/carbon/alien/larva/larva = new(get_turf(src))
// Move the ghost in
if(user.mind)
user.mind.active = TRUE
user.mind.transfer_to(larva)
else
larva.ckey = user.ckey
spawn(-1)
if(user) qdel(user) // Remove the keyless ghost if it exists.
qdel(user)
visible_message("<span class='alium'>\The [src] splits open with a wet slithering noise, and \the [larva] writhes free!</span>")

View File

@@ -32,7 +32,7 @@
. = ..()
/mob/living/silicon/robot/platform/attack_ghost(mob/observer/ghost/user)
/mob/living/silicon/robot/platform/attack_ghost(mob/observer/dead/user)
if(client || key || stat == DEAD || !ticker || !ticker.mode)
return ..()

View File

@@ -97,7 +97,7 @@
uninstall_component(user, portable_drive)
update_uis()
/obj/item/modular_computer/attack_ghost(var/mob/observer/ghost/user)
/obj/item/modular_computer/attack_ghost(var/mob/observer/dead/user)
if(enabled)
tgui_interact(user)
else if(check_rights(R_ADMIN|R_EVENT, 0, user))

View File

@@ -89,7 +89,7 @@
return FALSE
return TRUE
/mob/observer/ghost/may_climb_ladders(var/ladder)
/mob/observer/dead/may_climb_ladders(var/ladder)
return TRUE
/obj/structure/ladder/proc/climbLadder(var/mob/M, var/obj/target_ladder)