/obj/item/device/isocube name = "Isocube" icon = 'icons/obj/wizard.dmi' icon_state = "soulstone" item_state = "electronic" desc = "two weeks in the isocubes." w_class = 3 unacidable = 1 flags = FPRINT | TABLEPASS slot_flags = SLOT_BELT origin_tech = "bluespace=4;materials=4" //////////////////////////////Capturing//////////////////////////////////////////////////////// attack(mob/living/carbon/human/M as mob, mob/user as mob) if(!istype(M, /mob/living/carbon/human))//If target is not a human. return ..() if(istype(M, /mob/living/carbon/human/dummy)) return..() if(M.has_brain_worms()) //Borer stuff - RR user << "The isocube spits out an error message: multiple lifeforms detected." return..() M.attack_log += text("\[[time_stamp()]\] Has been imprisoned with [src.name] by [user.name] ([user.ckey])") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to imprison [M.name] ([M.ckey])") msg_admin_attack("[key_name_admin(user)] is attemptin to imprison [key_name_admin(M)] with the [src.name] (JMP)") isolate("VICTIM", M, user) return attack_self(mob/user) if (!in_range(src, user)) return user.set_machine(src) var/dat = "Isocube
" for(var/mob/living/carbon/human/A in src) dat += "Prisoner: [A.name]
" dat += {"Release Prisoner"} dat += "
" dat += {"Disable Prisoner"} dat += "
" dat += {"Enable Prisoner"} dat += "
" dat += {" Close"} user << browse(dat, "window=aicard") onclose(user, "aicard") return Topic(href, href_list) var/mob/U = usr if (!in_range(src, U)||U.machine!=src) U << browse(null, "window=aicard") U.unset_machine() return add_fingerprint(U) U.set_machine(src) switch(href_list["choice"])//Now we switch based on choice. if ("Close") U << browse(null, "window=aicard") U.unset_machine() return if ("Release") for(var/mob/living/carbon/human/A in src) A.status_flags &= ~GODMODE A.canmove = 1 A << "You feel a sickening lurch as the isocube dumps you out, weak and disoriented." for(var/mob/O in viewers(U, null)) O.show_message(text("[U] fiddles with the isocube, releasing [A]!"), 1) A.loc = U.loc A.weakened = 10 A.paralysis = 0 A.cancel_camera() src.icon_state = "soulstone" for(var/obj/O in src) O.loc = U.loc if ("Disable") for(var/mob/living/carbon/human/A in src) if (A.paralysis < 100) A << "You feel a sudden, crippling agony, then darkness creeps over you." for(var/mob/O in viewers(U, null)) O.show_message(text("You hear an ominous crunch."), 1) A.paralysis = 9000000 if ("Enable") for(var/mob/living/carbon/human/A in src) if (A.paralysis > 10) A << "You feel a jolt of consciousness." for(var/mob/O in viewers(U, null)) O.show_message(text("Something whirrs."), 1) A.paralysis = 0 attack_self(U) /obj/item/proc/isolate(var/choice as text, var/target, var/mob/U as mob). if("VICTIM") var/mob/living/carbon/human/T = target var/obj/item/device/isocube/C = src if(C.contents.len) U << "\red The isocube is full!" else if (U == T) U << "\red The isocube's safeties prevent you from capturing yourself." return else for(var/mob/O in viewers(U, null)) O.show_message("\red [U] is trying to pull [T] into an isocube!", 1) var/turf/p_loc = U.loc var/turf/p_loc_m = T.loc spawn(30) if(!T) return if(p_loc == U.loc && p_loc_m == T.loc) /* var/atom/movable/overlay/animation = new /atom/movable/overlay( T.loc ) animation.icon_state = "blank" animation.icon = 'icons/mob/mob.dmi' animation.master = T flick("dust-h", animation) del(animation)*/ T.loc = C //put dummy in isocube T.status_flags |= GODMODE //So they won't die inside the stone somehow T.canmove = 0//Can't move out of the soul stone if (T.client) T.cancel_camera() C.icon_state = "soulstone2" T << "You feel a heavy weightlessness and find yourself barely able to move. The outside world seems larger." U << "\blue [T.real_name] has been successfully captured within the isocube. " T.Weaken(9000000) msg_admin_attack("[key_name_admin(U)] used the [src.name] to imprison [key_name_admin(T)] (JMP)") return