Replaces clockwork component initials with icons (#1971)

This commit is contained in:
CitadelStationBot
2017-07-10 18:14:11 -05:00
committed by kevinz000
parent cb0613fa4e
commit 059e1ad46b
3 changed files with 19 additions and 15 deletions
@@ -62,6 +62,10 @@
else
return null
//returns a component icon from a component id
/proc/get_component_icon(id)
return "<img style='width:14px; height:14px' src='data:image/png;base64,[icon2base64(icon('icons/obj/tgui_components.dmi', id))]'/>"
//returns a component id from a component name
/proc/get_component_id(name)
switch(name)
@@ -335,7 +335,7 @@
pointers for serving the master well. You should recommended that you check this area for help if you get stuck or need guidance on what to do next.<br><br>\
\
<i>Disclaimer: Many objects, terms, and phrases, such as Servant, Cache, and Slab, are capitalized like proper nouns. This is a quirk of the Ratvarian language; \
do not let it confuse you! You are free to use the names in pronoun form when speaking in normal languages.")
do not let it confuse you! You are free to use the names in pronoun form when speaking in normal languages.<br>")
return textlist.Join()
//Gets text for a certain section. "Default" is used for when you first open Recollection.
@@ -394,11 +394,11 @@
dat += "<font color=#BE8700><b>Cache:</b></font> A <i>Tinkerer's Cache</i>, which is a structure that stores and creates components.<br>"
dat += "<font color=#BE8700><b>CV:</b></font> Construction Value. All clockwork structures, floors, and walls increase this number.<br>"
dat += "<font color=#BE8700><b>Geis:</b></font> An important scripture used to make normal crew and robots into Servants of Ratvar.<br>"
dat += "<font color=#BE8700><b>BE:</b></font> Belligerent Eye, a component type used in offensive scriptures.<br>"
dat += "<font color=#BE8700><b>VG:</b></font> Vanguard Cogwheel, a component type used in defensive scriptures.<br>"
dat += "<font color=#BE8700><b>GC:</b></font> Geis Capacitor, a component type used in mind-related scriptures.<br>"
dat += "<font color=#BE8700><b>RA:</b></font> Replicant Alloy, a component type used in construction scriptures.<br>"
dat += "<font color=#BE8700><b>HA:</b></font> Hierophant Ansible, a component type used in energy scriptures.<br>"
dat += "<font color=#BE8700><b>BE [get_component_icon(BELLIGERENT_EYE)]:</b></font> Belligerent Eye, a component type used in offensive scriptures.<br>"
dat += "<font color=#BE8700><b>VG [get_component_icon(VANGUARD_COGWHEEL)]:</b></font> Vanguard Cogwheel, a component type used in defensive scriptures.<br>"
dat += "<font color=#BE8700><b>GC [get_component_icon(GEIS_CAPACITOR)]:</b></font> Geis Capacitor, a component type used in mind-related scriptures.<br>"
dat += "<font color=#BE8700><b>RA [get_component_icon(REPLICANT_ALLOY)]:</b></font> Replicant Alloy, a component type used in construction scriptures.<br>"
dat += "<font color=#BE8700><b>HA [get_component_icon(HIEROPHANT_ANSIBLE)]:</b></font> Hierophant Ansible, a component type used in energy scriptures.<br>"
dat += "<font color=#BE8700><b>Ark:</b></font> The cult's win condition, a huge structure that needs to be defended.<br><br>"
dat += "<font color=#BE8700 size=3>Items</font><br>"
dat += "<font color=#BE8700><b>Slab:</b></font> A clockwork slab, a Servant's most important tool. You're holding one! Keep it safe and hidden.<br>"
@@ -454,11 +454,11 @@
production_text = production_text.Join()
dat += "<font color=#BE8700 size=3>Components & Their Uses</font><br><br>"
dat += "<b>Components</b> are your primary resource as a Servant. There are five types of component, with each one being used in different roles:<br><br>"
dat += "<font color=#6E001A>Belligerent Eyes</font> are aggressive and judgemental, and are used in offensive scripture;<br>"
dat += "<font color=#1E8CE1>Vanguard Cogwheels</font> are defensive and repairing, and are used in defensive scripture;<br>"
dat += "<font color=#AF0AAF>Geis Capacitors</font> are for conversion and control, and are used in mind-related scripture;<br>" //References the old name
dat += "<font color=#5A6068>Replicant Alloy</font> is a strong, malleable metal and is used for construction and creation;<br>"
dat += "<font color=#DAAA18>Hierophant Ansibles</font> are for transmission and power, and are used in power and teleportation scripture<br><br>"
dat += "<font color=#6E001A>Belligerent Eyes [get_component_icon(BELLIGERENT_EYE)]</font> are aggressive and judgemental, and are used in offensive scripture;<br>"
dat += "<font color=#1E8CE1>Vanguard Cogwheels [get_component_icon(VANGUARD_COGWHEEL)]</font> are defensive and repairing, and are used in defensive scripture;<br>"
dat += "<font color=#AF0AAF>Geis Capacitors [get_component_icon(GEIS_CAPACITOR)]</font> are for conversion and control, and are used in mind-related scripture;<br>" //References the old name
dat += "<font color=#5A6068>Replicant Alloy [get_component_icon(REPLICANT_ALLOY)]</font> is a strong, malleable metal and is used for construction and creation;<br>"
dat += "<font color=#DAAA18>Hierophant Ansibles [get_component_icon(HIEROPHANT_ANSIBLE)]</font> are for transmission and power, and are used in power and teleportation scripture<br><br>"
dat += "Although this is a good rule of thumb, their effects become much more nuanced when used together. For instance, a turret might have both belligerent eyes and \
vanguard cogwheels as construction requirements, because it defends its allies by harming its enemies.<br><br>"
dat += "Components' primary use is fueling <b>scripture</b> (covered in its own section), and they can be created through various ways. This clockwork slab, for instance, \
@@ -569,14 +569,14 @@
data["components"] = stored_components.Copy()
var/list/temp_data = list("<font color=#B18B25>")
for(var/i in data["components"]) //display the slab's components
temp_data += "<font color=[get_component_color_bright(i)]>[get_component_acronym(i)] <b>[data["components"][i]]</b></font>"
temp_data += "<font color=[get_component_color_bright(i)]>[get_component_icon(i)] <b>[data["components"][i]]</b></font>"
if(i != HIEROPHANT_ANSIBLE)
temp_data += " "
else
temp_data += " ("
if(GLOB.clockwork_caches) //if we have caches, display what's in the global cache
for(var/i in GLOB.clockwork_component_cache)
temp_data += "<font color=[get_component_color_bright(i)]>[get_component_acronym(i)] <b>[data["components"][i] + GLOB.clockwork_component_cache[i]]</b></font>"
temp_data += "<font color=[get_component_color_bright(i)]>[get_component_icon(i)] <b>[data["components"][i] + GLOB.clockwork_component_cache[i]]</b></font>"
if(i != HIEROPHANT_ANSIBLE)
temp_data += " "
else
@@ -608,7 +608,7 @@
data["target_comp"] = "<font color=#B18B25>NONE</font>"
if(target_component_id) //if we have a component to make, display that, too
data["target_comp"] = "<font color=[get_component_color_bright(target_component_id)]>[get_component_acronym(target_component_id)]</font>"
data["target_comp"] = "<font color=[get_component_color_bright(target_component_id)]>[get_component_icon(target_component_id)]</font>"
generate_all_scripture()
@@ -637,7 +637,7 @@
var/list/really_temp_data = list(": ")
for(var/i in temp_info["required"])
if(temp_info["required"][i])
really_temp_data += "<font color=[get_component_color_bright(i)]>[get_component_acronym(i)] <b>[temp_info["required"][i]]</b></font> "
really_temp_data += "<font color=[get_component_color_bright(i)]>[get_component_icon(i)] <b>[temp_info["required"][i]]</b></font> "
really_temp_data = really_temp_data.Join()
temp_info["required"] = really_temp_data
else //and if we don't, we won't.
Binary file not shown.

After

Width:  |  Height:  |  Size: 986 B