Skip to content

Commit

Permalink
Ports tgui-next 3.0, removes tgui 1.0 + Smart Asset Cache (#8291)
Browse files Browse the repository at this point in the history
* Update Smes.js

* teleporter

* timer

* mining

* infra + prox

* uplink

* apc

* laser

* compile

* ui_x and ui_y and custom_materials

* 512

* smart asset cache

* vending machines

* Fixes missing icons. Removes rasta beanie

* cargo

* MULE + Intelli + Shuttle + Preferences

* AI fixer

* robot

* thing

* thing x2

* mecha

* compile

* oops

* Mining Vendor Fix

* Update traitordevices.dm

* Update proximity.dm

* Update EmergencyShuttleConsole.js

* rebuild

* uwu

* Revert "uwu"

This reverts commit de3ab5f.

* Update autodrobe.dm

* Update Vending.js

* Update _vending.dm

* Update Vending.js

* Update _vending.dm

* Build

* Update _vending.dm

* rebuild

* Update _vending.dm

* laser

* shuttle

* gigas

* signaller

* launchpad

* Update Vending.js

* eigthball

* pad

* ntnet relay

* labor stuff

* solar

* contrcators

* sprite fix

* Fixes contractor runtime (#45932)

* fix

* word change

* fixes contractor tablet (#47559)

* contractor

* ntos card console thing

* fixes

* dna console

* tweaks

* byondUI

* cargo hold

* fixes

* robit

* malf picker

* compile

* dependencies

* electropack

* transfer valve

* canvas

* fixes

* uplni stuff

* dna

* e

* tgui

* Octet separators in DNA Console genome sequencer. (#50516)

* Octet separators for the octet separator god.

* Code review changes

* REMOVES TGUI

* KNOB

* r

* tgui 3.0

* compile

* fixes

* fixes

* crafting fixes

* canister

* refactors

* bio gen

* MIT license

* seed

* Update NaniteCloudControl.js

* Update Uplink.js

* uwu

* oops

* fixes

* nanites

* Fixes nanite deactivation timer

* Revert "Fixes nanite deactivation timer"

This reverts commit c5fcfd3.

* Revert "nanites"

This reverts commit eade3a6.

* various fixes

* compile

* turdis

* Update build_tgui.sh

* akwrard

* ha

* haha, HAHAHA!!

* compile

* fixes

* quick fix

* gps + dna fixes

* Compile

* DNA

* fixes

* sleeper + optable

* fixes

* mulebot

* Update cloning.dm

* Update cloning.dm

* Update ClockworkSlab.js

* Update Operating.dm

* Update nanite_chamber.dm

* Update nanites.dm

* Update nanites.dm

* Update stasis.dm

* Update asset_list_items.dm

* Update ClockworkSlab.js

* uwu

* oof

* Various FIxes + clockwork UI

* compile

* Sleeper fix

* Crew console

* AWKWARD

* PsiWeb

* uwu

* uwu

* psi web

* TGUI GONE

* compile

* autolethe

* Gulag + Solar

* Canister

* build

* private sale

* compile

* Update ntnrc_client.dm

* uwu

* canvas

* uwu

* uwu

* uwu

* uwu

* uwu

* uwu

* uwu

* uwu

* compile

* rust_g 0.4.3

* rust_g 0.4.4

* paint

* fixed

* icons

* Update easter.dm

* Update yogstation.dme

* asset cache

* Update asset_cache.dm

* opops

* hmm

* hm

* oh no

* awkward

* Update asset_list_items.dm

* hey

* Update asset_list_items.dm

* Update asset_cache_item.dm

* last try

* Update asset_list_items.dm

* fuck it

* hmm

* Update asset_list_items.dm

* uwu

* Update client_procs.dm

* Update PDA.dm

* no i didn't

* Update guardianbuilder.dm

* Update solar.dm

* Update minimap.dm

* Update _vending.dm

* tgui

* Update skin.dmf

* Update tgui.bundle.js

* Fixes

* Update borg_monitor.dm

* nanite fix

* Update rust_g.dll

Co-authored-by: Neo <26365368+Neo-0@users.noreply.github.com>
Co-authored-by: Arkatos1 <43862960+Arkatos1@users.noreply.github.com>
Co-authored-by: Rob Bailey <actioninja@gmail.com>
Co-authored-by: nightred <nightred@gmail.com>
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
Co-authored-by: zxaber <37497534+zxaber@users.noreply.github.com>
Co-authored-by: skoglol <33292112+kriskog@users.noreply.github.com>
Co-authored-by: TheChosenEvilOne <34602646+TheChosenEvilOne@users.noreply.github.com>
Co-authored-by: Jordie <4343468+Jordie0608@users.noreply.github.com>
Co-authored-by: 81Denton <32391752+81Denton@users.noreply.github.com>
Co-authored-by: MrPerson <spamtaffic@gmail.com>
Co-authored-by: Akrilla <mrtactical@hotmail.co.uk>
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Co-authored-by: spookydonut <github@spooksoftware.com>
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
Co-authored-by: oranges <email@oranges.net.nz>
Co-authored-by: WarlockD <warlockd@gmail.com>
Co-authored-by: XDTM <heliumt@yahoo.it>
Co-authored-by: Sanator <39862806+Sanator@users.noreply.github.com>
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: Kelenius <kelenius@ya.ru>
  • Loading branch information
1 parent cdafe35 commit 5e514f8
Show file tree
Hide file tree
Showing 843 changed files with 35,102 additions and 39,726 deletions.
4 changes: 2 additions & 2 deletions _maps/RandomZLevels/research.dmm
Expand Up @@ -1337,7 +1337,7 @@
/obj/structure/closet/crate,
/obj/item/disk/data{
desc = "A data disk used to store cloning and genetic records. The name on the label appears to be scratched off.";
fields = list("label" = "Buffer1:Kr-$$@##", "UI" = "f8f603857000f930127c4", "SE" = "414401462231053131010241514651403453121613263463440351136366", "UE" = "340008485c321e542aed4df7032ac04d", "name" = "Krystal Symers", "blood_type" = "A+");
genetic_makeup_buffer = list("label" = "Buffer1:Kr-$$@##", "UI" = "f8f603857000f930127c4", "SE" = "414401462231053131010241514651403453121613263463440351136366", "UE" = "340008485c321e542aed4df7032ac04d", "name" = "Krystal Symers", "blood_type" = "A+");
name = "dusty genetics data disk";
read_only = 1
},
Expand Down Expand Up @@ -1733,7 +1733,7 @@
/obj/structure/closet/crate,
/obj/item/disk/data{
desc = "A data disk used to store cloning and genetic records. The name on the label appears to be scratched off with the words 'DO NOT CLONE' hastily written over it.";
fields = list("label" = "Buffer1:George Melons", "UI" = "3c300f11b5421ca7014d8", "SE" = "430431205660551642142504334461413202111310233445620533134255", "UE" = "6893e6a0b0076a41897776b10cc2b324", "name" = "George Melons", "blood_type" = "B+");
genetic_makeup_buffer = list("label" = "Buffer1:George Melons", "UI" = "3c300f11b5421ca7014d8", "SE" = "430431205660551642142504334461413202111310233445620533134255", "UE" = "6893e6a0b0076a41897776b10cc2b324", "name" = "George Melons", "blood_type" = "B+");
name = "old genetics data disk"
},
/obj/item/disk/data{
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/antagonists.dm
Expand Up @@ -72,3 +72,6 @@
#define CONTRACT_PAYOUT_LARGE 1
#define CONTRACT_PAYOUT_MEDIUM 2
#define CONTRACT_PAYOUT_SMALL 3

#define CONTRACT_UPLINK_PAGE_CONTRACTS "CONTRACTS"
#define CONTRACT_UPLINK_PAGE_HUB "HUB"
6 changes: 5 additions & 1 deletion code/__DEFINES/components.dm
Expand Up @@ -30,6 +30,10 @@
#define COMSIG_GLOB_MOB_DEATH "!mob_death" //mob died somewhere : (mob , gibbed)
#define COMSIG_GLOB_LIVING_SAY_SPECIAL "!say_special" //global living say plug - use sparingly: (mob/speaker , message)

// signals from globally accessible objects
/// from SSsun when the sun changes position : (azimuth)
#define COMSIG_SUN_MOVED "sun_moved"

//////////////////////////////////////////////////////////////////

// /datum signals
Expand Down Expand Up @@ -335,4 +339,4 @@
#define COMSIG_XENO_SLIME_CLICK_SHIFT "xeno_slime_click_shift" //from slime ShiftClickOn(): (/mob)
#define COMSIG_XENO_TURF_CLICK_SHIFT "xeno_turf_click_shift" //from turf ShiftClickOn(): (/mob)
#define COMSIG_XENO_TURF_CLICK_CTRL "xeno_turf_click_alt" //from turf AltClickOn(): (/mob)
#define COMSIG_XENO_MONKEY_CLICK_CTRL "xeno_monkey_click_ctrl" //from monkey CtrlClickOn(): (/mob)
#define COMSIG_XENO_MONKEY_CLICK_CTRL "xeno_monkey_click_ctrl" //from monkey CtrlClickOn(): (/mob)
2 changes: 1 addition & 1 deletion code/__DEFINES/misc.dm
Expand Up @@ -393,7 +393,7 @@ GLOBAL_LIST_INIT(pda_styles, list(MONO, VT, ORBITRON, SHARE))
#define ION_FILE "ion_laws.json"
#define PIRATE_NAMES_FILE "pirates.json"
#define REDPILL_FILE "redpill.json"

#define WANTED_FILE "wanted_message.json"

//Fullscreen overlay resolution in tiles.
#define FULLSCREEN_OVERLAY_RESOLUTION_X 15
Expand Down
4 changes: 3 additions & 1 deletion code/__DEFINES/nanites.dm
Expand Up @@ -8,4 +8,6 @@
#define NANITE_SHOCK_IMMUNE 1
#define NANITE_EMP_IMMUNE 2

#define NANITE_PROGRAM_LIMIT 20
#define NANITE_PROGRAM_LIMIT 20

#define COMSIG_NANITE_DELETE "nanite_delete"
3 changes: 3 additions & 0 deletions code/__DEFINES/power.dm
@@ -0,0 +1,3 @@
#define SOLAR_TRACK_OFF 0
#define SOLAR_TRACK_TIMED 1
#define SOLAR_TRACK_AUTO 2
1 change: 1 addition & 0 deletions code/__DEFINES/rust_g.dm
Expand Up @@ -2,6 +2,7 @@
#define RUST_G "rust_g"

#define rustg_dmi_strip_metadata(fname) call(RUST_G, "dmi_strip_metadata")(fname)
#define rustg_dmi_create_png(fname,width,height,data) call(RUST_G, "dmi_create_png")(fname,width,height,data)

#define rustg_git_revparse(rev) call(RUST_G, "rg_git_revparse")(rev)
#define rustg_git_commit_date(rev) call(RUST_G, "rg_git_commit_date")(rev)
Expand Down
3 changes: 2 additions & 1 deletion code/__HELPERS/_lists.dm
Expand Up @@ -388,6 +388,7 @@
for(var/datum/data/record/R in L)
if(R.fields[field] == value)
return R
return FALSE


//Move a single element from position fromIndex within a list, to position toIndex
Expand Down Expand Up @@ -588,4 +589,4 @@
if(l[i] != d[i])
return FALSE

return TRUE
return TRUE
3 changes: 2 additions & 1 deletion code/__HELPERS/_string_lists.dm
@@ -1,4 +1,5 @@
#define pick_list(FILE, KEY) (pick(strings(FILE, KEY)))
#define pick_list_weighted(FILE, KEY) (pickweight(strings(FILE, KEY)))
#define pick_list_replacements(FILE, KEY) (strings_replacement(FILE, KEY))
#define json_load(FILE) (json_decode(file2text(FILE)))

Expand Down Expand Up @@ -38,4 +39,4 @@ GLOBAL_VAR(string_filename_current_key)
if(fexists("[directory]/[filename]"))
GLOB.string_cache[filename] = json_load("[directory]/[filename]")
else
CRASH("file not found: [directory]/[filename]")
CRASH("file not found: [directory]/[filename]")
64 changes: 64 additions & 0 deletions code/__HELPERS/game.dm
Expand Up @@ -53,6 +53,28 @@
for(var/I in adjacent_turfs)
. |= get_area(I)

/**
* Get a bounding box of a list of atoms.
*
* Arguments:
* - atoms - List of atoms. Can accept output of view() and range() procs.
*
* Returns: list(x1, y1, x2, y2)
*/
/proc/get_bbox_of_atoms(list/atoms)
var/list/list_x = list()
var/list/list_y = list()
for(var/_a in atoms)
var/atom/a = _a
list_x += a.x
list_y += a.y
return list(
min(list_x),
min(list_y),
max(list_x),
max(list_y))


// Like view but bypasses luminosity check

/proc/get_hear(range, atom/source)
Expand Down Expand Up @@ -571,3 +593,45 @@
var/pressure = environment.return_pressure()
if(pressure <= LAVALAND_EQUIPMENT_EFFECT_PRESSURE)
. = TRUE

/proc/ispipewire(item)
var/static/list/pire_wire = list(
/obj/machinery/atmospherics,
/obj/structure/disposalpipe,
/obj/structure/cable
)
return (is_type_in_list(item, pire_wire))

// Find a obstruction free turf that's within the range of the center. Can also condition on if it is of a certain area type.
/proc/find_obstruction_free_location(var/range, var/atom/center, var/area/specific_area)
var/list/turfs = RANGE_TURFS(range, center)
var/list/possible_loc = list()

for(var/turf/found_turf in turfs)
var/area/turf_area = get_area(found_turf)

// We check if both the turf is a floor, and that it's actually in the area.
// We also want a location that's clear of any obstructions.
if (specific_area)
if (!istype(turf_area, specific_area))
continue

if (!isspaceturf(found_turf))
if (!is_blocked_turf(found_turf))
possible_loc.Add(found_turf)

// Need at least one free location.
if (possible_loc.len < 1)
return FALSE

return pick(possible_loc)

/proc/power_fail(duration_min, duration_max)
for(var/P in GLOB.apcs_list)
var/obj/machinery/power/apc/C = P
if(C.cell && SSmapping.level_trait(C.z, ZTRAIT_STATION))
var/area/A = C.area
if(GLOB.typecache_powerfailure_safe_areas[A.type])
continue

C.energy_fail(rand(duration_min,duration_max))
12 changes: 7 additions & 5 deletions code/__HELPERS/icons.dm
Expand Up @@ -1127,9 +1127,10 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
if (!isicon(I))
if (isfile(thing)) //special snowflake
var/name = sanitize_filename("[generate_asset_name(thing)].png")
register_asset(name, thing)
if (!SSassets.cache[name])
register_asset(name, thing)
for (var/thing2 in targets)
send_asset(thing2, key, FALSE)
send_asset(thing2, key)
return "<img class='icon icon-misc' src=\"[url_encode(name)]\">"
var/atom/A = thing
if (isnull(dir))
Expand All @@ -1151,9 +1152,10 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
I = icon(I, icon_state, dir, frame, moving)

key = "[generate_asset_name(I)].png"
register_asset(key, I)
if(!SSassets.cache[key])
register_asset(key, I)
for (var/thing2 in targets)
send_asset(thing2, key, FALSE)
send_asset(thing2, key)

return "<img class='icon icon-[icon_state]' src=\"[url_encode(key)]\">"

Expand Down Expand Up @@ -1199,4 +1201,4 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
return icon2html(thing, target)

var/icon/I = getFlatIcon(thing)
return icon2html(I, target)
return icon2html(I, target)
7 changes: 6 additions & 1 deletion code/__HELPERS/radio.dm
@@ -1,6 +1,6 @@
// Ensure the frequency is within bounds of what it should be sending/receiving at
/proc/sanitize_frequency(frequency, free = FALSE)
. = round(frequency)
frequency = round(frequency)
if(free)
. = clamp(frequency, MIN_FREE_FREQ, MAX_FREE_FREQ)
else
Expand All @@ -12,3 +12,8 @@
/proc/format_frequency(frequency)
frequency = text2num(frequency)
return "[round(frequency / 10)].[frequency % 10]"

//Opposite of format, returns as a number
/proc/unformat_frequency(frequency)
frequency = text2num(frequency)
return frequency * 10
1 change: 1 addition & 0 deletions code/__HELPERS/roundend.dm
Expand Up @@ -334,6 +334,7 @@
roundend_report.set_content(content)
roundend_report.stylesheets = list()
roundend_report.add_stylesheet("roundend", 'html/browser/roundend.css')
roundend_report.add_stylesheet("font-awesome", 'html/font-awesome/css/all.min.css')
roundend_report.open(FALSE)

/datum/controller/subsystem/ticker/proc/personal_report(client/C, popcount)
Expand Down
2 changes: 2 additions & 0 deletions code/_globalvars/lists/poll_ignore.dm
Expand Up @@ -19,6 +19,7 @@
#define POLL_IGNORE_SHADE "shade"
#define POLL_IGNORE_IMAGINARYFRIEND "imaginary_friend"
#define POLL_IGNORE_SPLITPERSONALITY "split_personality"
#define POLL_IGNORE_CONTRACTOR_SUPPORT "contractor_support"


GLOBAL_LIST_INIT(poll_ignore_desc, list(
Expand All @@ -41,6 +42,7 @@ GLOBAL_LIST_INIT(poll_ignore_desc, list(
POLL_IGNORE_SHADE = "Shade",
POLL_IGNORE_IMAGINARYFRIEND = "Imaginary Friend",
POLL_IGNORE_SPLITPERSONALITY = "Split Personality",
POLL_IGNORE_CONTRACTOR_SUPPORT = "Contractor Support Unit"
))
GLOBAL_LIST_INIT(poll_ignore, init_poll_ignore())

Expand Down

0 comments on commit 5e514f8

Please sign in to comment.