mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 11:07:12 +01:00
Removes real_name restriction for silicon sprites
Also adds code support for custom maint drones. Whether or not we want to let people get custom drone sprites is up to the head admins, but the code is there for it. Maint drones have a new verb which attempts to equip their custom sprite, if one exists for that player, which can only be used once.
This commit is contained in:
@@ -299,22 +299,59 @@ var/list/ai_verbs_default = list(
|
||||
for(var/i = 1 to Entry.len)
|
||||
Entry[i] = trim(Entry[i])
|
||||
|
||||
if(Entry.len < 3 || Entry[1] != "ai") //ignore incorrectly formatted entries or entries that aren't marked for AI
|
||||
if(Entry.len < 2 || Entry[1] != "ai") //ignore incorrectly formatted entries or entries that aren't marked for AI
|
||||
continue;
|
||||
|
||||
if(Entry[2] == ckey && Entry[3] == real_name) //They're in the list? Custom sprite time, var and icon change required
|
||||
if(Entry[2] == ckey) //They're in the list? Custom sprite time, var and icon change required
|
||||
custom_sprite = 1
|
||||
icon = 'icons/mob/custom_synthetic/custom-synthetic.dmi'
|
||||
|
||||
var/display_choices = list(
|
||||
"Monochrome",
|
||||
"Blue",
|
||||
"Clown",
|
||||
"Inverted",
|
||||
"Text",
|
||||
"Smiley",
|
||||
"Angry",
|
||||
"Dorf",
|
||||
"Matrix",
|
||||
"Bliss",
|
||||
"Firewall",
|
||||
"Green",
|
||||
"Red",
|
||||
"Static",
|
||||
"Triumvirate",
|
||||
"Triumvirate Static",
|
||||
"Red October",
|
||||
"Sparkles",
|
||||
"ANIMA",
|
||||
"President",
|
||||
"NT",
|
||||
"NT2",
|
||||
"Rainbow",
|
||||
"Angel",
|
||||
"Heartline",
|
||||
"Hades",
|
||||
"Helios",
|
||||
"Syndicat Meow",
|
||||
"Too Deep",
|
||||
"Goon",
|
||||
"Murica",
|
||||
"Fuzzy",
|
||||
"Glitchman",
|
||||
"House",
|
||||
"Database"
|
||||
)
|
||||
if(custom_sprite)
|
||||
display_choices += "Custom"
|
||||
|
||||
//if(icon_state == initial(icon_state))
|
||||
var/icontype = ""
|
||||
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", "Clown", "Inverted", "Text", "Smiley", "Angry", "Dorf", "Matrix", "Bliss", "Firewall", "Green", "Red", "Static", "Triumvirate", "Triumvirate Static", "Red October", "Sparkles", "ANIMA", "President", "NT", "NT2", "Rainbow", "Angel", "Heartline", "Hades", "Helios", "Syndicat Meow", "Too Deep", "Goon", "Murica", "Fuzzy", "Glitchman", "House", "Database")
|
||||
icontype = input("Select an icon!", "AI", null, null) in display_choices
|
||||
icon = 'icons/mob/AI.dmi' //reset this in case we were on a custom sprite and want to change to a standard one
|
||||
switch(icontype)
|
||||
if("Custom")
|
||||
icon = 'icons/mob/custom_synthetic/custom-synthetic.dmi' //set this here so we can use the custom_sprite
|
||||
icon_state = "[ckey]-ai"
|
||||
if("Clown")
|
||||
icon_state = "ai-clown"
|
||||
@@ -859,10 +896,10 @@ var/list/ai_verbs_default = list(
|
||||
for(var/i = 1 to Entry.len)
|
||||
Entry[i] = trim(Entry[i])
|
||||
|
||||
if(Entry.len < 3 || Entry[1] != "hologram")
|
||||
if(Entry.len < 2 || Entry[1] != "hologram")
|
||||
continue
|
||||
|
||||
if (Entry[2] == ckey && Entry[3] == real_name) //Custom holograms
|
||||
if (Entry[2] == ckey) //Custom holograms
|
||||
custom_hologram = 1 // option is given in hologram menu
|
||||
|
||||
var/input
|
||||
|
||||
@@ -395,6 +395,7 @@
|
||||
set category = "pAI Commands"
|
||||
set name = "Choose Chassis"
|
||||
|
||||
var/list/my_choices = list()
|
||||
var/choice
|
||||
var/finalized = "No"
|
||||
|
||||
@@ -409,26 +410,32 @@
|
||||
for(var/i = 1 to Entry.len)
|
||||
Entry[i] = trim(Entry[i])
|
||||
|
||||
if(Entry.len < 3 || Entry[1] != "pai") //ignore incorrectly formatted entries or entries that aren't marked for pAI
|
||||
if(Entry.len < 2 || Entry[1] != "pai") //ignore incorrectly formatted entries or entries that aren't marked for pAI
|
||||
continue;
|
||||
|
||||
if(Entry[2] == ckey && Entry[3] == real_name) //They're in the list? Custom sprite time, var and icon change required
|
||||
if(Entry[2] == ckey) //They're in the list? Custom sprite time, var and icon change required
|
||||
custom_sprite = 1
|
||||
icon = 'icons/mob/custom_synthetic/custom-synthetic.dmi'
|
||||
my_choices["Custom"] = "[ckey]-pai"
|
||||
|
||||
my_choices = possible_chassis.Copy()
|
||||
if(custom_sprite)
|
||||
chassis = "[ckey]-pai"
|
||||
icon_state = "[ckey]-pai"
|
||||
else
|
||||
while(finalized == "No" && client)
|
||||
my_choices["Custom"] = "[ckey]-pai"
|
||||
|
||||
choice = input(usr,"What would you like to use for your mobile chassis icon? This decision can only be made once.") as null|anything in possible_chassis
|
||||
if(!choice) return
|
||||
if(loc == card) //don't let them continue in card form, since they won't be able to actually see their new mobile form sprite.
|
||||
to_chat(src, "<span class='warning'>You must be in your mobile form to reconfigure your chassis.</span>")
|
||||
return
|
||||
|
||||
icon_state = possible_chassis[choice]
|
||||
finalized = alert("Look at your sprite. Is this what you wish to use?",,"No","Yes")
|
||||
while(finalized == "No" && client)
|
||||
choice = input(usr,"What would you like to use for your mobile chassis icon? This decision can only be made once.") as null|anything in my_choices
|
||||
if(!choice) return
|
||||
if(choice == "Custom")
|
||||
icon = 'icons/mob/custom_synthetic/custom-synthetic.dmi'
|
||||
else
|
||||
icon = 'icons/mob/pai.dmi'
|
||||
icon_state = my_choices[choice]
|
||||
finalized = alert("Look at your sprite. Is this what you wish to use?",,"No","Yes")
|
||||
|
||||
chassis = possible_chassis[choice]
|
||||
chassis = my_choices[choice]
|
||||
verbs -= /mob/living/silicon/pai/proc/choose_chassis
|
||||
|
||||
/mob/living/silicon/pai/proc/choose_verbs()
|
||||
@@ -586,7 +593,7 @@
|
||||
// Handle being picked up.
|
||||
|
||||
|
||||
/mob/living/silicon/pai/get_scooped(var/mob/living/carbon/grabber)
|
||||
/mob/living/silicon/pai/get_scooped(mob/living/carbon/grabber)
|
||||
var/obj/item/weapon/holder/H = ..()
|
||||
if(!istype(H))
|
||||
return
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
req_access = list(access_engine, access_robotics)
|
||||
ventcrawler = 2
|
||||
magpulse = 1
|
||||
|
||||
|
||||
default_language = "Drone"
|
||||
|
||||
// We need to keep track of a few module items so we don't need to do list operations
|
||||
@@ -43,7 +43,7 @@
|
||||
remove_language("Galactic Common")
|
||||
add_language("Drone Talk", 1)
|
||||
add_language("Drone", 1)
|
||||
|
||||
|
||||
// Disable the microphone wire on Drones
|
||||
if(radio)
|
||||
radio.wires.CutWireIndex(WIRE_TRANSMIT)
|
||||
@@ -281,7 +281,7 @@
|
||||
|
||||
if(!player) return
|
||||
|
||||
src.ckey = player.ckey
|
||||
ckey = player.ckey
|
||||
|
||||
if(player.mob && player.mob.mind)
|
||||
player.mob.mind.transfer_to(src)
|
||||
|
||||
@@ -47,4 +47,55 @@
|
||||
if(M.a_intent == I_HELP)
|
||||
get_scooped(M)
|
||||
|
||||
..()
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/drone/verb/customize()
|
||||
set name = "Customize Chassis"
|
||||
set desc = "Reconfigure your chassis into a customized version."
|
||||
set category = "Drone"
|
||||
|
||||
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 = splittext(file, "\n")
|
||||
|
||||
for(var/line in lines)
|
||||
// split & clean up
|
||||
var/list/Entry = splittext(line, ":")
|
||||
for(var/i = 1 to Entry.len)
|
||||
Entry[i] = trim(Entry[i])
|
||||
|
||||
if(Entry.len < 2 || Entry[1] != "drone")
|
||||
continue
|
||||
|
||||
if (Entry[2] == ckey) //Custom holograms
|
||||
custom_sprite = 1 // option is given in hologram menu
|
||||
|
||||
if(!custom_sprite)
|
||||
to_chat(src, "<span class='warning'>Error 404: Custom chassis not found. Revoking customization option.</span>")
|
||||
else
|
||||
icon = 'icons/mob/custom_synthetic/custom-synthetic.dmi'
|
||||
icon_state = "[ckey]-drone"
|
||||
to_chat(src, "<span class='notice'>You reconfigure your chassis and improve the station through your new aesthetics.</span>")
|
||||
verbs -= /mob/living/silicon/robot/drone/verb/customize
|
||||
|
||||
/mob/living/silicon/robot/drone/get_scooped(mob/living/carbon/grabber)
|
||||
var/obj/item/weapon/holder/H = ..()
|
||||
if(!istype(H))
|
||||
return
|
||||
if(resting)
|
||||
resting = 0
|
||||
if(custom_sprite)
|
||||
H.icon = 'icons/mob/custom_synthetic/custom-synthetic.dmi'
|
||||
H.icon_override = 'icons/mob/custom_synthetic/custom_head.dmi'
|
||||
H.lefthand_file = 'icons/mob/custom_synthetic/custom_lefthand.dmi'
|
||||
H.righthand_file = 'icons/mob/custom_synthetic/custom_righthand.dmi'
|
||||
H.icon_state = "[icon_state]"
|
||||
H.item_state = "[icon_state]_hand"
|
||||
else
|
||||
H.icon_state = "drone"
|
||||
H.item_state = "drone"
|
||||
grabber.put_in_active_hand(H)//for some reason unless i call this it dosen't work
|
||||
grabber.update_inv_l_hand()
|
||||
grabber.update_inv_r_hand()
|
||||
|
||||
return H
|
||||
@@ -184,12 +184,11 @@ var/list/robot_verbs_default = list(
|
||||
for(var/i = 1 to Entry.len)
|
||||
Entry[i] = trim(Entry[i])
|
||||
|
||||
if(Entry.len < 3 || Entry[1] != "cyborg") //ignore incorrectly formatted entries or entries that aren't marked for cyborg
|
||||
if(Entry.len < 2 || Entry[1] != "cyborg") //ignore incorrectly formatted entries or entries that aren't marked for cyborg
|
||||
continue;
|
||||
|
||||
if(Entry[2] == ckey && Entry[3] == real_name) //They're in the list? Custom sprite time, var and icon change required
|
||||
if(Entry[2] == ckey) //They're in the list? Custom sprite time, var and icon change required
|
||||
custom_sprite = 1
|
||||
icon = 'icons/mob/custom_synthetic/custom-synthetic.dmi'
|
||||
|
||||
return 1
|
||||
|
||||
@@ -1252,15 +1251,14 @@ var/list/robot_verbs_default = list(
|
||||
triesleft--
|
||||
|
||||
var/icontype
|
||||
|
||||
if(custom_sprite == 1)
|
||||
icontype = "Custom"
|
||||
triesleft = 0
|
||||
else
|
||||
lockcharge = 1 //Locks borg until it select an icon to avoid secborgs running around with a standard sprite
|
||||
icontype = input("Select an icon! [triesleft ? "You have [triesleft] more chances." : "This is your last try."]", "Robot", null, null) in module_sprites
|
||||
lockcharge = 1 //Locks borg until it select an icon to avoid secborgs running around with a standard sprite
|
||||
icontype = input("Select an icon! [triesleft ? "You have [triesleft] more chances." : "This is your last try."]", "Robot", null, null) in module_sprites
|
||||
|
||||
if(icontype)
|
||||
if(icontype == "Custom")
|
||||
icon = 'icons/mob/custom_synthetic/custom-synthetic.dmi'
|
||||
else
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = module_sprites[icontype]
|
||||
if(icontype == "Bro")
|
||||
module.module_type = "Brobot"
|
||||
|
||||
Reference in New Issue
Block a user