[ready]Makes bIcon better
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
prayer_type = "CULTIST PRAYER"
|
||||
deity = "Nar-Sie"
|
||||
|
||||
msg = "<span class='adminnotice'>[bicon(cross)]<b><font color=[font_color]>[prayer_type][deity ? " (to [deity])" : ""]: </font>[ADMIN_FULLMONTY(src)] [ADMIN_SC(src)]:</b> [msg]</span>"
|
||||
msg = "<span class='adminnotice'>[icon2html(cross, GLOB.admins)]<b><font color=[font_color]>[prayer_type][deity ? " (to [deity])" : ""]: </font>[ADMIN_FULLMONTY(src)] [ADMIN_SC(src)]:</b> [msg]</span>"
|
||||
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(C.prefs.chat_toggles & CHAT_PRAYER)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
return
|
||||
|
||||
/obj/item/device/onetankbomb/receive_signal() //This is mainly called by the sensor through sense() to the holder, and from the holder to here.
|
||||
visible_message("[bicon(src)] *beep* *beep*", "*beep* *beep*")
|
||||
visible_message("[icon2html(src, viewers(src))] *beep* *beep*", "*beep* *beep*")
|
||||
sleep(10)
|
||||
if(!src)
|
||||
return
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
health_scan = M.health
|
||||
if(health_scan <= alarm_health)
|
||||
pulse()
|
||||
audible_message("[bicon(src)] *beep* *beep*", "*beep* *beep*")
|
||||
audible_message("[icon2html(src, hearers(src))] *beep* *beep*", "*beep* *beep*")
|
||||
toggle_scan()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
if(!secured || !on || next_activate > world.time)
|
||||
return FALSE
|
||||
pulse(0)
|
||||
audible_message("[bicon(src)] *beep* *beep*", null, 3)
|
||||
audible_message("[icon2html(src, hearers(src))] *beep* *beep*", null, 3)
|
||||
next_activate = world.time + 30
|
||||
|
||||
/obj/item/device/assembly/infra/interact(mob/user)//TODO: change this this to the wire control panel
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
if(!secured || next_activate > world.time)
|
||||
return 0
|
||||
pulse(0)
|
||||
audible_message("[bicon(src)] *beep* *beep*", null, 3)
|
||||
audible_message("[icon2html(src, hearers(src))] *beep* *beep*", null, 3)
|
||||
next_activate = world.time + 30
|
||||
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ Code:
|
||||
if(!(src.wires & WIRE_RADIO_RECEIVE))
|
||||
return 0
|
||||
pulse(1)
|
||||
audible_message("[bicon(src)] *beep* *beep*", null, 1)
|
||||
audible_message("[icon2html(src, hearers(src))] *beep* *beep*", null, 1)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
if(!secured || next_activate > world.time)
|
||||
return FALSE
|
||||
pulse(0)
|
||||
audible_message("[bicon(src)] *beep* *beep*", null, 3)
|
||||
audible_message("[icon2html(src, hearers(src))] *beep* *beep*", null, 3)
|
||||
if(loop)
|
||||
timing = 1
|
||||
update_icon()
|
||||
|
||||
@@ -138,6 +138,13 @@ You can set verify to TRUE if you want send() to sleep until the client has the
|
||||
/proc/register_asset(var/asset_name, var/asset)
|
||||
SSassets.cache[asset_name] = asset
|
||||
|
||||
//Generated names do not include file extention.
|
||||
//Used mainly for code that deals with assets in a generic way
|
||||
//The same asset will always lead to the same asset name
|
||||
/proc/generate_asset_name(var/file)
|
||||
return "asset.[md5(fcopy_rsc(file))]"
|
||||
|
||||
|
||||
//These datums are used to populate the asset cache, the proc "register()" does this.
|
||||
|
||||
//all of our asset datums, used for referring to these later
|
||||
@@ -170,6 +177,33 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
send_asset_list(client,assets,verify)
|
||||
|
||||
|
||||
//Generates assets based on iconstates of a single icon
|
||||
/datum/asset/simple/icon_states
|
||||
var/icon
|
||||
var/direction = SOUTH
|
||||
var/frame = 1
|
||||
var/movement_states = FALSE
|
||||
|
||||
var/prefix = "default" //asset_name = "[prefix].[icon_state_name].png"
|
||||
var/generic_icon_names = FALSE //generate icon filenames using generate_asset_name() instead the above format
|
||||
|
||||
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"
|
||||
|
||||
assets[asset_name] = asset
|
||||
|
||||
..()
|
||||
|
||||
|
||||
//DEFINITIONS FOR ASSET DATUMS START HERE.
|
||||
|
||||
/datum/asset/simple/tgui
|
||||
@@ -306,3 +340,14 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
for(var/path in typesof(/datum/html_interface))
|
||||
var/datum/html_interface/hi = new path()
|
||||
hi.registerResources()
|
||||
|
||||
//this exists purely to avoid meta by pre-loading all language icons.
|
||||
/datum/asset/language/register()
|
||||
for(var/path in typesof(/datum/language))
|
||||
set waitfor = FALSE
|
||||
var/datum/language/L = new path ()
|
||||
L.get_icon()
|
||||
|
||||
/datum/asset/simple/icon_states/emojis
|
||||
icon = 'icons/emoji.dmi'
|
||||
generic_icon_names = TRUE
|
||||
|
||||
@@ -642,7 +642,7 @@ GLOBAL_LIST(external_rsc_urls)
|
||||
)
|
||||
spawn (10) //removing this spawn causes all clients to not get verbs.
|
||||
//Precache the client with all other assets slowly, so as to not block other browse() calls
|
||||
getFilesSlow(src, SSassets.cache, register_asset = FALSE)
|
||||
getFilesSlow(src, SSassets.preload, register_asset = FALSE)
|
||||
|
||||
|
||||
//Hook, override it to run code when dir changes
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
var/keyname = key
|
||||
if(prefs.unlock_content)
|
||||
if(prefs.toggles & MEMBER_PUBLIC)
|
||||
keyname = "<font color='[prefs.ooccolor ? prefs.ooccolor : GLOB.normal_ooc_colour]'>[bicon(icon('icons/member_content.dmi', "blag"))][keyname]</font>"
|
||||
keyname = "<font color='[prefs.ooccolor ? prefs.ooccolor : GLOB.normal_ooc_colour]'>[icon2html('icons/member_content.dmi', world, "blag")][keyname]</font>"
|
||||
|
||||
for(var/client/C in GLOB.clients)
|
||||
if(C.prefs.chat_toggles & CHAT_OOC)
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
targ = mob_override
|
||||
if(!istype(targ))
|
||||
return
|
||||
to_chat(targ, "[bicon(src)]<span class='[span]'>|[message]</span>")
|
||||
to_chat(targ, "[icon2html(src, targ)]<span class='[span]'>|[message]</span>")
|
||||
|
||||
/obj/item/device/flightpack/proc/sync_processing(datum/controller/subsystem/processing/flightpacks/FPS)
|
||||
processing_mode = FPS.flightsuit_processing
|
||||
@@ -924,7 +924,7 @@
|
||||
targ = loc
|
||||
if(!istype(targ))
|
||||
return
|
||||
to_chat(targ, "[bicon(src)]<span class='[span]'>|[message]</span>")
|
||||
to_chat(targ, "[icon2html(src, targ)]<span class='[span]'>|[message]</span>")
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/flightsuit/examine(mob/user)
|
||||
..()
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/proc/display_visor_message(var/msg)
|
||||
var/mob/wearer = loc
|
||||
if(msg && ishuman(wearer))
|
||||
wearer.show_message("[bicon(src)]<b><span class='robot'>[msg]</span></b>", 1)
|
||||
wearer.show_message("[icon2html(src, wearer)]<b><span class='robot'>[msg]</span></b>", 1)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/rad_act(severity)
|
||||
..()
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
if(search)
|
||||
emoji = lowertext(copytext(text, pos+1, search))
|
||||
if(emoji in emojis)
|
||||
parsed += bicon(icon('icons/emoji.dmi', emoji))
|
||||
parsed += icon2html('icons/emoji.dmi', world, emoji)
|
||||
pos = search + 1
|
||||
else
|
||||
parsed += copytext(text, pos, search)
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/icecream/I = O
|
||||
if(!I.ice_creamed)
|
||||
if(product_types[dispense_flavour] > 0)
|
||||
src.visible_message("[bicon(src)] <span class='info'>[user] scoops delicious [flavour_name] ice cream into [I].</span>")
|
||||
visible_message("[icon2html(src, viewers(src))] <span class='info'>[user] scoops delicious [flavour_name] ice cream into [I].</span>")
|
||||
product_types[dispense_flavour] -= 1
|
||||
I.add_ice_cream(flavour_name)
|
||||
// if(beaker)
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
return
|
||||
open = !open
|
||||
if(open && !bomb_defused)
|
||||
audible_message("<span class='warning'>[bicon(src)] *beep*</span>")
|
||||
audible_message("<span class='warning'>[icon2html(src, hearers(src))] *beep*</span>")
|
||||
bomb_active = TRUE
|
||||
START_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
@@ -177,18 +177,93 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
|
||||
var/list/partial = splittext(iconData, "{")
|
||||
return replacetext(copytext(partial[2], 3, -5), "\n", "")
|
||||
|
||||
/proc/bicon(thing)
|
||||
/proc/icon2html(thing, target, icon_state, dir, frame = 1, moving)
|
||||
if (!thing)
|
||||
return
|
||||
var/static/datum/callback/CB = CALLBACK(GLOBAL_PROC, .proc/send_asset)
|
||||
|
||||
var/key
|
||||
var/icon/I = thing
|
||||
if (!target)
|
||||
return
|
||||
if (target == world)
|
||||
target = GLOB.clients
|
||||
|
||||
var/list/targets
|
||||
if (!islist(target))
|
||||
targets = list(target)
|
||||
else
|
||||
targets = target
|
||||
if (!targets.len)
|
||||
return
|
||||
debug_usr("start")
|
||||
if (!isicon(I))
|
||||
debug_usr("not icon")
|
||||
if (isfile(thing)) //special snowflake
|
||||
debug_usr("file")
|
||||
var/name = sanitize_filename("bicon.[thing]")
|
||||
debug_usr("file:[name]")
|
||||
register_asset(name, thing)
|
||||
var/list/callbacks
|
||||
var/list/callback_args = list()
|
||||
for (var/thing2 in targets)
|
||||
callbacks += CB
|
||||
callback_args[++callback_args.len] = list(thing2, name, TRUE)
|
||||
callback_select(callbacks, callback_args, savereturns = FALSE)
|
||||
return "<img class='icon misc' src=\"[url_encode(name)]\">"
|
||||
debug_usr("not file")
|
||||
var/atom/A
|
||||
if (isnull(dir))
|
||||
dir = A.dir
|
||||
if (isnull(icon_state))
|
||||
icon_state = A.icon_state
|
||||
I = A.icon
|
||||
if (ishuman(thing)) // Shitty workaround for a BYOND issue.
|
||||
debug_usr("human")
|
||||
var/icon/temp = I
|
||||
I = icon()
|
||||
I.Insert(temp, dir = SOUTH)
|
||||
dir = SOUTH
|
||||
else
|
||||
debug_usr("icon")
|
||||
if (isnull(dir))
|
||||
dir = SOUTH
|
||||
if (isnull(icon_state))
|
||||
icon_state = ""
|
||||
|
||||
I = icon(I, icon_state, dir, frame)
|
||||
|
||||
key = sanitize_filename("bicon.[md5(icon2base64(I))].[icon_state].[dir].png")
|
||||
debug_usr("key:[key]")
|
||||
register_asset(key, I)
|
||||
var/list/callbacks = list()
|
||||
var/list/callback_args = list()
|
||||
for (var/thing2 in targets)
|
||||
callbacks += CB
|
||||
callback_args[++callback_args.len] = list(thing2, key, TRUE)
|
||||
|
||||
callback_select(callbacks, callback_args, savereturns = FALSE)
|
||||
return "<img class='icon [icon_state]' src=\"[url_encode(key)]\">"
|
||||
|
||||
/proc/icon2base64html(thing)
|
||||
if (!thing)
|
||||
return
|
||||
var/static/list/bicon_cache = list()
|
||||
if (isicon(thing))
|
||||
var/icon/I = thing
|
||||
var/icon_md5 = md5(I)
|
||||
if (!bicon_cache[icon_md5]) // Doesn't exist yet, make it.
|
||||
I = icon(I) //copy it
|
||||
I.Scale(16,16) //scale it
|
||||
bicon_cache[icon_md5] = icon2base64(thing) //base64 it
|
||||
return "<img class='icon misc' src='data:image/png;base64,[bicon_cache[icon_md5]]'>"
|
||||
var/icon_base64 = icon2base64(I)
|
||||
|
||||
if (I.Height() > world.icon_size || I.Width() > world.icon_size)
|
||||
var/icon_md5 = md5(icon_base64)
|
||||
debug_admins(icon_md5)
|
||||
icon_base64 = bicon_cache[icon_md5]
|
||||
if (!icon_base64) // Doesn't exist yet, make it.
|
||||
I = icon(I)
|
||||
I.Scale(world.icon_size, world.icon_size)
|
||||
bicon_cache[icon_md5] = icon_base64 = icon2base64(I)
|
||||
|
||||
|
||||
return "<img class='icon misc' src='data:image/png;base64,[icon_base64]'>"
|
||||
|
||||
// Either an atom or somebody fucked up and is gonna get a runtime, which I'm fine with.
|
||||
var/atom/A = thing
|
||||
@@ -197,25 +272,28 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
|
||||
|
||||
if (!bicon_cache[key]) // Doesn't exist, make it.
|
||||
var/icon/I = icon(A.icon, A.icon_state, SOUTH, 1)
|
||||
I.Scale(16,16)
|
||||
if (ishuman(thing)) // Shitty workaround for a BYOND issue.
|
||||
var/icon/temp = I
|
||||
I = icon()
|
||||
I.Insert(temp, dir = SOUTH)
|
||||
|
||||
if (I.Height() > world.icon_size || I.Width() > world.icon_size)
|
||||
I.Scale(world.icon_size, world.icon_size)
|
||||
|
||||
bicon_cache[key] = icon2base64(I, key)
|
||||
|
||||
return "<img class='icon [A.icon_state]' src='data:image/png;base64,[bicon_cache[key]]'>"
|
||||
|
||||
//Costlier version of bicon() that uses getFlatIcon() to account for overlays, underlays, etc. Use with extreme moderation, ESPECIALLY on mobs.
|
||||
/proc/costly_bicon(thing)
|
||||
//Costlier version of icon2html() that uses getFlatIcon() to account for overlays, underlays, etc. Use with extreme moderation, ESPECIALLY on mobs.
|
||||
/proc/costly_icon2html(thing, target)
|
||||
if (!thing)
|
||||
return
|
||||
|
||||
if (isicon(thing))
|
||||
return bicon(thing)
|
||||
return icon2html(thing, target)
|
||||
|
||||
var/icon/I = getFlatIcon(thing)
|
||||
return bicon(I)
|
||||
return icon2html(I, target)
|
||||
|
||||
/proc/to_chat(target, message)
|
||||
if(!target)
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
diff a/code/modules/goonchat/browserOutput.dm b/code/modules/goonchat/browserOutput.dm (rejected hunks)
|
||||
@@ -166,135 +166,6 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
|
||||
|
||||
//Global chat procs
|
||||
|
||||
-//Converts an icon to base64. Operates by putting the icon in the iconCache savefile,
|
||||
-// exporting it as text, and then parsing the base64 from that.
|
||||
-// (This relies on byond automatically storing icons in savefiles as base64)
|
||||
-/proc/icon2base64(icon/icon, iconKey = "misc")
|
||||
- if (!isicon(icon))
|
||||
- return FALSE
|
||||
- WRITE_FILE(GLOB.iconCache[iconKey], icon)
|
||||
- var/iconData = GLOB.iconCache.ExportText(iconKey)
|
||||
- var/list/partial = splittext(iconData, "{")
|
||||
- return replacetext(copytext(partial[2], 3, -5), "\n", "")
|
||||
-
|
||||
-/proc/icon2html(thing, target, icon_state, dir, frame = 1, moving)
|
||||
- if (!thing)
|
||||
- return
|
||||
- var/static/datum/callback/CB = CALLBACK(GLOBAL_PROC, .proc/send_asset)
|
||||
-
|
||||
- var/key
|
||||
- var/icon/I = thing
|
||||
- if (!target)
|
||||
- return
|
||||
- if (target == world)
|
||||
- target = GLOB.clients
|
||||
-
|
||||
- var/list/targets
|
||||
- if (!islist(target))
|
||||
- targets = list(target)
|
||||
- else
|
||||
- targets = target
|
||||
- if (!targets.len)
|
||||
- return
|
||||
- debug_usr("start")
|
||||
- if (!isicon(I))
|
||||
- debug_usr("not icon")
|
||||
- if (isfile(thing)) //special snowflake
|
||||
- debug_usr("file")
|
||||
- var/name = sanitize_filename("bicon.[thing]")
|
||||
- debug_usr("file:[name]")
|
||||
- register_asset(name, thing)
|
||||
- var/list/callbacks
|
||||
- var/list/callback_args = list()
|
||||
- for (var/thing2 in targets)
|
||||
- callbacks += CB
|
||||
- callback_args[++callback_args.len] = list(thing2, name, TRUE)
|
||||
- callback_select(callbacks, callback_args, savereturns = FALSE)
|
||||
- return "<img class='icon misc' src=\"[url_encode(name)]\">"
|
||||
- debug_usr("not file")
|
||||
- var/atom/A
|
||||
- if (isnull(dir))
|
||||
- dir = A.dir
|
||||
- if (isnull(icon_state))
|
||||
- icon_state = A.icon_state
|
||||
- I = A.icon
|
||||
- if (ishuman(thing)) // Shitty workaround for a BYOND issue.
|
||||
- debug_usr("human")
|
||||
- var/icon/temp = I
|
||||
- I = icon()
|
||||
- I.Insert(temp, dir = SOUTH)
|
||||
- dir = SOUTH
|
||||
- else
|
||||
- debug_usr("icon")
|
||||
- if (isnull(dir))
|
||||
- dir = SOUTH
|
||||
- if (isnull(icon_state))
|
||||
- icon_state = ""
|
||||
-
|
||||
- I = icon(I, icon_state, dir, frame)
|
||||
-
|
||||
- key = sanitize_filename("bicon.[md5(icon2base64(I))].[icon_state].[dir].png")
|
||||
- debug_usr("key:[key]")
|
||||
- register_asset(key, I)
|
||||
- var/list/callbacks = list()
|
||||
- var/list/callback_args = list()
|
||||
- for (var/thing2 in targets)
|
||||
- callbacks += CB
|
||||
- callback_args[++callback_args.len] = list(thing2, key, TRUE)
|
||||
-
|
||||
- callback_select(callbacks, callback_args, savereturns = FALSE)
|
||||
- return "<img class='icon [icon_state]' src=\"[url_encode(key)]\">"
|
||||
-
|
||||
-/proc/icon2base64html(thing)
|
||||
- if (!thing)
|
||||
- return
|
||||
- var/static/list/bicon_cache = list()
|
||||
- if (isicon(thing))
|
||||
- var/icon/I = thing
|
||||
- var/icon_base64 = icon2base64(I)
|
||||
-
|
||||
- if (I.Height() > world.icon_size || I.Width() > world.icon_size)
|
||||
- var/icon_md5 = md5(icon_base64)
|
||||
- debug_admins(icon_md5)
|
||||
- icon_base64 = bicon_cache[icon_md5]
|
||||
- if (!icon_base64) // Doesn't exist yet, make it.
|
||||
- I = icon(I)
|
||||
- I.Scale(world.icon_size, world.icon_size)
|
||||
- bicon_cache[icon_md5] = icon_base64 = icon2base64(I)
|
||||
-
|
||||
-
|
||||
- return "<img class='icon misc' src='data:image/png;base64,[icon_base64]'>"
|
||||
-
|
||||
- // Either an atom or somebody fucked up and is gonna get a runtime, which I'm fine with.
|
||||
- var/atom/A = thing
|
||||
- var/key = "[istype(A.icon, /icon) ? "\ref[A.icon]" : A.icon]:[A.icon_state]"
|
||||
-
|
||||
-
|
||||
- if (!bicon_cache[key]) // Doesn't exist, make it.
|
||||
- var/icon/I = icon(A.icon, A.icon_state, SOUTH, 1)
|
||||
- if (ishuman(thing)) // Shitty workaround for a BYOND issue.
|
||||
- var/icon/temp = I
|
||||
- I = icon()
|
||||
- I.Insert(temp, dir = SOUTH)
|
||||
-
|
||||
- if (I.Height() > world.icon_size || I.Width() > world.icon_size)
|
||||
- I.Scale(world.icon_size, world.icon_size)
|
||||
-
|
||||
- bicon_cache[key] = icon2base64(I, key)
|
||||
-
|
||||
- return "<img class='icon [A.icon_state]' src='data:image/png;base64,[bicon_cache[key]]'>"
|
||||
-
|
||||
-//Costlier version of icon2html() that uses getFlatIcon() to account for overlays, underlays, etc. Use with extreme moderation, ESPECIALLY on mobs.
|
||||
-/proc/costly_icon2html(thing, target)
|
||||
- if (!thing)
|
||||
- return
|
||||
-
|
||||
- if (isicon(thing))
|
||||
- return icon2html(thing, target)
|
||||
-
|
||||
- var/icon/I = getFlatIcon(thing)
|
||||
- return icon2html(I, target)
|
||||
-
|
||||
/proc/to_chat(target, message)
|
||||
if(!target)
|
||||
return
|
||||
@@ -28,10 +28,14 @@ img {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 1;
|
||||
-ms-interpolation-mode: nearest-neighbor;
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
img.icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
height: 1em;
|
||||
min-height: 16px;
|
||||
width: auto;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
a {color: #0000ff;}
|
||||
@@ -357,7 +361,6 @@ h1.alert, h2.alert {color: #000000;}
|
||||
.clown {color: #FF69Bf; font-size: 24px; font-family: "Comic Sans MS", cursive, sans-serif; font-weight: bold;}
|
||||
.his_grace {color: #15D512; font-family: "Courier New", cursive, sans-serif; font-style: italic;}
|
||||
|
||||
BIG IMG.icon {width: 32px; height: 32px;}
|
||||
|
||||
.memo {color: #638500; text-align: center;}
|
||||
.memoedit {text-align: center; font-size: 16px;}
|
||||
|
||||
@@ -29,6 +29,8 @@ var opts = {
|
||||
'messageLimit': 2053, //A limit...for the messages...
|
||||
'scrollSnapTolerance': 10, //If within x pixels of bottom
|
||||
'clickTolerance': 10, //Keep focus if outside x pixels of mousedown position on mouseup
|
||||
'imageRetryDelay': 50, //how long between attempts to reload images (in ms)
|
||||
'imageRetryLimit': 50, //how many attempts should we make?
|
||||
'popups': 0, //Amount of popups opened ever
|
||||
'wasd': false, //Is the user in wasd mode?
|
||||
'chatMode': 'default', //The mode the chat is in
|
||||
@@ -146,6 +148,23 @@ function highlightTerms(el) {
|
||||
el.innerHTML = newText;
|
||||
}
|
||||
}
|
||||
|
||||
function iconError(E) {
|
||||
var that = this;
|
||||
setTimeout(function() {
|
||||
var attempts = $(that).data('reload_attempts');
|
||||
if (typeof attempts === 'undefined' || !attempts) {
|
||||
attempts = 1;
|
||||
}
|
||||
if (attempts > opts.imageRetryLimit)
|
||||
return;
|
||||
var src = that.src;
|
||||
that.src = null;
|
||||
that.src = src+'#'+attempts;
|
||||
$(that).data('reload_attempts', ++attempts);
|
||||
}, opts.imageRetryDelay);
|
||||
}
|
||||
|
||||
//Send a message to the client
|
||||
function output(message, flag) {
|
||||
if (typeof message === 'undefined') {
|
||||
@@ -271,7 +290,7 @@ function output(message, flag) {
|
||||
|
||||
entry.innerHTML = message.trim();
|
||||
$messages[0].appendChild(entry);
|
||||
|
||||
$(entry).find("img.icon").error(iconError);
|
||||
//Actually do the snap
|
||||
if (!filteredOut && atBottom) {
|
||||
$('body,html').scrollTop($messages.outerHeight());
|
||||
@@ -861,7 +880,11 @@ $(function() {
|
||||
$messages.empty();
|
||||
opts.messageCount = 0;
|
||||
});
|
||||
|
||||
|
||||
$('img.icon').error(iconError);
|
||||
|
||||
|
||||
|
||||
|
||||
/*****************************************
|
||||
*
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/language/proc/get_icon()
|
||||
return "[bicon(icon(icon, icon_state))]"
|
||||
return "[icon2html(icon, world, icon_state)]"
|
||||
|
||||
/datum/language/proc/get_random_name(gender, name_count=2, syllable_count=4, syllable_divisor=2)
|
||||
if(!syllables || !syllables.len)
|
||||
|
||||
@@ -6,26 +6,26 @@
|
||||
var/t_has = p_have()
|
||||
var/t_is = p_are()
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nThis is [bicon(src)] \a <EM>[src]</EM>!\n"
|
||||
var/msg = "<span class='info'>*---------*\nThis is [icon2html(src, user)] \a <EM>[src]</EM>!\n"
|
||||
|
||||
if (handcuffed)
|
||||
msg += "<span class='warning'>[t_He] [t_is] [bicon(handcuffed)] handcuffed!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_is] [icon2html(handcuffed, user)] handcuffed!</span>\n"
|
||||
if (head)
|
||||
msg += "[t_He] [t_is] wearing [bicon(head)] \a [src.head] on [t_his] head. \n"
|
||||
msg += "[t_He] [t_is] wearing [icon2html(head, user)] \a [src.head] on [t_his] head. \n"
|
||||
if (wear_mask)
|
||||
msg += "[t_He] [t_is] wearing [bicon(wear_mask)] \a [src.wear_mask] on [t_his] face.\n"
|
||||
msg += "[t_He] [t_is] wearing [icon2html(wear_mask, user)] \a [src.wear_mask] on [t_his] face.\n"
|
||||
if (wear_neck)
|
||||
msg += "[t_He] [t_is] wearing [bicon(wear_neck)] \a [src.wear_neck] around [t_his] neck.\n"
|
||||
msg += "[t_He] [t_is] wearing [icon2html(wear_neck, user)] \a [src.wear_neck] around [t_his] neck.\n"
|
||||
|
||||
for(var/obj/item/I in held_items)
|
||||
if(!(I.flags & ABSTRACT))
|
||||
if(I.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] holding [bicon(I)] [I.gender==PLURAL?"some":"a"] blood-stained [I.name] in [t_his] [get_held_index_name(get_held_index_of_item(I))]!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_is] holding [icon2html(I, user)] [I.gender==PLURAL?"some":"a"] blood-stained [I.name] in [t_his] [get_held_index_name(get_held_index_of_item(I))]!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] holding [bicon(I)] \a [I] in [t_his] [get_held_index_name(get_held_index_of_item(I))].\n"
|
||||
msg += "[t_He] [t_is] holding [icon2html(I, user)] \a [I] in [t_his] [get_held_index_name(get_held_index_of_item(I))].\n"
|
||||
|
||||
if (back)
|
||||
msg += "[t_He] [t_has] [bicon(back)] \a [src.back] on [t_his] back.\n"
|
||||
msg += "[t_He] [t_has] [icon2html(back, user)] \a [src.back] on [t_his] back.\n"
|
||||
var/appears_dead = 0
|
||||
if (stat == DEAD)
|
||||
appears_dead = 1
|
||||
|
||||
@@ -19,55 +19,55 @@
|
||||
if(istype(w_uniform, /obj/item/clothing/under))
|
||||
var/obj/item/clothing/under/U = w_uniform
|
||||
if(U.attached_accessory)
|
||||
accessory_msg += " with [bicon(U.attached_accessory)] \a [U.attached_accessory]"
|
||||
accessory_msg += " with [icon2html(U.attached_accessory, user)] \a [U.attached_accessory]"
|
||||
|
||||
if(w_uniform.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[w_uniform] [w_uniform.gender==PLURAL?"some":"a"] blood-stained [w_uniform.name][accessory_msg]!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing [icon2html(w_uniform, user)] [w_uniform.gender==PLURAL?"some":"a"] blood-stained [w_uniform.name][accessory_msg]!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] wearing [bicon(w_uniform)] \a [w_uniform][accessory_msg].\n"
|
||||
msg += "[t_He] [t_is] wearing [icon2html(w_uniform, user)] \a [w_uniform][accessory_msg].\n"
|
||||
|
||||
//head
|
||||
if(head)
|
||||
if(head.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing [bicon(head)] [head.gender==PLURAL?"some":"a"] blood-stained [head.name] on [t_his] head!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing [icon2html(head, user)] [head.gender==PLURAL?"some":"a"] blood-stained [head.name] on [t_his] head!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] wearing [bicon(head)] \a [head] on [t_his] head.\n"
|
||||
msg += "[t_He] [t_is] wearing [icon2html(head, user)] \a [head] on [t_his] head.\n"
|
||||
|
||||
//suit/armor
|
||||
if(wear_suit)
|
||||
if(wear_suit.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing [bicon(wear_suit)] [wear_suit.gender==PLURAL?"some":"a"] blood-stained [wear_suit.name]!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing [icon2html(wear_suit, user)] [wear_suit.gender==PLURAL?"some":"a"] blood-stained [wear_suit.name]!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] wearing [bicon(wear_suit)] \a [wear_suit].\n"
|
||||
msg += "[t_He] [t_is] wearing [icon2html(wear_suit, user)] \a [wear_suit].\n"
|
||||
|
||||
//suit/armor storage
|
||||
if(s_store)
|
||||
if(s_store.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] carrying [bicon(s_store)] [s_store.gender==PLURAL?"some":"a"] blood-stained [s_store.name] on [t_his] [wear_suit.name]!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_is] carrying [icon2html(s_store, user)] [s_store.gender==PLURAL?"some":"a"] blood-stained [s_store.name] on [t_his] [wear_suit.name]!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] carrying [bicon(s_store)] \a [s_store] on [t_his] [wear_suit.name].\n"
|
||||
msg += "[t_He] [t_is] carrying [icon2html(s_store, user)] \a [s_store] on [t_his] [wear_suit.name].\n"
|
||||
|
||||
//back
|
||||
if(back)
|
||||
if(back.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] [bicon(back)] [back.gender==PLURAL?"some":"a"] blood-stained [back] on [t_his] back.</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_has] [icon2html(back, user)] [back.gender==PLURAL?"some":"a"] blood-stained [back] on [t_his] back.</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_has] [bicon(back)] \a [back] on [t_his] back.\n"
|
||||
msg += "[t_He] [t_has] [icon2html(back, user)] \a [back] on [t_his] back.\n"
|
||||
|
||||
//Hands
|
||||
for(var/obj/item/I in held_items)
|
||||
if(!(I.flags & ABSTRACT))
|
||||
if(I.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] holding [bicon(I)] [I.gender==PLURAL?"some":"a"] blood-stained [I.name] in [t_his] [get_held_index_name(get_held_index_of_item(I))]!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_is] holding [icon2html(I, user)] [I.gender==PLURAL?"some":"a"] blood-stained [I.name] in [t_his] [get_held_index_name(get_held_index_of_item(I))]!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] holding [bicon(I)] \a [I] in [t_his] [get_held_index_name(get_held_index_of_item(I))].\n"
|
||||
msg += "[t_He] [t_is] holding [icon2html(I, user)] \a [I] in [t_his] [get_held_index_name(get_held_index_of_item(I))].\n"
|
||||
|
||||
//gloves
|
||||
if(gloves && !(slot_gloves in obscured))
|
||||
if(gloves.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] [bicon(gloves)] [gloves.gender==PLURAL?"some":"a"] blood-stained [gloves.name] on [t_his] hands!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_has] [icon2html(gloves, user)] [gloves.gender==PLURAL?"some":"a"] blood-stained [gloves.name] on [t_his] hands!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_has] [bicon(gloves)] \a [gloves] on [t_his] hands.\n"
|
||||
msg += "[t_He] [t_has] [icon2html(gloves, user)] \a [gloves] on [t_his] hands.\n"
|
||||
else if(blood_DNA)
|
||||
var/hand_number = get_num_arms()
|
||||
if(hand_number)
|
||||
@@ -78,48 +78,48 @@
|
||||
//handcuffed?
|
||||
if(handcuffed)
|
||||
if(istype(handcuffed, /obj/item/weapon/restraints/handcuffs/cable))
|
||||
msg += "<span class='warning'>[t_He] [t_is] [bicon(handcuffed)] restrained with cable!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_is] [icon2html(handcuffed, user)] restrained with cable!</span>\n"
|
||||
else
|
||||
msg += "<span class='warning'>[t_He] [t_is] [bicon(handcuffed)] handcuffed!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_is] [icon2html(handcuffed, user)] handcuffed!</span>\n"
|
||||
|
||||
//belt
|
||||
if(belt)
|
||||
if(belt.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] [bicon(belt)] [belt.gender==PLURAL?"some":"a"] blood-stained [belt.name] about [t_his] waist!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_has] [icon2html(belt, user)] [belt.gender==PLURAL?"some":"a"] blood-stained [belt.name] about [t_his] waist!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_has] [bicon(belt)] \a [belt] about [t_his] waist.\n"
|
||||
msg += "[t_He] [t_has] [icon2html(belt, user)] \a [belt] about [t_his] waist.\n"
|
||||
|
||||
//shoes
|
||||
if(shoes && !(slot_shoes in obscured))
|
||||
if(shoes.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing [bicon(shoes)] [shoes.gender==PLURAL?"some":"a"] blood-stained [shoes.name] on [t_his] feet!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing [icon2html(shoes, user)] [shoes.gender==PLURAL?"some":"a"] blood-stained [shoes.name] on [t_his] feet!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] wearing [bicon(shoes)] \a [shoes] on [t_his] feet.\n"
|
||||
msg += "[t_He] [t_is] wearing [icon2html(shoes, user)] \a [shoes] on [t_his] feet.\n"
|
||||
|
||||
//mask
|
||||
if(wear_mask && !(slot_wear_mask in obscured))
|
||||
if(wear_mask.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] [bicon(wear_mask)] [wear_mask.gender==PLURAL?"some":"a"] blood-stained [wear_mask.name] on [t_his] face!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_has] [icon2html(wear_mask, user)] [wear_mask.gender==PLURAL?"some":"a"] blood-stained [wear_mask.name] on [t_his] face!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_has] [bicon(wear_mask)] \a [wear_mask] on [t_his] face.\n"
|
||||
msg += "[t_He] [t_has] [icon2html(wear_mask, user)] \a [wear_mask] on [t_his] face.\n"
|
||||
|
||||
if (wear_neck && !(slot_neck in obscured))
|
||||
msg += "[t_He] [t_is] wearing [bicon(wear_neck)] \a [src.wear_neck] around [t_his] neck.\n"
|
||||
msg += "[t_He] [t_is] wearing [icon2html(wear_neck, user)] \a [src.wear_neck] around [t_his] neck.\n"
|
||||
|
||||
//eyes
|
||||
if(glasses && !(slot_glasses in obscured))
|
||||
if(glasses.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] [bicon(glasses)] [glasses.gender==PLURAL?"some":"a"] blood-stained [glasses] covering [t_his] eyes!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_has] [icon2html(glasses, user)] [glasses.gender==PLURAL?"some":"a"] blood-stained [glasses] covering [t_his] eyes!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_has] [bicon(glasses)] \a [glasses] covering [t_his] eyes.\n"
|
||||
msg += "[t_He] [t_has] [icon2html(glasses, user)] \a [glasses] covering [t_his] eyes.\n"
|
||||
|
||||
//ears
|
||||
if(ears && !(slot_ears in obscured))
|
||||
msg += "[t_He] [t_has] [bicon(ears)] \a [ears] on [t_his] ears.\n"
|
||||
msg += "[t_He] [t_has] [icon2html(ears, user)] \a [ears] on [t_his] ears.\n"
|
||||
|
||||
//ID
|
||||
if(wear_id)
|
||||
msg += "[t_He] [t_is] wearing [bicon(wear_id)] \a [wear_id].\n"
|
||||
msg += "[t_He] [t_is] wearing [icon2html(wear_id, user)] \a [wear_id].\n"
|
||||
|
||||
//Jitters
|
||||
switch(jitteriness)
|
||||
@@ -164,7 +164,7 @@
|
||||
var/obj/item/bodypart/BP = X
|
||||
missing -= BP.body_zone
|
||||
for(var/obj/item/I in BP.embedded_objects)
|
||||
msg += "<B>[t_He] [t_has] \a [bicon(I)] [I] embedded in [t_his] [BP.name]!</B>\n"
|
||||
msg += "<B>[t_He] [t_has] \a [icon2html(I, user)] [I] embedded in [t_his] [BP.name]!</B>\n"
|
||||
|
||||
//stores missing limbs
|
||||
var/l_limbs_missing = 0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/mob/living/silicon/ai/examine(mob/user)
|
||||
var/msg = "<span class='info'>*---------*\nThis is [bicon(src)] <EM>[src]</EM>!\n"
|
||||
var/msg = "<span class='info'>*---------*\nThis is [icon2html(src, user)] <EM>[src]</EM>!\n"
|
||||
if (stat == DEAD)
|
||||
msg += "<span class='deadsay'>It appears to be powered-down.</span>\n"
|
||||
else
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
if(href_list["send"])
|
||||
|
||||
sradio.send_signal("ACTIVATE")
|
||||
audible_message("[bicon(src)] *beep* *beep*")
|
||||
audible_message("[icon2html(src, world)] *beep* *beep*")
|
||||
|
||||
if(href_list["freq"])
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/mob/living/silicon/robot/examine(mob/user)
|
||||
var/msg = "<span class='info'>*---------*\nThis is [bicon(src)] \a <EM>[src]</EM>!\n"
|
||||
var/msg = "<span class='info'>*---------*\nThis is [icon2html(src, user)] \a <EM>[src]</EM>!\n"
|
||||
if(desc)
|
||||
msg += "[desc]\n"
|
||||
|
||||
var/obj/act_module = get_active_held_item()
|
||||
if(act_module)
|
||||
msg += "It is holding [bicon(act_module)] \a [act_module].\n"
|
||||
msg += "It is holding [icon2html(act_module, user)] \a [act_module].\n"
|
||||
msg += "<span class='warning'>"
|
||||
if (src.getBruteLoss())
|
||||
if (src.getBruteLoss() < maxHealth*0.5)
|
||||
|
||||
@@ -469,7 +469,7 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
var/area/end_area = get_area(waypoint)
|
||||
|
||||
if(client) //Player bots instead get a location command from the AI
|
||||
to_chat(src, "<span class='noticebig'>Priority waypoint set by [bicon(caller)] <b>[caller]</b>. Proceed to <b>[end_area.name]<\b>.")
|
||||
to_chat(src, "<span class='noticebig'>Priority waypoint set by [icon2html(caller, src)] <b>[caller]</b>. Proceed to <b>[end_area.name]<\b>.")
|
||||
|
||||
//For giving the bot temporary all-access.
|
||||
var/obj/item/weapon/card/id/all_access = new /obj/item/weapon/card/id
|
||||
@@ -485,7 +485,7 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
turn_on() //Saves the AI the hassle of having to activate a bot manually.
|
||||
access_card = all_access //Give the bot all-access while under the AI's command.
|
||||
if(message)
|
||||
to_chat(calling_ai, "<span class='notice'>[bicon(src)] [name] called to [end_area.name]. [path.len-1] meters to destination.</span>")
|
||||
to_chat(calling_ai, "<span class='notice'>[icon2html(src, calling_ai)] [name] called to [end_area.name]. [path.len-1] meters to destination.</span>")
|
||||
pathset = 1
|
||||
mode = BOT_RESPONDING
|
||||
tries = 0
|
||||
@@ -500,7 +500,7 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
var/success = bot_move(ai_waypoint, 3)
|
||||
if(!success)
|
||||
if(calling_ai)
|
||||
to_chat(calling_ai, "[bicon(src)] [get_turf(src) == ai_waypoint ? "<span class='notice'>[src] successfully arrived to waypoint.</span>" : "<span class='danger'>[src] failed to reach waypoint.</span>"]")
|
||||
to_chat(calling_ai, "[icon2html(src, calling_ai)] [get_turf(src) == ai_waypoint ? "<span class='notice'>[src] successfully arrived to waypoint.</span>" : "<span class='danger'>[src] failed to reach waypoint.</span>"]")
|
||||
calling_ai = null
|
||||
bot_reset()
|
||||
|
||||
|
||||
@@ -596,7 +596,7 @@
|
||||
if(pathset) //The AI called us here, so notify it of our arrival.
|
||||
loaddir = dir //The MULE will attempt to load a crate in whatever direction the MULE is "facing".
|
||||
if(calling_ai)
|
||||
to_chat(calling_ai, "<span class='notice'>[bicon(src)] [src] wirelessly plays a chiming sound!</span>")
|
||||
to_chat(calling_ai, "<span class='notice'>[icon2html(src, calling_ai)] [src] wirelessly plays a chiming sound!</span>")
|
||||
playsound(calling_ai, 'sound/machines/chime.ogg',40, 0)
|
||||
calling_ai = null
|
||||
radio_channel = "AI Private" //Report on AI Private instead if the AI is controlling us.
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
/mob/living/simple_animal/hostile/construct/examine(mob/user)
|
||||
var/t_He = p_they(TRUE)
|
||||
var/t_s = p_s()
|
||||
var/msg = "<span class='cult'>*---------*\nThis is [bicon(src)] \a <b>[src]</b>!\n"
|
||||
var/msg = "<span class='cult'>*---------*\nThis is [icon2html(src, user)] \a <b>[src]</b>!\n"
|
||||
msg += "[desc]\n"
|
||||
if(health < maxHealth)
|
||||
msg += "<span class='warning'>"
|
||||
|
||||
@@ -171,29 +171,29 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/examine(mob/user)
|
||||
var/msg = "<span class='info'>*---------*\nThis is [bicon(src)] \a <b>[src]</b>!\n"
|
||||
var/msg = "<span class='info'>*---------*\nThis is [icon2html(src, user)] \a <b>[src]</b>!\n"
|
||||
|
||||
//Hands
|
||||
for(var/obj/item/I in held_items)
|
||||
if(!(I.flags & ABSTRACT))
|
||||
if(I.blood_DNA)
|
||||
msg += "<span class='warning'>It has [bicon(I)] [I.gender==PLURAL?"some":"a"] blood-stained [I.name] in its [get_held_index_name(get_held_index_of_item(I))]!</span>\n"
|
||||
msg += "<span class='warning'>It has [icon2html(I, user)] [I.gender==PLURAL?"some":"a"] blood-stained [I.name] in its [get_held_index_name(get_held_index_of_item(I))]!</span>\n"
|
||||
else
|
||||
msg += "It has [bicon(I)] \a [I] in its [get_held_index_name(get_held_index_of_item(I))].\n"
|
||||
msg += "It has [icon2html(I, user)] \a [I] in its [get_held_index_name(get_held_index_of_item(I))].\n"
|
||||
|
||||
//Internal storage
|
||||
if(internal_storage && !(internal_storage.flags&ABSTRACT))
|
||||
if(internal_storage.blood_DNA)
|
||||
msg += "<span class='warning'>It is holding [bicon(internal_storage)] [internal_storage.gender==PLURAL?"some":"a"] blood-stained [internal_storage.name] in its internal storage!</span>\n"
|
||||
msg += "<span class='warning'>It is holding [icon2html(internal_storage, user)] [internal_storage.gender==PLURAL?"some":"a"] blood-stained [internal_storage.name] in its internal storage!</span>\n"
|
||||
else
|
||||
msg += "It is holding [bicon(internal_storage)] \a [internal_storage] in its internal storage.\n"
|
||||
msg += "It is holding [icon2html(internal_storage, user)] \a [internal_storage] in its internal storage.\n"
|
||||
|
||||
//Cosmetic hat - provides no function other than looks
|
||||
if(head && !(head.flags&ABSTRACT))
|
||||
if(head.blood_DNA)
|
||||
msg += "<span class='warning'>It is wearing [bicon(head)] [head.gender==PLURAL?"some":"a"] blood-stained [head.name] on its head!</span>\n"
|
||||
msg += "<span class='warning'>It is wearing [icon2html(head, user)] [head.gender==PLURAL?"some":"a"] blood-stained [head.name] on its head!</span>\n"
|
||||
else
|
||||
msg += "It is wearing [bicon(head)] \a [head] on its head.\n"
|
||||
msg += "It is wearing [icon2html(head, user)] \a [head] on its head.\n"
|
||||
|
||||
//Braindead
|
||||
if(!client && stat != DEAD)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
if( ishuman(AM) )
|
||||
if(!stat)
|
||||
var/mob/M = AM
|
||||
to_chat(M, "<span class='notice'>[bicon(src)] Squeek!</span>")
|
||||
to_chat(M, "<span class='notice'>[icon2html(src, M)] Squeek!</span>")
|
||||
playsound(src, 'sound/effects/mousesqueek.ogg', 100, 1)
|
||||
..()
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/dextrous/examine(mob/user)
|
||||
if(dextrous)
|
||||
var/msg = "<span class='info'>*---------*\nThis is [bicon(src)] \a <b>[src]</b>!\n"
|
||||
var/msg = "<span class='info'>*---------*\nThis is [icon2html(src)] \a <b>[src]</b>!\n"
|
||||
msg += "[desc]\n"
|
||||
|
||||
for(var/obj/item/I in held_items)
|
||||
if(!(I.flags & ABSTRACT))
|
||||
if(I.blood_DNA)
|
||||
msg += "<span class='warning'>It has [bicon(I)] [I.gender==PLURAL?"some":"a"] blood-stained [I.name] in its [get_held_index_name(get_held_index_of_item(I))]!</span>\n"
|
||||
msg += "<span class='warning'>It has [icon2html(I, user)] [I.gender==PLURAL?"some":"a"] blood-stained [I.name] in its [get_held_index_name(get_held_index_of_item(I))]!</span>\n"
|
||||
else
|
||||
msg += "It has [bicon(I)] \a [I] in its [get_held_index_name(get_held_index_of_item(I))].\n"
|
||||
msg += "It has [icon2html(I, user)] \a [I] in its [get_held_index_name(get_held_index_of_item(I))].\n"
|
||||
|
||||
if(internal_storage && !(internal_storage.flags&ABSTRACT))
|
||||
if(internal_storage.blood_DNA)
|
||||
msg += "<span class='warning'>It is holding [bicon(internal_storage)] [internal_storage.gender==PLURAL?"some":"a"] blood-stained [internal_storage.name] in its internal storage!</span>\n"
|
||||
msg += "<span class='warning'>It is holding [icon2html(internal_storage, user)] [internal_storage.gender==PLURAL?"some":"a"] blood-stained [internal_storage.name] in its internal storage!</span>\n"
|
||||
else
|
||||
msg += "It is holding [bicon(internal_storage)] \a [internal_storage] in its internal storage.\n"
|
||||
msg += "It is holding [icon2html(internal_storage, user)] \a [internal_storage] in its internal storage.\n"
|
||||
msg += "*---------*</span>"
|
||||
to_chat(user, msg)
|
||||
else
|
||||
|
||||
@@ -347,7 +347,7 @@
|
||||
|
||||
/mob/living/simple_animal/slime/examine(mob/user)
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nThis is [bicon(src)] \a <EM>[src]</EM>!\n"
|
||||
var/msg = "<span class='info'>*---------*\nThis is [icon2html(src, user)] \a <EM>[src]</EM>!\n"
|
||||
if (src.stat == DEAD)
|
||||
msg += "<span class='deadsay'>It is limp and unresponsive.</span>\n"
|
||||
else
|
||||
|
||||
@@ -401,19 +401,21 @@
|
||||
add_reagent(P, cached_results[P]*multiplier, null, chem_temp)
|
||||
|
||||
var/list/seen = viewers(4, get_turf(my_atom))
|
||||
var/iconhtml = icon2html(cached_my_atom, seen)
|
||||
if(cached_my_atom)
|
||||
if(!ismob(cached_my_atom)) // No bubbling mobs
|
||||
if(C.mix_sound)
|
||||
playsound(get_turf(cached_my_atom), C.mix_sound, 80, 1)
|
||||
|
||||
for(var/mob/M in seen)
|
||||
to_chat(M, "<span class='notice'>[bicon(my_atom)] [C.mix_message]</span>")
|
||||
to_chat(M, "<span class='notice'>[iconhtml] [C.mix_message]</span>")
|
||||
|
||||
if(istype(cached_my_atom, /obj/item/slime_extract))
|
||||
var/obj/item/slime_extract/ME2 = my_atom
|
||||
ME2.Uses--
|
||||
if(ME2.Uses <= 0) // give the notification that the slime core is dead
|
||||
for(var/mob/M in seen)
|
||||
to_chat(M, "<span class='notice'>[bicon(my_atom)] \The [my_atom]'s power is consumed in the reaction.</span>")
|
||||
to_chat(M, "<span class='notice'>[iconhtml] \The [my_atom]'s power is consumed in the reaction.</span>")
|
||||
ME2.name = "used slime extract"
|
||||
ME2.desc = "This extract has been used up."
|
||||
|
||||
|
||||
@@ -341,7 +341,7 @@
|
||||
found = 1
|
||||
break
|
||||
if(!found)
|
||||
to_chat(user, "[bicon(src)]<span class=notice>The conveyor switch did not detect any linked conveyor belts in range.</span>")
|
||||
to_chat(user, "[icon2html(src, user)]<span class=notice>The conveyor switch did not detect any linked conveyor belts in range.</span>")
|
||||
return
|
||||
var/obj/machinery/conveyor_switch/NC = new/obj/machinery/conveyor_switch(A, id)
|
||||
transfer_fingerprints_to(NC)
|
||||
|
||||
@@ -110,10 +110,10 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
var/obj/item/weapon/storage/box/B = A
|
||||
if(istype(B) && B.contents.len > 0)
|
||||
for(var/obj/item/I in B)
|
||||
U.purchase_log += "<big>[bicon(I)]</big>"
|
||||
U.purchase_log += "<big>[icon2base64html(I)]</big>"
|
||||
else
|
||||
if(purchase_log_vis)
|
||||
U.purchase_log += "<big>[bicon(A)]</big>"
|
||||
U.purchase_log += "<big>[icon2base64html(A)]</big>"
|
||||
|
||||
if(limited_stock > 0)
|
||||
limited_stock -= 1
|
||||
@@ -1394,7 +1394,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
continue
|
||||
crate_value -= I.cost
|
||||
new I.item(C)
|
||||
U.purchase_log += "<big>[bicon(I.item)]</big>"
|
||||
U.purchase_log += "<big>[icon2base64html(I.item)]</big>"
|
||||
|
||||
SSblackbox.add_details("traitor_uplink_items_bought", "[name]|[cost]")
|
||||
return C
|
||||
|
||||
Reference in New Issue
Block a user