mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-06 20:00:58 +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>
153 lines
4.2 KiB
Plaintext
153 lines
4.2 KiB
Plaintext
/*
|
|
Alternate Appearances! By RemieRichards
|
|
A framework for replacing an atom (and it's overlays) with an override = 1 image, that's less shit!
|
|
Example uses:
|
|
* hallucinating all mobs looking like skeletons
|
|
* people wearing cardborg suits appearing as Standard Cyborgs to the other Silicons
|
|
* !!use your imagination!!
|
|
|
|
*/
|
|
|
|
|
|
//This datum is built on-the-fly by some of the procs below
|
|
//no need to instantiate it
|
|
/datum/alternate_appearance
|
|
var/key = ""
|
|
var/image/img
|
|
var/list/viewers = list()
|
|
var/atom/owner = null
|
|
|
|
|
|
/*
|
|
Displays the alternate_appearance
|
|
displayTo - a list of MOBS to show this appearance to
|
|
*/
|
|
/datum/alternate_appearance/proc/display_to(list/displayTo)
|
|
if(!displayTo || !length(displayTo))
|
|
return
|
|
for(var/m in displayTo)
|
|
var/mob/M = m
|
|
if(!M.viewing_alternate_appearances)
|
|
M.viewing_alternate_appearances = list()
|
|
viewers |= M
|
|
M.viewing_alternate_appearances |= src
|
|
if(M.client)
|
|
M.client.images |= img
|
|
|
|
/*
|
|
Hides the alternate_appearance
|
|
hideFrom - optional list of MOBS to hide it from the list's mobs specifically
|
|
*/
|
|
/datum/alternate_appearance/proc/hide(list/hideFrom)
|
|
var/list/hiding = viewers
|
|
if(hideFrom)
|
|
hiding = hideFrom
|
|
|
|
for(var/m in hiding)
|
|
var/mob/M = m
|
|
if(M.client)
|
|
M.client.images -= img
|
|
if(M.viewing_alternate_appearances && length(M.viewing_alternate_appearances))
|
|
M.viewing_alternate_appearances -= src
|
|
viewers -= M
|
|
|
|
|
|
/*
|
|
Removes the alternate_appearance from its owner's alternate_appearances list, hiding it also
|
|
*/
|
|
/datum/alternate_appearance/proc/remove()
|
|
hide()
|
|
if(owner && owner.alternate_appearances)
|
|
owner.alternate_appearances -= key
|
|
|
|
|
|
/datum/alternate_appearance/Destroy()
|
|
remove()
|
|
return ..()
|
|
|
|
/*
|
|
Builds an alternate_appearance datum for the supplied args, optionally displaying it straight away
|
|
key - the key to the assoc list of key = /datum/alternate_appearances
|
|
img - the image file to be the "alternate appearance"
|
|
WORKS BEST IF:
|
|
* it has override = 1 set
|
|
* the image's loc is the atom that will use the appearance (otherwise... it's not exactly an alt appearance of this atom is it?)
|
|
displayTo - optional list of MOBS to display to immediately
|
|
|
|
Example:
|
|
var/image/I = image(icon = 'disguise.dmi', icon_state = "disguise", loc = src)
|
|
I.override = 1
|
|
add_alt_appearance("super_secret_disguise", I, players)
|
|
|
|
*/
|
|
/atom/proc/add_alt_appearance(key, img, list/displayTo = list())
|
|
if(!key || !img)
|
|
return
|
|
if(!alternate_appearances)
|
|
alternate_appearances = list()
|
|
|
|
var/datum/alternate_appearance/AA = new()
|
|
AA.img = img
|
|
AA.key = key
|
|
AA.owner = src
|
|
|
|
if(alternate_appearances[key])
|
|
qdel(alternate_appearances[key])
|
|
alternate_appearances[key] = AA
|
|
if(displayTo && length(displayTo))
|
|
display_alt_appearance(key, displayTo)
|
|
|
|
|
|
/*
|
|
Gets an alternate appearance for the provided key
|
|
key - the key to the assoc list of key = /datum/alternate_appearances
|
|
*/
|
|
/atom/proc/get_alt_appearance(key)
|
|
return alternate_appearances?[key]
|
|
|
|
//////////////
|
|
// WRAPPERS //
|
|
//////////////
|
|
|
|
/*
|
|
Removes an alternate_appearance from src's alternate_appearances list
|
|
Wrapper for: alternate_appearance/remove()
|
|
key - the key to the assoc list of key = /datum/alternate_appearance
|
|
*/
|
|
/atom/proc/remove_alt_appearance(key)
|
|
if(alternate_appearances)
|
|
if(alternate_appearances[key])
|
|
qdel(alternate_appearances[key])
|
|
|
|
|
|
/*
|
|
Displays an alternate appearance from src's alternate_appearances list
|
|
Wrapper for: alternate_appearance/display_to()
|
|
key - the key to the assoc list of key = /datum/alternate_appearance
|
|
displayTo - a list of MOBS to show this appearance to
|
|
*/
|
|
/atom/proc/display_alt_appearance(key, list/displayTo)
|
|
if(!alternate_appearances || !key)
|
|
return
|
|
var/datum/alternate_appearance/AA = alternate_appearances[key]
|
|
if(!AA || !AA.img)
|
|
return
|
|
AA.display_to(displayTo)
|
|
|
|
|
|
/*
|
|
Hides an alternate appearance from src's alternate_appearances list
|
|
Wrapper for: alternate_appearance/hide()
|
|
key - the key to the assoc list of key = /datum/alternate_appearance
|
|
hideFrom - optional list of MOBS to hide it from the list's mobs specifically
|
|
*/
|
|
/atom/proc/hide_alt_appearance(key, list/hideFrom)
|
|
if(!alternate_appearances || !key)
|
|
return
|
|
var/datum/alternate_appearance/AA = alternate_appearances[key]
|
|
if(!AA)
|
|
return
|
|
AA.hide(hideFrom)
|
|
|
|
|