mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 11:07:12 +01:00
* biting off more than I can chew, but I feel like hurting myself * more shit * progress continues, moral stays sameish * bite of 2587 * mod_theme down, but probably broken * 385 errors, 16 warnings, zero tgui interactions * 292 19 * final strech to buggy mess, break time * it compiles. It almost fucking certainly doesnt work, but it compiles * fudhsciffubgsbgpgb actions not working as should for modules * fuck it we'll just open the pr as we work on it * icons work now * tgui stuff * more progress * JUDGEMENT * IT LIVES. TGUI LIVES. Special thanks to Sirryan and my brother. * jetpacks, gps, and go do what exo-suits yourself * almost ready * sorry to whoever has to review this * should work™️ * should be good now * pushing changes so I can do reviews next * Apply suggestions from code review Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * lore™️ Adds illegals level to modsuit parts from syndicate. * early returns * and these illegals * no uplink reference idiot * mod inhands are a good idea * this is needed for inhands nerd * Bomb detector working, modsutis cover ears. skin things * overslotting removal, cyborg charging, ert loadout for gamma * duplicated signal * modsuit themes, removes broken mister / bad base type module, 2 cores in robotics. * tether module, orb module, holster stuff * built in no slip, cheaper 87 * removes modules already installed, engineer ert get jetpack, equip into modsuit storage * comments spaces and duplicate flags * Some adjustments and thoughts on armor, heads get guns because they are cool like that / looting command members armor * Apply suggestions from code review Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Compile TGUI, slowdown adjustment, Modsuit to MODsuit * sonar, do after, more equipment, acid handling * overlay bugs / ERT / DS suits autodeploy * middle click action buttons * traders, sec modsuit energy nerf * surplus weighting * Kinesis module. * Pathfinder module, kinesis balance, blueprint for pathfinder and kinesis * more power / unused module removed * name, ds fix, pre equipped to cc suit * depot / grammer * ok should be good™️ * overslot, dupe gun, missing suit storage * stealth nerf, new kit * gun stuff / ds theme * bio armor is gone * let me push changes please thank you * makes shocks work right * copies over some changes TG made to module prices after porting * Merge remote-tracking branch 'upstream/master' into Because-I-hate-myself-and-someone-has-to-try-it- * sirryans changes Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Update code/modules/telesci/gps.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Update code/modules/telesci/gps.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Control define, ERT / DS have gloves / boots again. * Apply suggestions from code review Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * More changes * god I hate tgui. Why do all the bundles live underground, instead of in my basement? * she updates my master till I testmerge * modsuits can recharge again * fixes a lot of shit * Ready for TM probably * sure fuck it whatever that makes sense I guess * the pinpointer works better™️ * Another storage module bug fix * hair and medical stuff * fuck fuck fuck * fixes sonar * Bag exploit fixes / plasma runtimes / ear nerf * dna lock improvement / cryostorage * whoops * Ball form second cooldown wasn't helping, no more infinite cores * she springs my lock till I ***SNAP*** * plasmaman no longer die * fixes modsuit emp issues * atmos no longer fucking dies * Fixes, module printing, and a restriction on newly constructed modsuits * Inventory code my hated * WOOO PREFERENCE CODE WOOOOO * icons my hated * fix for mods / spaceproof shit * holy shit whhhyyyyy * backpack first * Update mod_theme.dm * prevent infinite gun arms / infinite modsuit cores / syndicate modules * fixes tm error * scream loudly if species sprites break. They shouldn't, but, you know. * deconflicted with luck * converts to refit for species * fix pathfinder * fixes modsuits being funky power wise * lockboxes :gatto: , as well as DN-MP shield lock, and slight nerf to atmos modsuit * nerfs the atmos modsuit * magboots for ds / CC modsuit * downside of autosave: typing in wrong window saves bad stuff * Gamma ERT have internal cameras again. * spellcheck when * ah fuck * yes delete the null that works * whoops * fixes error / description * un vulps your cannon * fixes tails disapeering on base modsuits * space to underscore * tgui fix / tajaran * springlock buff, cryopod fix * u helps * WHO PUTS A GUN IN ITEMS * tgui moment * mining modsuit nerf / hidden holster module * PAIN * UNATHI TIDE STATION WIDE * I love special code * slightly dense * shark jumpscare * fixes ghost item, fixes springlock being bad * YIPPEEEE IT WORKED * she decons my flict * pain * ebbas days are numbered :^) * hidden * r-r-r-ebuild * fixes more bugs * qwerty, you are dense * fixes gps * fix mulebot crate * level fix * adds back icon * moving storage, fix bug, modules activate / deactivate message * yeah * yeah * yeah™️ * steels requests * windoors no longer make pathfinder module explode * chat spam * oil slicks + modsuits * whoops * bag check * ofc * Update code/modules/mod/mod_control.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/datums/uplink_items/uplink_nuclear.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/modules/mod/mod_control.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/modules/mod/modules/module_pathfinder.dm Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> --------- Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
178 lines
6.3 KiB
Plaintext
178 lines
6.3 KiB
Plaintext
/**
|
|
* # Stealth Implant
|
|
*
|
|
* Implant which allows you to summon an MGS-style cardboard box that turns you invisble after a short delay.
|
|
*/
|
|
/obj/item/implant/stealth
|
|
name = "S3 bio-chip"
|
|
desc = "Allows you to be hidden in plain sight."
|
|
implant_state = "implant-syndicate"
|
|
implant_data = /datum/implant_fluff/stealth
|
|
actions_types = list(/datum/action/item_action/agent_box)
|
|
|
|
/obj/item/implanter/stealth
|
|
name = "bio-chip implanter (stealth)"
|
|
implant_type = /obj/item/implant/stealth
|
|
|
|
/datum/action/item_action/agent_box
|
|
name = "Deploy Box"
|
|
desc = "Find inner peace, here, in the box."
|
|
check_flags = AB_CHECK_HANDS_BLOCKED | AB_CHECK_IMMOBILE | AB_CHECK_CONSCIOUS | AB_CHECK_STUNNED
|
|
background_icon_state = "bg_agent"
|
|
button_icon_state = "deploy_box"
|
|
use_itemicon = FALSE
|
|
/// If TRUE, the box can't be deployed
|
|
var/on_cooldown = FALSE
|
|
|
|
/datum/action/item_action/agent_box/Trigger(trigger_flags, left_click)
|
|
. = ..()
|
|
if(!.)
|
|
return FALSE
|
|
if(istype(owner.loc, /obj/structure/closet/cardboard/agent))
|
|
var/obj/structure/closet/cardboard/agent/box = owner.loc
|
|
if(box.open())
|
|
owner.playsound_local(box, 'sound/misc/box_deploy.ogg', 50, TRUE)
|
|
recall_box_animation()
|
|
return
|
|
// Box closing from here on out.
|
|
if(!isturf(owner.loc)) //Don't let the player use this to escape mechs/welded closets.
|
|
to_chat(owner, "<span class='warning'>You need more space to activate this implant!</span>")
|
|
return
|
|
owner.playsound_local(owner, 'sound/misc/box_deploy.ogg', 50, TRUE)
|
|
spawn_box()
|
|
|
|
/datum/action/item_action/agent_box/proc/spawn_box()
|
|
// Do the box's fade in spawn animation with an image so it follows the owner.
|
|
var/image/fake_box = image('icons/obj/cardboard_boxes.dmi', owner, "agentbox", ABOVE_MOB_LAYER)
|
|
flick_overlay_view(fake_box, owner, 0.4 SECONDS)
|
|
fake_box.alpha = 0
|
|
fake_box.pixel_z = 30
|
|
animate(fake_box, pixel_z = fake_box.pixel_z - 30, alpha = fake_box.alpha + 255, time = 3, loop = 1)
|
|
sleep(3)
|
|
|
|
// Spawn the actual box
|
|
var/obj/structure/closet/cardboard/agent/box = new(get_turf(owner), owner)
|
|
box.implant_user_UID = owner.UID()
|
|
// Slightly shorter time since we needed 0.3s to to do the spawn animation.
|
|
INVOKE_ASYNC(box, TYPE_PROC_REF(/obj/structure/closet/cardboard/agent, go_invisible), 1.7 SECONDS)
|
|
box.create_fake_box()
|
|
owner.forceMove(box)
|
|
RegisterSignal(box, COMSIG_PARENT_QDELETING, PROC_REF(start_cooldown))
|
|
|
|
/datum/action/item_action/agent_box/proc/start_cooldown(datum/source)
|
|
SIGNAL_HANDLER
|
|
on_cooldown = TRUE
|
|
addtimer(CALLBACK(src, PROC_REF(end_cooldown)), 10 SECONDS)
|
|
UpdateButtonIcon()
|
|
|
|
/datum/action/item_action/agent_box/proc/end_cooldown()
|
|
on_cooldown = FALSE
|
|
UpdateButtonIcon()
|
|
|
|
/datum/action/item_action/agent_box/IsAvailable()
|
|
if(..() && !on_cooldown)
|
|
return TRUE
|
|
return FALSE
|
|
|
|
/datum/action/item_action/agent_box/proc/recall_box_animation()
|
|
var/image/fake_box = image('icons/obj/cardboard_boxes.dmi', owner, "agentbox", ABOVE_MOB_LAYER)
|
|
flick_overlay_view(fake_box, owner, 0.4 SECONDS)
|
|
animate(fake_box, pixel_z = fake_box.pixel_z + 30, alpha = fake_box.alpha - 255, time = 3, loop = 1)
|
|
|
|
/datum/action/item_action/agent_box/Grant(mob/grant_to)
|
|
. = ..()
|
|
if(owner)
|
|
RegisterSignal(owner, COMSIG_HUMAN_SUICIDE_ACT, PROC_REF(suicide_act))
|
|
|
|
/datum/action/item_action/agent_box/Remove(mob/M)
|
|
if(owner)
|
|
UnregisterSignal(owner, COMSIG_HUMAN_SUICIDE_ACT)
|
|
return ..()
|
|
|
|
/datum/action/item_action/agent_box/proc/suicide_act(datum/source)
|
|
SIGNAL_HANDLER
|
|
|
|
if(!istype(owner.loc, /obj/structure/closet/cardboard/agent))
|
|
return
|
|
var/obj/structure/closet/cardboard/agent/box = owner.loc
|
|
owner.visible_message("<span class='suicide'>[owner] falls out of [box]! It looks like [owner.p_they()] committed suicide!</span>")
|
|
owner.playsound_local(box, 'sound/misc/box_deploy.ogg', 50, TRUE)
|
|
INVOKE_ASYNC(box, TYPE_PROC_REF(/obj/structure/closet/cardboard/agent, open))
|
|
INVOKE_ASYNC(owner, TYPE_PROC_REF(/atom/movable, throw_at), get_turf(owner))
|
|
return OXYLOSS
|
|
|
|
// Stealth implant box
|
|
/obj/structure/closet/cardboard/agent
|
|
name = "inconspicious box"
|
|
desc = "It's so normal that you didn't notice it before."
|
|
icon_state = "agentbox"
|
|
max_integrity = 1
|
|
move_speed_multiplier = 0.5 // You can move at run speed while in this box.
|
|
material_drop = null
|
|
/// UID of the person who summoned this box with an implant.
|
|
var/implant_user_UID
|
|
// This has to be a separate object and not just an image because the image will inherit the box's 0 alpha while it is stealthed.
|
|
/// A holder effect which follows the src box so we can display an image to the person inside the box.
|
|
var/obj/effect/fake_box
|
|
/// The box image attached to the `fake_box` object.
|
|
var/image/box_img
|
|
|
|
/obj/structure/closet/cardboard/agent/Destroy()
|
|
var/mob/living/implant_user = locateUID(implant_user_UID)
|
|
implant_user?.client?.images -= box_img
|
|
QDEL_NULL(fake_box)
|
|
QDEL_NULL(box_img)
|
|
return ..()
|
|
|
|
/obj/structure/closet/cardboard/agent/open()
|
|
. = ..()
|
|
if(!.)
|
|
return FALSE
|
|
qdel(src)
|
|
|
|
// When the box is opened, it's deleted, so we never need to update this.
|
|
/obj/structure/closet/cardboard/agent/update_icon_state()
|
|
return
|
|
|
|
/obj/structure/closet/cardboard/agent/proc/create_fake_box()
|
|
if(fake_box)
|
|
return
|
|
fake_box = new(get_turf(src))
|
|
fake_box.mouse_opacity = MOUSE_OPACITY_TRANSPARENT // This object should be completely invisible.
|
|
box_img = image(icon, fake_box, icon_state, ABOVE_MOB_LAYER)
|
|
box_img.alpha = 128
|
|
RegisterSignal(src, COMSIG_MOVABLE_MOVED, PROC_REF(move_fake_box))
|
|
var/mob/living/implant_user = locateUID(implant_user_UID)
|
|
implant_user.client?.images += box_img
|
|
|
|
/obj/structure/closet/cardboard/agent/proc/move_fake_box(datum/source, oldloc, move_dir)
|
|
SIGNAL_HANDLER
|
|
|
|
// For non-standard movement such as teleports.
|
|
if(!move_dir)
|
|
fake_box.loc = get_turf(src)
|
|
return
|
|
// For basic 8-directional movement.
|
|
fake_box.loc = get_step(fake_box, move_dir)
|
|
|
|
/obj/structure/closet/cardboard/agent/proc/go_invisible(invis_time = 2 SECONDS)
|
|
animate(src, alpha = 0, time = invis_time)
|
|
sleep(invis_time)
|
|
// This is so people can't locate the box by spamming right click everywhere.
|
|
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
|
|
|
/obj/structure/closet/cardboard/agent/proc/reveal()
|
|
alpha = 255
|
|
mouse_opacity = MOUSE_OPACITY_OPAQUE
|
|
addtimer(CALLBACK(src, PROC_REF(go_invisible)), 1 SECONDS, TIMER_OVERRIDE|TIMER_UNIQUE)
|
|
|
|
/obj/structure/closet/cardboard/agent/Bump(atom/A)
|
|
. = ..()
|
|
if(isliving(A))
|
|
reveal()
|
|
|
|
/obj/structure/closet/cardboard/agent/Bumped(atom/movable/A)
|
|
. = ..()
|
|
if(isliving(A))
|
|
reveal()
|