Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12

This commit is contained in:
Zuhayr
2013-07-04 15:26:06 -07:00
7 changed files with 86 additions and 72 deletions

View File

@@ -31,6 +31,8 @@ var/list/ai_list = list()
var/icon/holo_icon//Default is assigned when AI is created.
var/obj/item/device/pda/ai/aiPDA = null
var/obj/item/device/multitool/aiMulti = null
var/custom_sprite = 0 //For our custom sprites
//Hud stuff
//MALFUNCTION
var/datum/AI_Module/module_picker/malf_picker
@@ -125,55 +127,45 @@ var/list/ai_list = list()
set name = "Set AI Core Display"
if(stat || aiRestorePowerRoutine)
return
if(!custom_sprite) //Check to see if custom sprite time, checking the appopriate file to change a var
var/file = file2text("config/custom_sprites.txt")
var/lines = text2list(file, "\n")
for(var/line in lines)
// split & clean up
var/list/Entry = text2list(line, "-")
for(var/i = 1 to Entry.len)
Entry[i] = trim(Entry[i])
if(Entry.len < 2)
continue;
if(Entry[1] == src.ckey && Entry[2] == src.real_name)
custom_sprite = 1 //They're in the list? Custom sprite time
icon = 'icons/mob/custom-synthetic.dmi'
//if(icon_state == initial(icon_state))
var/icontype = ""
var/list/icons = list("Monochrome", "Blue", "Inverted", "Text", "Smiley", "Angry", "Dorf", "Matrix", "Bliss", "Firewall", "Green", "Red", "Static", "Triumvirate", "Triumvirate Static")
if (src.name == "M00X-BC" && src.ckey == "searif")
icons += "M00X-BC"
if (src.name == "Skuld" && src.ckey == "ravensdale")
icons += "Skuld"
if (src.name == "REMNANT" && src.ckey == "serithi")
icons += "REMNANT"
icontype = input("Please, select a display!", "AI", null/*, null*/) in icons
if(icontype == "Clown")
icon_state = "ai-clown2"
else if(icontype == "Monochrome")
icon_state = "ai-mono"
else if(icontype == "Blue")
icon_state = "ai"
else if(icontype == "Inverted")
icon_state = "ai-u"
else if(icontype == "Firewall")
icon_state = "ai-magma"
else if(icontype == "Green")
icon_state = "ai-wierd"
else if(icontype == "Red")
icon_state = "ai-malf"
else if(icontype == "Static")
icon_state = "ai-static"
else if(icontype == "Text")
icon_state = "ai-text"
else if(icontype == "Smiley")
icon_state = "ai-smiley"
else if(icontype == "Matrix")
icon_state = "ai-matrix"
else if(icontype == "Angry")
icon_state = "ai-angryface"
else if(icontype == "Dorf")
icon_state = "ai-dorf"
else if(icontype == "Bliss")
icon_state = "ai-bliss"
else if(icontype == "M00X-BC")
icon_state = "ai-searif"
else if(icontype == "Triumvirate")
icon_state = "ai-triumvirate"
else if(icontype == "Triumvirate Static")
icon_state = "ai-triumvirate-malf"
else if(icontype == "Skuld")
icon_state = "ai-ravensdale"
else if(icontype == "REMNANT")
icon_state = "ai-serithi"
if (custom_sprite == 1) icontype = ("Custom")//automagically selects custom sprite if one is available
else icontype = input("Select an icon!", "AI", null, null) in list("Monochrome", "Blue", "Inverted", "Text", "Smiley", "Angry", "Dorf", "Matrix", "Bliss", "Firewall", "Green", "Red", "Static", "Triumvirate", "Triumvirate Static")
switch(icontype)
if("Custom") icon_state = "[src.ckey]-ai"
if("Clown") icon_state = "ai-clown2"
if("Monochrome") icon_state = "ai-mono"
if("Inverted") icon_state = "ai-u"
if("Firewall") icon_state = "ai-magma"
if("Green") icon_state = "ai-wierd"
if("Red") icon_state = "ai-red"
if("Static") icon_state = "ai-static"
if("Text") icon_state = "ai-text"
if("Smiley") icon_state = "ai-smiley"
if("Matrix") icon_state = "ai-matrix"
if("Angry") icon_state = "ai-angryface"
if("Dorf") icon_state = "ai-dorf"
if("Bliss") icon_state = "ai-bliss"
if("Triumvirate") icon_state = "ai-triumvirate"
if("Triumvirate Static") icon_state = "ai-triumvirate-malf"
else icon_state = "ai"
//else
//usr <<"You can only change your display once!"
//return
@@ -188,7 +180,7 @@ var/list/ai_list = list()
if (malf.apcs >= 3)
stat(null, "Time until station control secured: [max(malf.AI_win_timeleft/(malf.apcs/3), 0)] seconds")
/mob/living/silicon/ai/proc/ai_alerts()
set category = "AI Commands"
set name = "Show Alerts"
@@ -337,10 +329,6 @@ var/list/ai_list = list()
else
src << "<span class='notice'>Unable to locate the holopad.</span>"
if(href_list["say_word"])
src.announcement(href_list["say_word"])
return
if (href_list["lawc"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
var/L = text2num(href_list["lawc"])
switch(lawcheck[L+1])
@@ -349,6 +337,10 @@ var/list/ai_list = list()
// src << text ("Switching Law [L]'s report status to []", lawcheck[L+1])
checklaws()
if(href_list["say_word"])
src.announcement(href_list["say_word"])
return
if (href_list["lawi"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
var/L = text2num(href_list["lawi"])
switch(ioncheck[L])

View File

@@ -1,10 +1,8 @@
/mob/living/silicon/ai/death(gibbed)
if(stat == DEAD) return
stat = DEAD
if (src.name == "Skuld" && src.ckey == "ravensdale")//checks ID of AI and player to see if it needs to pull the custom death sprite and goes to blue-screen if it doesn't
icon_state = "ai-ravensdale-crash"
else if (src.name == "REMNANT" && src.ckey == "serithi")
icon_state = "ai-serithi-crash"
if (src.custom_sprite == 1)//check for custom AI sprite, defaulting to blue screen if no.
icon_state = "[ckey]-ai-crash"
else icon_state = "ai-crash"
update_canmove()
if(src.eyeobj)

View File

@@ -10,6 +10,7 @@
var/sight_mode = 0
var/custom_name = ""
var/base_icon
var/custom_sprite = 0 //Due to all the sprites involved, a var for our custom borgs may be best
//Hud stuff
@@ -145,7 +146,7 @@
/mob/living/silicon/robot/proc/pick_module()
if(module)
return
var/list/modules = list("Standard", "Engineering", "Medical", "Miner", "Janitor","Service", "Security","Combat")
var/list/modules = list("Standard", "Engineering", "Medical", "Miner", "Janitor", "Service", "Security", "Combat")
if(emagged || security_level > SEC_LEVEL_BLUE)
src << "\red Crisis mode active. Combat module available."
modules+="Combat"
@@ -156,7 +157,7 @@
if(module)
return
switch(mod)
if("Standard")
module = new /obj/item/weapon/robot_module/standard(src)
@@ -177,10 +178,10 @@
if("Miner")
module = new /obj/item/weapon/robot_module/miner(src)
modtype = "Miner"
channels = list("Mining" = 1)
channels = list("Supply" = 1)
module_sprites["Basic"] = "Miner_old"
module_sprites["Advanced Droid"] = "droid-miner"
module_sprites["Default"] = "Miner"
module_sprites["Treadhead"] = "Miner"
if("Medical")
module = new /obj/item/weapon/robot_module/medical(src)
@@ -221,18 +222,10 @@
module_sprites["Combat Android"] = "droid-combat"
channels = list("Security" = 1)
//Begin awful custom item checks.
if (src.name == "Lucy" && src.ckey == "rowtree")
switch(mod)
if("Medical")
module_sprites["Lucy"] = "rowtree-medical"
if("Security" || "Combat")
module_sprites["Lucy"] = "rowtree-security"
if("Engineering")
module_sprites["Lucy"] = "rowtree-engineering"
else
module_sprites["Lucy"] = "rowtree-lucy"
//Custom_sprite check and entry
if (custom_sprite == 1)
module_sprites["Custom"] = "[src.ckey]-[mod]"
hands.icon_state = lowertext(mod)
feedback_inc("cyborg_[lowertext(mod)]",1)
updatename(mod)
@@ -265,6 +258,23 @@
//We also need to update name of internal camera.
if (camera)
camera.c_tag = changed_name
if(!custom_sprite) //Check for custom sprite
var/file = file2text("config/custom_sprites.txt")
var/lines = text2list(file, "\n")
for(var/line in lines)
// split & clean up
var/list/Entry = text2list(line, "-")
for(var/i = 1 to Entry.len)
Entry[i] = trim(Entry[i])
if(Entry.len < 2)
continue;
if(Entry[1] == src.ckey && Entry[2] == src.real_name) //They're in the list? Custom sprite time, var and icon change required
custom_sprite = 1
icon = 'icons/mob/custom-synthetic.dmi'
/mob/living/silicon/robot/verb/Namepick()
if(custom_name)
@@ -979,6 +989,14 @@
overlays += "eyes-[icon_state]"
else
overlays -= "eyes"
if(opened && custom_sprite == 1) //Custom borgs also have custom panels, heh
if(wiresexposed)
overlays += "[src.ckey]-openpanel +w"
else if(cell)
overlays += "[src.ckey]-openpanel +c"
else
overlays += "[src.ckey]-openpanel -c"
if(opened)
if(wiresexposed)