Revert "Merge branch 'master' of https://github.com/PolarisSS13/Polaris into NanoGrade"

This reverts commit 6bb5409349, reversing
changes made to f6a83d5ee0.
This commit is contained in:
SinTwo
2016-08-15 12:58:00 -04:00
parent 6bb5409349
commit eabefc538a
325 changed files with 3375 additions and 41824 deletions
-9
View File
@@ -1,9 +0,0 @@
/*
This state only checks if user is conscious.
*/
/var/global/datum/topic_state/hands/hands_state = new()
/datum/topic_state/hands/can_use_topic(var/src_object, var/mob/user)
. = user.shared_ui_interaction(src_object)
if(. > STATUS_CLOSE)
. = min(., user.hands_can_use_topic(src_object))
+1 -1
View File
@@ -1,6 +1,6 @@
/datum/nano_module
var/name
var/datum/host
var/host
/datum/nano_module/New(var/host)
src.host = host
+41 -1
View File
@@ -5,6 +5,32 @@
var/open_uis[0]
// a list of current open /nanoui UIs, not grouped, for use in processing
var/list/processing_uis = list()
// a list of asset filenames which are to be sent to the client on user logon
var/list/asset_files = list()
/**
* Create a new nanomanager instance.
* This proc generates a list of assets which are to be sent to each client on connect
*
* @return /nanomanager new nanomanager object
*/
/datum/nanomanager/New()
var/list/nano_asset_dirs = list(\
"nano/css/",\
"nano/images/",\
"nano/js/",\
"nano/templates/"\
)
var/list/filenames = null
for (var/path in nano_asset_dirs)
filenames = flist(path)
for(var/filename in filenames)
if(copytext(filename, length(filename)) != "/") // filenames which end in "/" are actually directories, which we want to ignore
if(fexists(path + filename))
asset_files.Add(fcopy_rsc(path + filename)) // add this file to asset_files for sending to clients when they connect
return
/**
* Get an open /nanoui ui for the current user, src_object and ui_key and try to update it with data
@@ -228,4 +254,18 @@
oldMob.open_uis.Cut()
return 1 // success
return 1 // success
/**
* Sends all nano assets to the client
* This is called on user login
*
* @param client /client The user's client
*
* @return nothing
*/
/datum/nanomanager/proc/send_resources(client)
for(var/file in asset_files)
client << browse_rsc(file) // send the file to the client
+11 -10
View File
@@ -57,21 +57,22 @@
world.log << "NanoMapGen: <B>GENERATE MAP ([startX],[startY],[currentZ]) to ([endX],[endY],[currentZ])</B>"
usr << "NanoMapGen: <B>GENERATE MAP ([startX],[startY],[currentZ]) to ([endX],[endY],[currentZ])</B>"
var/count = 0;
for(var/WorldX = startX, WorldX <= endX, WorldX++)
for(var/WorldY = startY, WorldY <= endY, WorldY++)
var/turf/T = locate(WorldX, WorldY, currentZ)
var/list/atoms = T.contents + T
atoms = sortByVar(atoms, "layer")
for(var/atom/A in atoms)
if(A.type == /turf/space|| istype(A, /mob) || A.invisibility > 0)
continue
var/icon/TurfIcon = new(A.icon, A.icon_state, A.dir, 1, 0)
TurfIcon.Scale(NANOMAP_ICON_SIZE, NANOMAP_ICON_SIZE)
var/atom/Turf = locate(WorldX, WorldY, currentZ)
Tile.Blend(TurfIcon, ICON_OVERLAY, ((WorldX - 1) * NANOMAP_ICON_SIZE) + (A.pixel_x * NANOMAP_ICON_SIZE / 32), ((WorldY - 1) * NANOMAP_ICON_SIZE) + (A.pixel_y * NANOMAP_ICON_SIZE / 32))
var/icon/TurfIcon = new(Turf.icon, Turf.icon_state)
TurfIcon.Scale(NANOMAP_ICON_SIZE, NANOMAP_ICON_SIZE)
CHECK_TICK
Tile.Blend(TurfIcon, ICON_OVERLAY, ((WorldX - 1) * NANOMAP_ICON_SIZE), ((WorldY - 1) * NANOMAP_ICON_SIZE))
count++
if (count % 8000 == 0)
world.log << "NanoMapGen: <B>[count] tiles done</B>"
sleep(1)
var/mapFilename = "nanomap_z[currentZ]-new.png"
+14 -23
View File
@@ -96,9 +96,6 @@ nanoui is used to open and update nano browser uis
add_common_assets()
var/datum/asset/assets = get_asset_datum(/datum/asset/nanoui)
assets.send(user, ntemplate_filename)
/**
* Use this proc to add assets which are common to (and required by) all nano uis
*
@@ -106,13 +103,15 @@ nanoui is used to open and update nano browser uis
*/
/datum/nanoui/proc/add_common_assets()
add_script("libraries.min.js") // A JS file comprising of jQuery, doT.js and jQuery Timer libraries (compressed together)
add_script("nano.js") // A JS file of the NanoUI JavaScript compressed into one file.
add_stylesheet("nanoui.css") // Concatenated CSS sheet common to all UIs, contains all of the standard NanoUI styling.
// CodeMirror
add_script("codemirror-compressed.js") // A custom minified JavaScript file of CodeMirror, with the following plugins: CSS Mode, NTSL Mode, CSS-hint addon, Search addon, Sublime Keymap.
add_stylesheet("codemirror.css") // A CSS sheet containing the basic stylings and formatting information for CodeMirror.
add_stylesheet("cm_lesser-dark.css") // A theme for CodeMirror to use, which closely resembles the rest of the NanoUI style.
add_script("nano_utility.js") // The NanoUtility JS, this is used to store utility functions.
add_script("nano_template.js") // The NanoTemplate JS, this is used to render templates.
add_script("nano_state_manager.js") // The NanoStateManager JS, it handles updates from the server and passes data to the current state
add_script("nano_state.js") // The NanoState JS, this is the base state which all states must inherit from
add_script("nano_state_default.js") // The NanoStateDefault JS, this is the "default" state (used by all UIs by default), which inherits from NanoState
add_script("nano_base_callbacks.js") // The NanoBaseCallbacks JS, this is used to set up (before and after update) callbacks which are common to all UIs
add_script("nano_base_helpers.js") // The NanoBaseHelpers JS, this is used to set up template helpers which are common to all UIs
add_stylesheet("shared.css") // this CSS sheet is common to all UIs
add_stylesheet("icons.css") // this CSS sheet is common to all UIs
/**
* Set the current status (also known as visibility) of this ui.
@@ -187,15 +186,7 @@ nanoui is used to open and update nano browser uis
"autoUpdateContent" = auto_update_content,
"showMap" = show_map,
"mapZLevel" = map_z_level,
"user" = list(
"name" = user.name,
"fancy" = user.client.is_preference_enabled(/datum/client_preference/browser_style)
),
"window" = list(
"width" = width,
"height" = height,
"ref" = window_id
)
"user" = list("name" = user.name)
)
return config_data
@@ -343,7 +334,7 @@ nanoui is used to open and update nano browser uis
/datum/nanoui/proc/get_html()
// before the UI opens, add the layout files based on the layout key
//add_stylesheet("layout_[layout_key].css")
add_stylesheet("layout_[layout_key].css")
add_template("layout", "layout_[layout_key].tmpl")
var/head_content = ""
@@ -392,9 +383,9 @@ nanoui is used to open and update nano browser uis
</div>
<noscript>
<div id='uiNoScript'>
<h1>Javascript Required</h1>
<p>Javascript is required in order to use this NanoUI interface.</p>
<p>Please enable Javascript in Internet Explorer, and restart your game.</p>
<h2>JAVASCRIPT REQUIRED</h2>
<p>Your Internet Explorer's Javascript is disabled (or broken).<br/>
Enable Javascript and then open this UI again.</p>
</div>
</noscript>
</body>