diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 3a1f6a08ca..6c328e34f8 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -133,6 +133,9 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/ else hologram.set_light(2) + for(var/obj/belly/B as anything in A.vore_organs) + B.forceMove(hologram) + masters[A] = hologram set_light(2) //pad lighting icon_state = "holopad1" @@ -140,6 +143,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/ A.holo = src if(LAZYLEN(masters)) START_MACHINE_PROCESSING(src) + return 1 /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) 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] - if(H.bellied) - walk_to(H, user.eyeobj) //Walk-to respects obstacles - else - walk_towards(H, user.eyeobj) //Walk-towards does not + walk_towards(H, user.eyeobj) //Hologram left the screen (got stuck on a wall or something) if(get_dist(H, user.eyeobj) > world.view) clear_holo(user) diff --git a/code/modules/vore/eating/belly_obj_vr.dm b/code/modules/vore/eating/belly_obj_vr.dm index 85a21a34ce..28c7c0165b 100644 --- a/code/modules/vore/eating/belly_obj_vr.dm +++ b/code/modules/vore/eating/belly_obj_vr.dm @@ -496,6 +496,15 @@ G.forceMove(get_turf(src)) //ported from CHOMPStation PR#7132 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 /obj/belly/Entered(atom/movable/thing, atom/OldLoc) . = ..() @@ -1213,6 +1222,11 @@ //Typically just to the owner's location. /obj/belly/drop_location() //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) return owner.drop_location() //Sketchy fallback for safety, put them somewhere safe. diff --git a/code/modules/vore/eating/bellymodes_vr.dm b/code/modules/vore/eating/bellymodes_vr.dm index 7b4b06541c..7a5831e47d 100644 --- a/code/modules/vore/eating/bellymodes_vr.dm +++ b/code/modules/vore/eating/bellymodes_vr.dm @@ -4,11 +4,17 @@ cycle_sloshed = FALSE if(loc != owner) - if(istype(owner)) - loc = owner + if(isAI(owner)) + var/mob/living/silicon/ai/AI = owner + if(AI.holo && AI.holo.masters[AI]) + if(loc != AI.holo.masters[AI]) + loc = owner else - qdel(src) - return + if(istype(owner)) + loc = owner + else + qdel(src) + return 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 diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index d61fc3c300..a04dbe404f 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -536,12 +536,6 @@ log_and_message_admins("used the OOC escape button to get out of [key_name(pred)] (BORG) ([pred ? "JMP" : "null"])", src) 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 ? "JMP" : "null"])", src) - //You're in a capture crystal! ((It's not vore but close enough!)) else if(iscapturecrystal(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_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) return FALSE diff --git a/code/modules/vore/eating/silicon_vr.dm b/code/modules/vore/eating/silicon_vr.dm index 449067ad55..06dc9c2e0f 100644 --- a/code/modules/vore/eating/silicon_vr.dm +++ b/code/modules/vore/eating/silicon_vr.dm @@ -1,5 +1,4 @@ /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. pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE 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) /obj/effect/overlay/aiholo/Destroy() - drop_prey() - for(var/mob/M in contents) - M.forceMove(loc) + for(var/obj/belly/B in src) + B.forceMove(master) + 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 ..() -/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() set name = "Hardlight Nom" set category = "AI.Vore" @@ -53,6 +26,10 @@ to_chat(src, span_vwarning("You can only use this when holo-projecting!")) 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 var/obj/effect/overlay/aiholo/hologram = holo.masters[src] @@ -60,14 +37,15 @@ if(!hologram) return - //Already full - if (hologram.bellied) - var/choice = tgui_alert(src, "You can only contain one person. [hologram.bellied] is in you.", "Already Full", list("Drop Mob", "Cancel")) - if(choice == "Drop Mob") - hologram.drop_prey() + var/list/possible_prey + for(var/mob/living/L in oview(1, eyeobj)) + LAZYADD(possible_prey, L) + + if(!LAZYLEN(possible_prey)) + to_chat(src, span_vwarning("There's no one in range to eat.")) 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) return //Probably cancelled @@ -75,19 +53,11 @@ to_chat(src, span_vwarning("Invalid mob choice!")) return + 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. - 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 - hologram.get_prey(prey, src) - -/* 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) -*/ + 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 + feed_grabbed_to_self(src, prey) /mob/living/AIShiftClick(var/mob/user) //Shift-click as AI overridden on mobs to examine. if(user.client)