mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 16:44:33 +01:00
24845b238a
* Initial commit - FLOCKMIND - Probably has like a billion things to fix * Do after conversions * Config * Moved the files, icon fixes * Tick everything, language work, event, spawn landmark, role prefs, beginning mob port * Spans and some other fixes. Also the tickening * More tickening * More fixes. Lots of fixes. * More Fixes * A whole lot more. Also flock TGUI. * Fixes fixes fixes fixes fixes * FIXES * More fixes - PR ready, still needs a fuckton of testing * Fixes * fix incomplete upstream merge * fix FlockPanel + sort button name * TGUI review * Fixes tealprint list * Fixes * More fixes * Incapacitator Fix * Filenames * Linters * Interceptor range buff * Reagent counts * Linters * Fabricator vendor fix * Keybinds and HUD - Flockdrones, Fixes Vendor Conversion, Cube Materials * Reworks reagent, adds flock grilles, fixes compute node overlays * Intent-based flockdrone parts * Intent based drone parts * Radial control panel for controlling drones manually, phasing through windows/grilles * Movement fixes * Radio talk power, stare fix * Flock health HUD * Fixes flock lights, linters * Unit tests * Adds countdown to relay * Relay improvements * Small fix * Logic Schmogic * Relay overlay and looping sound effect * Ignore air when converting turfs * Cage fixes and improvements * Improved flock bolt * Turret conversions * Flock bolts taze simple or basic mobs * Sentience type * Fixe * Linter * tgui review stage 2 * Concentrated Repair Burst * Improves radio detection * Removes extra space * Adds healing visual effect * Cube tech levels * Ghooost * Excess * Flock doors, chairs, lattices. Centralizes conversion code. Crafting with Gnesis * Update code/modules/antagonists/flockmind/ai_behaviors/flock_wander.dm Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * Fixes the fix * Astar movement detection * Fix, extraneous code, language stuff * Language fixes and wander fix * Fixes * Another fix * Lints * Another linter * Language improvement * More language improvements * Time requirement and appearing in orbit menu as an antag * Cube glow * TGUI * Minicache * Linters * Grammar * Material ID fix * Lid fix * Reagent turf reaction * Reagent fix * Butcher results * Conversion rates * Flock stare fix * Fixes stare behavior * Staring * Flock mob blood * Flock mobs gibs and blood. Also some runtime fixes * Flock mobs now resist out of grabs, buckles, lockers, and more * Fixes flock orbit, fixes a runtime I think, * Target mechs, damage mechs, other bug fixes * Cage fix * Cage resist change * Some mind changes, gatecrash buff * Drones now shoot mechs, stare improvement * Cut down on spam a little * Nest fix * No more resist spam * Fixed drone death control * Resist statement * Makes the relay alarm scarier * Fixes dead flock camera mobs having no ghost sprite, something with ghosting * Enhanced flockphasing * Improved flockmob pathing * Added required turf restriction to relay * Increased needed bandwidth for relay construction * Nerfed drone substrate rate * Added new status tab items for relay progress * Another relay cost adjustment * Improves drone AI responsiveness * Computer frames now become flock computers * Improves target finding for conversion, building, and replicating * Reduced flock event pop requirements * Adjusts flock protection on structures. Adjusts overlays. * Relay unlock tweak * Fixwes flock being able to gib mech'd AIs with one button * Map conflict * Flock can no longer be outed by merely existing * Fied bug causing drones to shoot themselves * Prevents mobs from attacking while in a cage * Converter tool can now open closets and crates. * Adds descriptions to flockdrone tools. * More informatic blurbs * Adds xenobiology organs * Organ lint * TGUI merge * bundle and mm --------- Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Co-authored-by: Toastical <20125180+Toastical@users.noreply.github.com> Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
271 lines
8.4 KiB
Plaintext
271 lines
8.4 KiB
Plaintext
/mob/proc/overlay_fullscreen(category, type, severity, animated = 0)
|
|
var/atom/movable/screen/fullscreen/screen = screens[category]
|
|
var/is_centered = istype(screen, /atom/movable/screen/fullscreen/center)
|
|
|
|
if(!screen || screen.type != type)
|
|
// needs to be recreated
|
|
clear_fullscreen(category, FALSE)
|
|
screens[category] = screen = new type()
|
|
else if((!severity || severity == screen.severity) && (!is_centered && (!client || screen.screen_loc != "CENTER-7,CENTER-7" || screen.view == client.view)))
|
|
// doesn't need to be updated
|
|
return screen
|
|
|
|
screen.icon_state = "[initial(screen.icon_state)][severity]"
|
|
screen.severity = severity
|
|
if(client && screen.should_show_to(src))
|
|
if(animated)
|
|
INVOKE_ASYNC(src, PROC_REF(apply_screen_animation), animated, screen)
|
|
if(!is_centered)
|
|
screen.update_for_view(client.view)
|
|
client.screen += screen
|
|
|
|
return screen
|
|
|
|
/mob/proc/apply_screen_animation(animated = 0, atom/movable/screen/fullscreen/screen)
|
|
screen.alpha = 0
|
|
animate(screen, alpha = 255, time = animated)
|
|
|
|
/mob/proc/clear_fullscreen(category, animated = 10)
|
|
var/atom/movable/screen/fullscreen/screen = screens[category]
|
|
if(!screen)
|
|
return
|
|
|
|
screens -= category
|
|
|
|
if(animated)
|
|
spawn(0)
|
|
animate(screen, alpha = 0, time = animated)
|
|
sleep(animated)
|
|
if(client)
|
|
client.screen -= screen
|
|
qdel(screen)
|
|
return
|
|
|
|
if(client)
|
|
client.screen -= screen
|
|
qdel(screen)
|
|
|
|
/mob/proc/clear_fullscreens()
|
|
for(var/category in screens)
|
|
clear_fullscreen(category)
|
|
|
|
/mob/proc/reload_fullscreen()
|
|
if(!client)
|
|
return
|
|
var/atom/movable/screen/fullscreen/screen
|
|
for(var/category in screens)
|
|
screen = screens[category]
|
|
if(screen.should_show_to(src))
|
|
screen.update_for_view(client.view)
|
|
client.screen |= screen
|
|
else
|
|
client.screen -= screen
|
|
|
|
/atom/movable/screen/fullscreen
|
|
icon = 'icons/mob/screen_full.dmi'
|
|
icon_state = "default"
|
|
screen_loc = "CENTER-7,CENTER-7"
|
|
var/view
|
|
layer = FULLSCREEN_LAYER
|
|
plane = FULLSCREEN_PLANE
|
|
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
|
var/severity = 0
|
|
var/show_when_dead = FALSE
|
|
|
|
/atom/movable/screen/fullscreen/proc/should_show_to(mob/mymob)
|
|
if(!show_when_dead && mymob.stat == DEAD)
|
|
return FALSE
|
|
return TRUE
|
|
|
|
/atom/movable/screen/fullscreen/Destroy()
|
|
severity = 0
|
|
return ..()
|
|
|
|
/// Stretch version is suitable for images that stick to screen edges, as they scale with user screen size
|
|
/// For centrally located screen objects, use /atom/movable/screen/fullscreen/center
|
|
/atom/movable/screen/fullscreen/stretch
|
|
view = 7
|
|
|
|
/atom/movable/screen/fullscreen/proc/update_for_view(client_view)
|
|
if(screen_loc == "CENTER-7,CENTER-7" && view != client_view)
|
|
var/list/actualview = getviewsize(client_view)
|
|
view = client_view
|
|
transform = matrix(actualview[1]/FULLSCREEN_OVERLAY_RESOLUTION_X, 0, 0, 0, actualview[2]/FULLSCREEN_OVERLAY_RESOLUTION_Y, 0)
|
|
|
|
/atom/movable/screen/fullscreen/stretch/brute
|
|
icon_state = "brutedamageoverlay"
|
|
layer = UI_DAMAGE_LAYER
|
|
|
|
/atom/movable/screen/fullscreen/stretch/oxy
|
|
icon_state = "oxydamageoverlay"
|
|
layer = UI_DAMAGE_LAYER
|
|
|
|
/atom/movable/screen/fullscreen/stretch/crit
|
|
icon_state = "passage"
|
|
layer = CRIT_LAYER
|
|
|
|
/atom/movable/screen/fullscreen/stretch/blind
|
|
icon_state = "blackimageoverlay"
|
|
layer = BLIND_LAYER
|
|
|
|
/atom/movable/screen/fullscreen/stretch/impaired
|
|
icon_state = "impairedoverlay"
|
|
|
|
/atom/movable/screen/fullscreen/stretch/payback
|
|
icon = 'icons/mob/screen_payback.dmi'
|
|
icon_state = "payback"
|
|
show_when_dead = TRUE
|
|
|
|
/atom/movable/screen/fullscreen/stretch/fog
|
|
icon = 'icons/mob/screen_fog.dmi'
|
|
icon_state = "fog"
|
|
color = "#FF0000"
|
|
|
|
/atom/movable/screen/fullscreen/stretch/curse
|
|
icon = 'icons/mob/screen_fog.dmi'
|
|
icon_state = "curse"
|
|
layer = CURSE_LAYER
|
|
|
|
/atom/movable/screen/fullscreen/stretch/flash
|
|
icon = 'icons/mob/screen_gen.dmi'
|
|
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
|
icon_state = "flash"
|
|
var/dark_type = /atom/movable/screen/fullscreen/stretch/flash/dark
|
|
|
|
/atom/movable/screen/fullscreen/stretch/flash/dark
|
|
icon_state = "flash_dark"
|
|
|
|
/atom/movable/screen/fullscreen/stretch/flash/noise
|
|
icon_state = "noise"
|
|
dark_type = /atom/movable/screen/fullscreen/stretch/flash/noise/dark
|
|
|
|
/atom/movable/screen/fullscreen/stretch/flash/noise/dark
|
|
icon_state = "noise_dark"
|
|
|
|
/atom/movable/screen/fullscreen/stretch/high
|
|
icon = 'icons/mob/screen_gen.dmi'
|
|
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
|
icon_state = "druggy"
|
|
|
|
/atom/movable/screen/fullscreen/stretch/lighting_backdrop
|
|
icon = 'icons/mob/screen_gen.dmi'
|
|
icon_state = "flash"
|
|
transform = matrix(200, 0, 0, 0, 200, 0)
|
|
plane = LIGHTING_PLANE
|
|
blend_mode = BLEND_OVERLAY
|
|
show_when_dead = TRUE
|
|
|
|
//Provides darkness to the back of the lighting plane
|
|
/atom/movable/screen/fullscreen/stretch/lighting_backdrop/lit
|
|
invisibility = INVISIBILITY_LIGHTING
|
|
layer = BACKGROUND_LAYER+21
|
|
color = "#000"
|
|
|
|
//Provides whiteness in case you don't see lights so everything is still visible
|
|
/atom/movable/screen/fullscreen/stretch/lighting_backdrop/unlit
|
|
layer = BACKGROUND_LAYER+20
|
|
|
|
/atom/movable/screen/fullscreen/stretch/see_through_darkness
|
|
icon_state = "nightvision"
|
|
plane = LIGHTING_PLANE
|
|
layer = LIGHTING_LAYER
|
|
blend_mode = BLEND_ADD
|
|
show_when_dead = TRUE
|
|
|
|
/// An effect which tracks the cursor's location on the screen
|
|
/atom/movable/screen/fullscreen/stretch/cursor_catcher
|
|
icon_state = "fullscreen_blocker" // Fullscreen semi transparent icon
|
|
plane = HUD_PLANE
|
|
mouse_opacity = MOUSE_OPACITY_ICON
|
|
/// The mob whose cursor we are tracking.
|
|
var/mob/owner
|
|
/// Client view size of the scoping mob.
|
|
var/list/view_list
|
|
/// Pixel x we send to the scope component.
|
|
var/given_x
|
|
/// Pixel y we send to the scope component.
|
|
var/given_y
|
|
/// The turf we send to the scope component.
|
|
var/turf/given_turf
|
|
/// Mouse parameters, for calculation.
|
|
var/mouse_params
|
|
|
|
/// Links this up with a mob
|
|
/atom/movable/screen/fullscreen/stretch/cursor_catcher/proc/assign_to_mob(mob/owner)
|
|
src.owner = owner
|
|
view_list = getviewsize(owner.client.view)
|
|
RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(on_move))
|
|
calculate_params()
|
|
|
|
/// Update when the mob we're assigned to has moved
|
|
/atom/movable/screen/fullscreen/stretch/cursor_catcher/proc/on_move(atom/source, atom/oldloc, dir, forced)
|
|
SIGNAL_HANDLER
|
|
|
|
if(!given_turf)
|
|
return
|
|
var/x_offset = source.loc.x - oldloc.x
|
|
var/y_offset = source.loc.y - oldloc.y
|
|
given_turf = locate(given_turf.x + x_offset, given_turf.y + y_offset, given_turf.z)
|
|
|
|
/atom/movable/screen/fullscreen/stretch/cursor_catcher/MouseEntered(location, control, params)
|
|
. = ..()
|
|
MouseMove(location, control, params)
|
|
if(usr == owner)
|
|
calculate_params()
|
|
|
|
/atom/movable/screen/fullscreen/stretch/cursor_catcher/MouseMove(location, control, params)
|
|
if(usr != owner)
|
|
return
|
|
mouse_params = params
|
|
|
|
/atom/movable/screen/fullscreen/stretch/cursor_catcher/proc/calculate_params()
|
|
var/list/modifiers = params2list(mouse_params)
|
|
var/icon_x = text2num(LAZYACCESS(modifiers, "vis-x"))
|
|
if(isnull(icon_x))
|
|
icon_x = text2num(LAZYACCESS(modifiers, "icon-x"))
|
|
var/icon_y = text2num(LAZYACCESS(modifiers, "vis-y"))
|
|
if(isnull(icon_y))
|
|
icon_y = text2num(LAZYACCESS(modifiers, "icon-y"))
|
|
var/our_x = round(icon_x / world.icon_size)
|
|
var/our_y = round(icon_y / world.icon_size)
|
|
given_turf = locate(owner.x + our_x - round(view_list[1] / 2), owner.y + our_y - round(view_list[2] / 2), owner.z)
|
|
given_x = round(icon_x - world.icon_size * our_x, 1)
|
|
given_y = round(icon_y - world.icon_size * our_y, 1)
|
|
|
|
/// Centered fullscreen atoms
|
|
/// These are used to center a widescreen image so it scales properly across screen sizes, not suitable for screen images that eminate from the edge of the screen
|
|
/atom/movable/screen/fullscreen/center
|
|
appearance_flags = TILE_BOUND
|
|
|
|
/atom/movable/screen/fullscreen/center/Initialize(mapload)
|
|
. = ..()
|
|
var/icon/I = new(icon)
|
|
var/x_offset = -((I.Width() - world.icon_size) / 2)
|
|
var/y_offset = -((I.Height() - world.icon_size) / 2)
|
|
qdel(I)
|
|
screen_loc = "CENTER:[x_offset],CENTER:[y_offset]"
|
|
|
|
/atom/movable/screen/fullscreen/center/blind/sleeping
|
|
icon = 'icons/mob/screen_sleeping.dmi'
|
|
icon_state = "sleepblind"
|
|
layer = BLIND_LAYER
|
|
|
|
/atom/movable/screen/fullscreen/center/blind/disky
|
|
icon = 'icons/mob/screen_tight.dmi'
|
|
icon_state = "disky"
|
|
layer = BLIND_LAYER
|
|
|
|
/atom/movable/screen/fullscreen/center/agent_box
|
|
icon = 'icons/obj/cardboard_boxes.dmi'
|
|
icon_state = "agentbox"
|
|
alpha = 128
|
|
|
|
/atom/movable/screen/fullscreen/flock_convert
|
|
icon = 'icons/goonstation/hud/flockmindcircuit.dmi'
|
|
icon_state = "flockmindcircuit"
|
|
layer = BLIND_LAYER
|
|
|
|
#undef FULLSCREEN_LAYER
|
|
#undef BLIND_LAYER
|
|
#undef CRIT_LAYER
|