Dionae can now drop nymphs they've picked up (#23020)

* the feature

* sirryan review

* oopsies
(adds an #undef)
This commit is contained in:
JimKil3
2023-10-31 18:36:53 +00:00
committed by GitHub
parent 5dff836b09
commit a5812e0245
2 changed files with 32 additions and 4 deletions
+20
View File
@@ -402,6 +402,26 @@ Recharging stations are available in robotics, the dormitory bathrooms, and the
var/mob/living/simple_animal/diona/D = usr
return D.resist()
/obj/screen/alert/gestalt
name = "Merged nymph"
desc = "You have merged with one or more diona nymphs. Click here to drop it (or one of them)."
/obj/screen/alert/gestalt/Click()
if(!usr || !usr.client)
return
var/list/nymphs = list()
for(var/mob/living/simple_animal/diona/D in usr.contents)
nymphs += D
if(length(nymphs) == 1)
var/mob/living/simple_animal/diona/D = nymphs[1]
D.split()
else
var/mob/living/simple_animal/diona/D = input("Select a nymph to drop:", "Nymph Dropping", nymphs[1]) as anything in nymphs
if(D in usr.contents)
D.split()
//Need to cover all use cases - emag, illegal upgrade module, malf AI hack, traitor cyborg
/obj/screen/alert/hacked
name = "Hacked"
@@ -3,6 +3,9 @@
*/
//Mob defines.
#define GESTALT_ALERT "gestalt screen alert"
#define NYMPH_ALERT "nymph screen alert"
/mob/living/simple_animal/diona
name = "diona nymph"
icon = 'icons/mob/monkey.dmi'
@@ -43,7 +46,6 @@
can_collar = TRUE
a_intent = INTENT_HELP
var/gestalt_alert = "merged with gestalt" //used in adding and clearing alert
var/evolve_donors = 5 //amount of blood donors needed before evolving
var/awareness_donors = 3 //amount of blood donors needed for understand language
var/nutrition_need = 500 //amount of nutrition needed before evolving
@@ -105,7 +107,8 @@
if(isdiona(M))
to_chat(M, "You feel your being twine with that of [src] as it merges with your biomass.")
to_chat(src, "You feel your being twine with that of [M] as you merge with its biomass.")
throw_alert(gestalt_alert, /obj/screen/alert/nymph, new_master = src) //adds a screen alert that can call resist
throw_alert(GESTALT_ALERT, /obj/screen/alert/nymph, new_master = src) //adds a screen alert that can call resist
M.throw_alert(NYMPH_ALERT, /obj/screen/alert/gestalt, new_master = src)
forceMove(M)
else if(isrobot(M))
M.visible_message("<span class='notice'>[M] playfully boops [src] on the head!</span>", "<span class='notice'>You playfully boop [src] on the head!</span>")
@@ -138,7 +141,8 @@
M.status_flags |= PASSEMOTES
to_chat(src, "You feel your being twine with that of [M] as you merge with its biomass.")
forceMove(M)
throw_alert(gestalt_alert, /obj/screen/alert/nymph, new_master = src) //adds a screen alert that can call resist
throw_alert(GESTALT_ALERT, /obj/screen/alert/nymph, new_master = src) //adds a screen alert that can call resist
M.throw_alert(NYMPH_ALERT, /obj/screen/alert/gestalt, new_master = src)
return TRUE
else
return FALSE
@@ -160,8 +164,9 @@
hasMobs = TRUE
if(!hasMobs)
D.status_flags &= ~PASSEMOTES
D.clear_alert(NYMPH_ALERT)
clear_alert(gestalt_alert)
clear_alert(GESTALT_ALERT)
return TRUE
/mob/living/simple_animal/diona/proc/evolve()
@@ -280,3 +285,6 @@
if(!jobban_isbanned(user, ROLE_NYMPH))
return TRUE
return FALSE
#undef GESTALT_ALERT
#undef NYMPH_ALERT