Merge branch 'master' into upstream-merge-32188
This commit is contained in:
@@ -180,7 +180,7 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
//Generates assets based on iconstates of a single icon
|
||||
/datum/asset/simple/icon_states
|
||||
var/icon
|
||||
var/direction = SOUTH
|
||||
var/list/directions = list(SOUTH)
|
||||
var/frame = 1
|
||||
var/movement_states = FALSE
|
||||
|
||||
@@ -189,19 +189,26 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
|
||||
verify = FALSE
|
||||
|
||||
/datum/asset/simple/icon_states/register()
|
||||
for(var/icon_state_name in icon_states(icon))
|
||||
var/asset = icon(icon, icon_state_name, direction, frame, movement_states)
|
||||
if (!asset)
|
||||
continue
|
||||
asset = fcopy_rsc(asset) //dedupe
|
||||
var/asset_name = sanitize_filename("[prefix].[icon_state_name].png")
|
||||
if (generic_icon_names)
|
||||
asset_name = "[generate_asset_name(asset)].png"
|
||||
/datum/asset/simple/icon_states/register(_icon = icon)
|
||||
for(var/icon_state_name in icon_states(_icon))
|
||||
for(var/direction in directions)
|
||||
var/asset = icon(_icon, icon_state_name, direction, frame, movement_states)
|
||||
if (!asset)
|
||||
continue
|
||||
asset = fcopy_rsc(asset) //dedupe
|
||||
var/prefix2 = (directions.len > 1) ? "[dir2text(direction)]." : ""
|
||||
var/asset_name = sanitize_filename("[prefix].[prefix2][icon_state_name].png")
|
||||
if (generic_icon_names)
|
||||
asset_name = "[generate_asset_name(asset)].png"
|
||||
|
||||
assets[asset_name] = asset
|
||||
register_asset(asset_name, asset)
|
||||
|
||||
..()
|
||||
/datum/asset/simple/icon_states/multiple_icons
|
||||
var/list/icons
|
||||
|
||||
/datum/asset/simple/icon_states/multiple_icons/register()
|
||||
for(var/i in icons)
|
||||
..(i)
|
||||
|
||||
|
||||
//DEFINITIONS FOR ASSET DATUMS START HERE.
|
||||
@@ -351,3 +358,17 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
/datum/asset/simple/icon_states/emojis
|
||||
icon = 'icons/emoji.dmi'
|
||||
generic_icon_names = TRUE
|
||||
|
||||
/datum/asset/simple/icon_states/multiple_icons/pipes
|
||||
icons = list('icons/obj/atmospherics/pipes/pipe_item.dmi', 'icons/obj/atmospherics/pipes/disposal.dmi')
|
||||
prefix = "pipe"
|
||||
|
||||
/datum/asset/simple/icon_states/multiple_icons/pipes/New()
|
||||
directions = GLOB.alldirs
|
||||
..()
|
||||
|
||||
/datum/asset/simple/icon_states/multiple_icons/pipes/register()
|
||||
..()
|
||||
var/meter = icon('icons/obj/atmospherics/pipes/simple.dmi', "meterX", SOUTH, frame, movement_states)
|
||||
if(meter)
|
||||
register_asset(sanitize_filename("[prefix].south.meterX.png"), fcopy_rsc(meter))
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
|
||||
// asset_cache
|
||||
if(href_list["asset_cache_confirm_arrival"])
|
||||
//to_chat(src, "ASSET JOB [href_list["asset_cache_confirm_arrival"]] ARRIVED.")
|
||||
var/job = text2num(href_list["asset_cache_confirm_arrival"])
|
||||
//because we skip the limiter, we have to make sure this is a valid arrival and not somebody tricking us
|
||||
// into letting append to a list without limit.
|
||||
@@ -131,13 +130,6 @@
|
||||
if(filelength > UPLOAD_LIMIT)
|
||||
to_chat(src, "<font color='red'>Error: AllowUpload(): File Upload too large. Upload Limit: [UPLOAD_LIMIT/1024]KiB.</font>")
|
||||
return 0
|
||||
/* //Don't need this at the moment. But it's here if it's needed later.
|
||||
//Helps prevent multiple files being uploaded at once. Or right after eachother.
|
||||
var/time_to_wait = fileaccess_timer - world.time
|
||||
if(time_to_wait > 0)
|
||||
to_chat(src, "<font color='red'>Error: AllowUpload(): Spam prevention. Please wait [round(time_to_wait/10)] seconds.</font>")
|
||||
return 0
|
||||
fileaccess_timer = world.time + FTPDELAY */
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -239,8 +239,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
S["real_name"] >> name
|
||||
if(!name)
|
||||
name = "Character[i]"
|
||||
/*if(i!=1)
|
||||
dat += " | " */
|
||||
dat += "<a style='white-space:nowrap;' href='?_src_=prefs;preference=changeslot;num=[i];' [i == default_slot ? "class='linkOn'" : ""]>[name]</a> "
|
||||
dat += "</center>"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user