mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
[MIRROR] Improved AI Vore (#11055)
Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
e411fa99de
commit
b5d7c9acc9
@@ -133,6 +133,9 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
|||||||
else
|
else
|
||||||
hologram.set_light(2)
|
hologram.set_light(2)
|
||||||
|
|
||||||
|
for(var/obj/belly/B as anything in A.vore_organs)
|
||||||
|
B.forceMove(hologram)
|
||||||
|
|
||||||
masters[A] = hologram
|
masters[A] = hologram
|
||||||
set_light(2) //pad lighting
|
set_light(2) //pad lighting
|
||||||
icon_state = "holopad1"
|
icon_state = "holopad1"
|
||||||
@@ -140,6 +143,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
|||||||
A.holo = src
|
A.holo = src
|
||||||
if(LAZYLEN(masters))
|
if(LAZYLEN(masters))
|
||||||
START_MACHINE_PROCESSING(src)
|
START_MACHINE_PROCESSING(src)
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/machinery/hologram/holopad/proc/clear_holo(mob/living/silicon/ai/user)
|
/obj/machinery/hologram/holopad/proc/clear_holo(mob/living/silicon/ai/user)
|
||||||
@@ -165,18 +169,8 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
|||||||
|
|
||||||
/obj/machinery/hologram/holopad/proc/move_hologram(mob/living/silicon/ai/user)
|
/obj/machinery/hologram/holopad/proc/move_hologram(mob/living/silicon/ai/user)
|
||||||
if(masters[user])
|
if(masters[user])
|
||||||
/*VOREStation Removal, using our own code
|
|
||||||
step_to(masters[user], user.eyeobj) // So it turns.
|
|
||||||
var/obj/effect/overlay/H = masters[user]
|
|
||||||
H.loc = get_turf(user.eyeobj)
|
|
||||||
masters[user] = H
|
|
||||||
*/
|
|
||||||
//VOREStation Add - Solid mass holovore tracking stuff
|
|
||||||
var/obj/effect/overlay/aiholo/H = masters[user]
|
var/obj/effect/overlay/aiholo/H = masters[user]
|
||||||
if(H.bellied)
|
walk_towards(H, user.eyeobj)
|
||||||
walk_to(H, user.eyeobj) //Walk-to respects obstacles
|
|
||||||
else
|
|
||||||
walk_towards(H, user.eyeobj) //Walk-towards does not
|
|
||||||
//Hologram left the screen (got stuck on a wall or something)
|
//Hologram left the screen (got stuck on a wall or something)
|
||||||
if(get_dist(H, user.eyeobj) > world.view)
|
if(get_dist(H, user.eyeobj) > world.view)
|
||||||
clear_holo(user)
|
clear_holo(user)
|
||||||
|
|||||||
@@ -496,6 +496,15 @@
|
|||||||
G.forceMove(get_turf(src)) //ported from CHOMPStation PR#7132
|
G.forceMove(get_turf(src)) //ported from CHOMPStation PR#7132
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
/obj/belly/Moved(atom/old_loc)
|
||||||
|
. = ..()
|
||||||
|
|
||||||
|
for(var/mob/living/L in src)
|
||||||
|
if(L.ckey)
|
||||||
|
log_admin("[key_name(owner)]'s belly `[src]` moved from [old_loc] ([old_loc?.x],[old_loc?.y],[old_loc?.z]) to [loc] ([loc?.x],[loc?.y],[loc?.z]) while containing [key_name(L)].")
|
||||||
|
break
|
||||||
|
|
||||||
|
|
||||||
// Called whenever an atom enters this belly
|
// Called whenever an atom enters this belly
|
||||||
/obj/belly/Entered(atom/movable/thing, atom/OldLoc)
|
/obj/belly/Entered(atom/movable/thing, atom/OldLoc)
|
||||||
. = ..()
|
. = ..()
|
||||||
@@ -1213,6 +1222,11 @@
|
|||||||
//Typically just to the owner's location.
|
//Typically just to the owner's location.
|
||||||
/obj/belly/drop_location()
|
/obj/belly/drop_location()
|
||||||
//Should be the case 99.99% of the time
|
//Should be the case 99.99% of the time
|
||||||
|
if(isAI(owner))
|
||||||
|
var/mob/living/silicon/ai/AI = owner
|
||||||
|
if(AI.holo && AI.holo.masters[AI])
|
||||||
|
return AI.holo.masters[AI].drop_location()
|
||||||
|
|
||||||
if(owner)
|
if(owner)
|
||||||
return owner.drop_location()
|
return owner.drop_location()
|
||||||
//Sketchy fallback for safety, put them somewhere safe.
|
//Sketchy fallback for safety, put them somewhere safe.
|
||||||
|
|||||||
@@ -4,11 +4,17 @@
|
|||||||
cycle_sloshed = FALSE
|
cycle_sloshed = FALSE
|
||||||
|
|
||||||
if(loc != owner)
|
if(loc != owner)
|
||||||
if(istype(owner))
|
if(isAI(owner))
|
||||||
loc = owner
|
var/mob/living/silicon/ai/AI = owner
|
||||||
|
if(AI.holo && AI.holo.masters[AI])
|
||||||
|
if(loc != AI.holo.masters[AI])
|
||||||
|
loc = owner
|
||||||
else
|
else
|
||||||
qdel(src)
|
if(istype(owner))
|
||||||
return
|
loc = owner
|
||||||
|
else
|
||||||
|
qdel(src)
|
||||||
|
return
|
||||||
|
|
||||||
HandleBellyReagents() // reagent belly stuff, here to jam it into subsystems and avoid too much cpu usage
|
HandleBellyReagents() // reagent belly stuff, here to jam it into subsystems and avoid too much cpu usage
|
||||||
update_belly_surrounding() // Updates belly_surrounding list for indirect vore usage
|
update_belly_surrounding() // Updates belly_surrounding list for indirect vore usage
|
||||||
|
|||||||
@@ -536,12 +536,6 @@
|
|||||||
log_and_message_admins("used the OOC escape button to get out of [key_name(pred)] (BORG) ([pred ? "<a href='byond://?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[pred.x];Y=[pred.y];Z=[pred.z]'>JMP</a>" : "null"])", src)
|
log_and_message_admins("used the OOC escape button to get out of [key_name(pred)] (BORG) ([pred ? "<a href='byond://?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[pred.x];Y=[pred.y];Z=[pred.z]'>JMP</a>" : "null"])", src)
|
||||||
belly.go_out(src) //Just force-ejects from the borg as if they'd clicked the eject button.
|
belly.go_out(src) //Just force-ejects from the borg as if they'd clicked the eject button.
|
||||||
|
|
||||||
//You're in an AI hologram!
|
|
||||||
else if(istype(loc, /obj/effect/overlay/aiholo))
|
|
||||||
var/obj/effect/overlay/aiholo/holo = loc
|
|
||||||
holo.drop_prey() //Easiest way
|
|
||||||
log_and_message_admins("used the OOC escape button to get out of [key_name(holo.master)] (AI HOLO) ([holo ? "<a href='byond://?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[holo.x];Y=[holo.y];Z=[holo.z]'>JMP</a>" : "null"])", src)
|
|
||||||
|
|
||||||
//You're in a capture crystal! ((It's not vore but close enough!))
|
//You're in a capture crystal! ((It's not vore but close enough!))
|
||||||
else if(iscapturecrystal(loc))
|
else if(iscapturecrystal(loc))
|
||||||
var/obj/item/capture_crystal/crystal = loc
|
var/obj/item/capture_crystal/crystal = loc
|
||||||
@@ -668,6 +662,11 @@
|
|||||||
var/user_to_pred = get_dist(get_turf(user),get_turf(pred))
|
var/user_to_pred = get_dist(get_turf(user),get_turf(pred))
|
||||||
var/user_to_prey = get_dist(get_turf(user),get_turf(prey))
|
var/user_to_prey = get_dist(get_turf(user),get_turf(prey))
|
||||||
|
|
||||||
|
if(user == pred && isAI(user))
|
||||||
|
var/mob/living/silicon/ai/AI = user
|
||||||
|
if(AI.holo && AI.holo.masters[AI])
|
||||||
|
user_to_prey = get_dist(get_turf(AI.holo.masters[AI]), get_turf(prey))
|
||||||
|
|
||||||
if(user_to_pred > 1 || user_to_prey > 1)
|
if(user_to_pred > 1 || user_to_prey > 1)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
/obj/effect/overlay/aiholo
|
/obj/effect/overlay/aiholo
|
||||||
var/mob/living/bellied //Only belly one person at a time. No huge vore-organs setup for AIs.
|
|
||||||
var/mob/living/silicon/ai/master //This will receive the AI controlling the Hologram. For referencing purposes.
|
var/mob/living/silicon/ai/master //This will receive the AI controlling the Hologram. For referencing purposes.
|
||||||
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||||
alpha = HOLO_ORIGINAL_ALPHA //Half alpha here rather than in the icon so we can toggle it easily.
|
alpha = HOLO_ORIGINAL_ALPHA //Half alpha here rather than in the icon so we can toggle it easily.
|
||||||
@@ -11,38 +10,12 @@
|
|||||||
AddComponent(/datum/component/holographic_nature)
|
AddComponent(/datum/component/holographic_nature)
|
||||||
|
|
||||||
/obj/effect/overlay/aiholo/Destroy()
|
/obj/effect/overlay/aiholo/Destroy()
|
||||||
drop_prey()
|
for(var/obj/belly/B in src)
|
||||||
for(var/mob/M in contents)
|
B.forceMove(master)
|
||||||
M.forceMove(loc)
|
|
||||||
walk(src, 0) // Because we might have called walk_to, we must stop the walk loop or BYOND keeps an internal reference to us forever.
|
walk(src, 0) // Because we might have called walk_to, we must stop the walk loop or BYOND keeps an internal reference to us forever.
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/effect/overlay/aiholo/proc/get_prey(var/mob/living/prey, mob/user)
|
|
||||||
if(bellied) return
|
|
||||||
playsound(src, 'sound/effects/stealthoff.ogg',50,0)
|
|
||||||
bellied = prey
|
|
||||||
prey.forceMove(src)
|
|
||||||
visible_message("[src] entirely engulfs [prey] in hardlight holograms!")
|
|
||||||
to_chat(user, span_vnotice("You completely engulf [prey] in hardlight holograms!")) //Can't be part of the above, because the above is from the hologram.
|
|
||||||
|
|
||||||
desc = "[initial(desc)] It seems to have hardlight mode enabled and someone inside."
|
|
||||||
pass_flags = 0
|
|
||||||
color = HOLO_HARDLIGHT_COLOR
|
|
||||||
alpha = HOLO_HARDLIGHT_ALPHA
|
|
||||||
|
|
||||||
/obj/effect/overlay/aiholo/proc/drop_prey()
|
|
||||||
if(!bellied) return
|
|
||||||
playsound(src, 'sound/effects/stealthoff.ogg',50,0)
|
|
||||||
bellied.forceMove(get_turf(src))
|
|
||||||
bellied.Weaken(2)
|
|
||||||
bellied.visible_message("[bellied] flops out of [src].","You flop out of [src].","You hear a thud.")
|
|
||||||
bellied = null
|
|
||||||
|
|
||||||
desc = "[initial(desc)]"
|
|
||||||
pass_flags = initial(pass_flags)
|
|
||||||
color = HOLO_ORIGINAL_COLOR
|
|
||||||
alpha = HOLO_ORIGINAL_ALPHA
|
|
||||||
|
|
||||||
/mob/living/silicon/ai/verb/holo_nom()
|
/mob/living/silicon/ai/verb/holo_nom()
|
||||||
set name = "Hardlight Nom"
|
set name = "Hardlight Nom"
|
||||||
set category = "AI.Vore"
|
set category = "AI.Vore"
|
||||||
@@ -53,6 +26,10 @@
|
|||||||
to_chat(src, span_vwarning("You can only use this when holo-projecting!"))
|
to_chat(src, span_vwarning("You can only use this when holo-projecting!"))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(isbelly(loc))
|
||||||
|
to_chat(src, span_vwarning("For safety reasons, you cannot consume people with holograms while you are inside someone else."))
|
||||||
|
return
|
||||||
|
|
||||||
//Holopads have this 'masters' list where the keys are AI names and the values are the hologram effects
|
//Holopads have this 'masters' list where the keys are AI names and the values are the hologram effects
|
||||||
var/obj/effect/overlay/aiholo/hologram = holo.masters[src]
|
var/obj/effect/overlay/aiholo/hologram = holo.masters[src]
|
||||||
|
|
||||||
@@ -60,14 +37,15 @@
|
|||||||
if(!hologram)
|
if(!hologram)
|
||||||
return
|
return
|
||||||
|
|
||||||
//Already full
|
var/list/possible_prey
|
||||||
if (hologram.bellied)
|
for(var/mob/living/L in oview(1, eyeobj))
|
||||||
var/choice = tgui_alert(src, "You can only contain one person. [hologram.bellied] is in you.", "Already Full", list("Drop Mob", "Cancel"))
|
LAZYADD(possible_prey, L)
|
||||||
if(choice == "Drop Mob")
|
|
||||||
hologram.drop_prey()
|
if(!LAZYLEN(possible_prey))
|
||||||
|
to_chat(src, span_vwarning("There's no one in range to eat."))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/mob/living/prey = tgui_input_list(src,"Select a mob to eat","Holonoms", oview(0,eyeobj))
|
var/mob/living/prey = tgui_input_list(src, "Select a mob to eat", "Holonoms", possible_prey)
|
||||||
if(!prey)
|
if(!prey)
|
||||||
return //Probably cancelled
|
return //Probably cancelled
|
||||||
|
|
||||||
@@ -75,19 +53,11 @@
|
|||||||
to_chat(src, span_vwarning("Invalid mob choice!"))
|
to_chat(src, span_vwarning("Invalid mob choice!"))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
hologram.visible_message("[hologram] starts engulfing [prey] in hardlight holograms!")
|
hologram.visible_message("[hologram] starts engulfing [prey] in hardlight holograms!")
|
||||||
to_chat(src, span_vnotice("You begin engulfing [prey] in hardlight holograms.")) //Can't be part of the above, because the above is from the hologram.
|
to_chat(src, span_vnotice("You begin engulfing [prey] in hardlight holograms.")) //Can't be part of the above, because the above is from the hologram.
|
||||||
if(do_after(user=eyeobj,delay=50,target=prey,needhand=0) && holo && hologram && !hologram.bellied) //Didn't move and still projecting and effect exists and no other bellied people
|
if(do_after(user = eyeobj,delay = 50,target = prey, needhand = 0) && holo && hologram) //Didn't move and still projecting and effect exists and no other bellied people
|
||||||
hologram.get_prey(prey, src)
|
feed_grabbed_to_self(src, prey)
|
||||||
|
|
||||||
/* Can't, lets them examine things in camera blackout areas
|
|
||||||
//I basically have to do this, you know?
|
|
||||||
/mob/living/silicon/ai/examinate(atom/A as mob|obj|turf in view(eyeobj))
|
|
||||||
set name = "Examine"
|
|
||||||
set category = "IC.Game"
|
|
||||||
|
|
||||||
A.examine(src)
|
|
||||||
*/
|
|
||||||
|
|
||||||
/mob/living/AIShiftClick(var/mob/user) //Shift-click as AI overridden on mobs to examine.
|
/mob/living/AIShiftClick(var/mob/user) //Shift-click as AI overridden on mobs to examine.
|
||||||
if(user.client)
|
if(user.client)
|
||||||
|
|||||||
Reference in New Issue
Block a user