Porting some radial menu updates, and that one clown mask.
This commit is contained in:
@@ -255,6 +255,7 @@ GLOBAL_LIST_EMPTY(radial_menus)
|
||||
current_user = M.client
|
||||
//Blank
|
||||
menu_holder = image(icon='icons/effects/effects.dmi',loc=anchor,icon_state="nothing",layer = ABOVE_HUD_LAYER)
|
||||
menu_holder.plane = ABOVE_HUD_PLANE
|
||||
menu_holder.appearance_flags |= KEEP_APART
|
||||
menu_holder.vis_contents += elements + close_button
|
||||
current_user.images += menu_holder
|
||||
@@ -285,13 +286,16 @@ GLOBAL_LIST_EMPTY(radial_menus)
|
||||
Choices should be a list where list keys are movables or text used for element names and return value
|
||||
and list values are movables/icons/images used for element icons
|
||||
*/
|
||||
/proc/show_radial_menu(mob/user, atom/anchor, list/choices, uniqueid, radius, datum/callback/custom_check, require_near = FALSE, tooltips = FALSE)
|
||||
/proc/show_radial_menu(mob/user, atom/anchor, list/choices, uniqueid, radius, datum/callback/custom_check, require_near = FALSE, tooltips = FALSE, no_repeat_close = FALSE)
|
||||
if(!user || !anchor || !length(choices))
|
||||
return
|
||||
if(!uniqueid)
|
||||
uniqueid = "defmenu_[REF(user)]_[REF(anchor)]"
|
||||
|
||||
if(GLOB.radial_menus[uniqueid])
|
||||
if(!no_repeat_close)
|
||||
var/datum/radial_menu/menu = GLOB.radial_menus[uniqueid]
|
||||
menu.finished = TRUE
|
||||
return
|
||||
|
||||
var/datum/radial_menu/menu = new
|
||||
@@ -308,4 +312,9 @@ GLOBAL_LIST_EMPTY(radial_menus)
|
||||
var/answer = menu.selected_choice
|
||||
qdel(menu)
|
||||
GLOB.radial_menus -= uniqueid
|
||||
if(require_near && !in_range(anchor, user))
|
||||
return
|
||||
if(istype(custom_check))
|
||||
if(!custom_check.Invoke())
|
||||
return
|
||||
return answer
|
||||
@@ -6,17 +6,42 @@
|
||||
icon_state = "cutout_basic"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
resistance_flags = FLAMMABLE
|
||||
// Possible restyles for the cutout;
|
||||
// add an entry in change_appearance() if you add to here
|
||||
var/list/possible_appearances = list("Assistant", "Clown", "Mime",
|
||||
"Traitor", "Nuke Op", "Cultist", "Brass Cultist", "Clockwork Cultist",
|
||||
"Revolutionary", "Wizard", "Shadowling", "Xenomorph", "Xenomorph Maid", "Swarmer",
|
||||
"Ash Walker", "Deathsquad Officer", "Ian", "Slaughter Demon",
|
||||
"Laughter Demon", "Private Security Officer", "Securitron", "Gondola", "Monkey")
|
||||
var/pushed_over = FALSE //If the cutout is pushed over and has to be righted
|
||||
var/deceptive = FALSE //If the cutout actually appears as what it portray and not a discolored version
|
||||
/// Possible restyles for the cutout, add an entry in change_appearance() if you add to here
|
||||
var/static/list/possible_appearances
|
||||
/// If the cutout is pushed over and has to be righted
|
||||
var/pushed_over = FALSE
|
||||
/// If the cutout actually appears as what it portray and not a discolored version
|
||||
var/deceptive = FALSE
|
||||
|
||||
var/lastattacker = null
|
||||
/obj/item/cardboard_cutout/Initialize()
|
||||
. = ..()
|
||||
if(possible_appearances)
|
||||
return
|
||||
possible_appearances = sortList(list(
|
||||
"Assistant" = image(icon = src.icon, icon_state = "cutout_greytide"),
|
||||
"Clown" = image(icon = src.icon, icon_state = "cutout_clown"),
|
||||
"Mime" = image(icon = src.icon, icon_state = "cutout_mime"),
|
||||
"Traitor" = image(icon = src.icon, icon_state = "cutout_traitor"),
|
||||
"Nuke Op" = image(icon = src.icon, icon_state = "cutout_fluke"),
|
||||
"Cultist" = image(icon = src.icon, icon_state = "cutout_cultist"),
|
||||
"Brass Cultist" = image(icon = src.icon, icon_state = "cutout_servant"),
|
||||
"Clockwork Cultist" = image(icon = src.icon, icon_state = "cutout_new_servant"),
|
||||
"Revolutionary" = image(icon = src.icon, icon_state = "cutout_viva"),
|
||||
"Wizard" = image(icon = src.icon, icon_state = "cutout_wizard"),
|
||||
"Shadowling" = image(icon = src.icon, icon_state = "cutout_shadowling"),
|
||||
"Xenomorph" = image(icon = src.icon, icon_state = "cutout_fukken_xeno"),
|
||||
"Xenomorph Maid" = image(icon = src.icon, icon_state = "cutout_lusty"),
|
||||
"Swarmer" = image(icon = src.icon, icon_state = "cutout_swarmer"),
|
||||
"Ash Walker" = image(icon = src.icon, icon_state = "cutout_free_antag"),
|
||||
"Deathsquad Officer" = image(icon = src.icon, icon_state = "cutout_deathsquad"),
|
||||
"Ian" = image(icon = src.icon, icon_state = "cutout_ian"),
|
||||
"Slaughter Demon" = image(icon = 'icons/mob/mob.dmi', icon_state = "daemon"),
|
||||
"Laughter Demon" = image(icon = 'icons/mob/mob.dmi', icon_state = "bowmon"),
|
||||
"Private Security Officer" = image(icon = src.icon, icon_state = "cutout_ntsec"),
|
||||
"Securitron" = image(icon = src.icon, icon_state = "cutout_law"),
|
||||
"Gondola" = image(icon = src.icon, icon_state = "cutout_gondola"),
|
||||
"Monkey" = image(icon = src.icon, icon_state = "cutout_monky"),
|
||||
))
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/cardboard_cutout/attack_hand(mob/living/user)
|
||||
@@ -76,22 +101,21 @@
|
||||
push_over()
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
/**
|
||||
* change_appearance: Changes a skin of the cardboard cutout based on a user's choice
|
||||
*
|
||||
* Arguments:
|
||||
* * crayon The crayon used to change and recolor the cardboard cutout
|
||||
* * user The mob choosing a skin of the cardboard cutout
|
||||
*/
|
||||
/obj/item/cardboard_cutout/proc/change_appearance(obj/item/toy/crayon/crayon, mob/living/user)
|
||||
if(!crayon || !user)
|
||||
return
|
||||
if(pushed_over)
|
||||
to_chat(user, "<span class='warning'>Right [src] first!</span>")
|
||||
return
|
||||
if(crayon.check_empty(user))
|
||||
return
|
||||
if(crayon.is_capped)
|
||||
to_chat(user, "<span class='warning'>Take the cap off first!</span>")
|
||||
return
|
||||
var/new_appearance = input(user, "Choose a new appearance for [src].", "26th Century Deception") as null|anything in possible_appearances
|
||||
if(!new_appearance || !crayon || !user.canUseTopic(src))
|
||||
var/new_appearance = show_radial_menu(user, src, possible_appearances, custom_check = CALLBACK(src, .proc/check_menu, user, crayon), radius = 36, require_near = TRUE)
|
||||
if(!new_appearance)
|
||||
return
|
||||
if(!do_after(user, 10, FALSE, src, TRUE))
|
||||
return
|
||||
return FALSE
|
||||
if(!check_menu(user, crayon))
|
||||
return FALSE
|
||||
user.visible_message("<span class='notice'>[user] gives [src] a new look.</span>", "<span class='notice'>Voila! You give [src] a new look.</span>")
|
||||
crayon.use_charges(1)
|
||||
crayon.check_empty(user)
|
||||
@@ -196,7 +220,33 @@
|
||||
name = "monkey ([rand(1, 999)])"
|
||||
desc = "A cardboard cutout of a monkey."
|
||||
icon_state = "cutout_monky"
|
||||
return 1
|
||||
else
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* check_menu: Checks if we are allowed to interact with a radial menu
|
||||
*
|
||||
* Arguments:
|
||||
* * user The mob interacting with a menu
|
||||
* * crayon The crayon used to interact with a menu
|
||||
*/
|
||||
/obj/item/cardboard_cutout/proc/check_menu(mob/living/user, obj/item/toy/crayon/crayon)
|
||||
if(!istype(user))
|
||||
return FALSE
|
||||
if(user.incapacitated())
|
||||
return FALSE
|
||||
if(pushed_over)
|
||||
to_chat(user, "<span class='warning'>Right [src] first!</span>")
|
||||
return FALSE
|
||||
if(!crayon || !user.is_holding(crayon))
|
||||
return FALSE
|
||||
if(crayon.check_empty(user))
|
||||
return FALSE
|
||||
if(crayon.is_capped)
|
||||
to_chat(user, "<span class='warning'>Take the cap off first!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/cardboard_cutout/setDir(newdir)
|
||||
dir = SOUTH
|
||||
|
||||
@@ -850,12 +850,6 @@
|
||||
|
||||
|
||||
|
||||
#define NODESIGN "None"
|
||||
#define NANOTRASEN "NanotrasenStandard"
|
||||
#define SYNDI "SyndiSnacks"
|
||||
#define HEART "Heart"
|
||||
#define SMILEY "SmileyFace"
|
||||
|
||||
/obj/item/storage/box/papersack
|
||||
name = "paper sack"
|
||||
desc = "A sack neatly crafted out of paper."
|
||||
@@ -863,7 +857,18 @@
|
||||
item_state = "paperbag_None"
|
||||
resistance_flags = FLAMMABLE
|
||||
foldable = null
|
||||
var/design = NODESIGN
|
||||
/// A list of all available papersack reskins
|
||||
var/list/papersack_designs = list()
|
||||
|
||||
/obj/item/storage/box/papersack/Initialize(mapload)
|
||||
. = ..()
|
||||
papersack_designs = sortList(list(
|
||||
"None" = image(icon = src.icon, icon_state = "paperbag_None"),
|
||||
"NanotrasenStandard" = image(icon = src.icon, icon_state = "paperbag_NanotrasenStandard"),
|
||||
"SyndiSnacks" = image(icon = src.icon, icon_state = "paperbag_SyndiSnacks"),
|
||||
"Heart" = image(icon = src.icon, icon_state = "paperbag_Heart"),
|
||||
"SmileyFace" = image(icon = src.icon, icon_state = "paperbag_SmileyFace")
|
||||
))
|
||||
|
||||
/obj/item/storage/box/papersack/update_icon_state()
|
||||
if(contents.len == 0)
|
||||
@@ -871,55 +876,64 @@
|
||||
else
|
||||
icon_state = "[item_state]_closed"
|
||||
|
||||
|
||||
/obj/item/storage/box/papersack/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pen))
|
||||
//if a pen is used on the sack, dialogue to change its design appears
|
||||
if(contents.len)
|
||||
to_chat(user, "<span class='warning'>You can't modify [src] with items still inside!</span>")
|
||||
return
|
||||
var/list/designs = list(NODESIGN, NANOTRASEN, SYNDI, HEART, SMILEY, "Cancel")
|
||||
var/switchDesign = input("Select a Design:", "Paper Sack Design", designs[1]) in designs
|
||||
if(get_dist(usr, src) > 1)
|
||||
to_chat(usr, "<span class='warning'>You have moved too far away!</span>")
|
||||
return
|
||||
var/choice = designs.Find(switchDesign)
|
||||
if(design == designs[choice] || designs[choice] == "Cancel")
|
||||
return 0
|
||||
to_chat(usr, "<span class='notice'>You make some modifications to [src] using your pen.</span>")
|
||||
design = designs[choice]
|
||||
icon_state = "paperbag_[design]"
|
||||
item_state = "paperbag_[design]"
|
||||
switch(designs[choice])
|
||||
if(NODESIGN)
|
||||
var/choice = show_radial_menu(user, src , papersack_designs, custom_check = CALLBACK(src, .proc/check_menu, user, W), radius = 36, require_near = TRUE)
|
||||
if(!choice)
|
||||
return FALSE
|
||||
if(icon_state == "paperbag_[choice]")
|
||||
return FALSE
|
||||
switch(choice)
|
||||
if("None")
|
||||
desc = "A sack neatly crafted out of paper."
|
||||
if(NANOTRASEN)
|
||||
if("NanotrasenStandard")
|
||||
desc = "A standard Nanotrasen paper lunch sack for loyal employees on the go."
|
||||
if(SYNDI)
|
||||
if("SyndiSnacks")
|
||||
desc = "The design on this paper sack is a remnant of the notorious 'SyndieSnacks' program."
|
||||
if(HEART)
|
||||
if("Heart")
|
||||
desc = "A paper sack with a heart etched onto the side."
|
||||
if(SMILEY)
|
||||
if("SmileyFace")
|
||||
desc = "A paper sack with a crude smile etched onto the side."
|
||||
return 0
|
||||
else
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You make some modifications to [src] using your pen.</span>")
|
||||
icon_state = "paperbag_[choice]"
|
||||
item_state = "paperbag_[choice]"
|
||||
return FALSE
|
||||
else if(W.get_sharpness())
|
||||
if(!contents.len)
|
||||
if(item_state == "paperbag_None")
|
||||
user.show_message("<span class='notice'>You cut eyeholes into [src].</span>", MSG_VISUAL)
|
||||
new /obj/item/clothing/head/papersack(user.loc)
|
||||
qdel(src)
|
||||
return 0
|
||||
return FALSE
|
||||
else if(item_state == "paperbag_SmileyFace")
|
||||
user.show_message("<span class='notice'>You cut eyeholes into [src] and modify the design.</span>", MSG_VISUAL)
|
||||
new /obj/item/clothing/head/papersack/smiley(user.loc)
|
||||
qdel(src)
|
||||
return 0
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
#undef NODESIGN
|
||||
#undef NANOTRASEN
|
||||
#undef SYNDI
|
||||
#undef HEART
|
||||
#undef SMILEY
|
||||
/**
|
||||
* check_menu: Checks if we are allowed to interact with a radial menu
|
||||
*
|
||||
* Arguments:
|
||||
* * user The mob interacting with a menu
|
||||
* * P The pen used to interact with a menu
|
||||
*/
|
||||
/obj/item/storage/box/papersack/proc/check_menu(mob/user, obj/item/pen/P)
|
||||
if(!istype(user))
|
||||
return FALSE
|
||||
if(user.incapacitated())
|
||||
return FALSE
|
||||
if(contents.len)
|
||||
to_chat(user, "<span class='warning'>You can't modify [src] with items still inside!</span>")
|
||||
return FALSE
|
||||
if(!P || !user.is_holding(P))
|
||||
to_chat(user, "<span class='warning'>You need a pen to modify [src]!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/storage/box/ingredients //This box is for the randomly chosen version the chef spawns with, it shouldn't actually exist.
|
||||
name = "ingredients box"
|
||||
|
||||
@@ -91,8 +91,13 @@
|
||||
if (!is_ghost && !in_range(src, user))
|
||||
return
|
||||
|
||||
var/list/tool_list = list(
|
||||
"Up" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = NORTH),
|
||||
"Down" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = SOUTH)
|
||||
)
|
||||
|
||||
if (up && down)
|
||||
var/result = alert("Go up or down [src]?", "Ladder", "Up", "Down", "Cancel")
|
||||
var/result = show_radial_menu(user, src, tool_list, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = TRUE)
|
||||
if (!is_ghost && !in_range(src, user))
|
||||
return // nice try
|
||||
switch(result)
|
||||
@@ -112,6 +117,11 @@
|
||||
if(!is_ghost)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/ladder/proc/check_menu(mob/user)
|
||||
if(user.incapacitated() || !user.Adjacent(src))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/ladder/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
|
||||
@@ -73,18 +73,26 @@
|
||||
resistance_flags = FLAMMABLE
|
||||
actions_types = list(/datum/action/item_action/adjust)
|
||||
dog_fashion = /datum/dog_fashion/head/clown
|
||||
var/list/clownmask_designs = list()
|
||||
|
||||
/obj/item/clothing/mask/gas/clown_hat/Initialize(mapload)
|
||||
.=..()
|
||||
clownmask_designs = list(
|
||||
"True Form" = image(icon = src.icon, icon_state = "clown"),
|
||||
"The Feminist" = image(icon = src.icon, icon_state = "sexyclown"),
|
||||
"The Jester" = image(icon = src.icon, icon_state = "chaos"),
|
||||
"The Madman" = image(icon = src.icon, icon_state = "joker"),
|
||||
"The Rainbow Color" = image(icon = src.icon, icon_state = "rainbow")
|
||||
)
|
||||
|
||||
/obj/item/clothing/mask/gas/clown_hat/ui_action_click(mob/user)
|
||||
if(!istype(user) || user.incapacitated())
|
||||
return
|
||||
|
||||
var/list/options = list()
|
||||
options["True Form"] = "clown"
|
||||
options["The Feminist"] = "sexyclown"
|
||||
options["The Madman"] = "joker"
|
||||
options["The Rainbow Color"] ="rainbow"
|
||||
var/static/list/options = list("True Form" = "clown", "The Feminist" = "sexyclown", "The Madman" = "joker",
|
||||
"The Rainbow Color" ="rainbow", "The Jester" = "chaos")
|
||||
|
||||
var/choice = input(user,"To what form do you wish to Morph this mask?","Morph Mask") in options
|
||||
var/choice = show_radial_menu(user,src, clownmask_designs, custom_check = FALSE, radius = 36, require_near = TRUE)
|
||||
|
||||
if(src && choice && !user.incapacitated() && in_range(user,src))
|
||||
icon_state = options[choice]
|
||||
@@ -93,7 +101,7 @@
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
to_chat(user, "<span class='notice'>Your Clown Mask has now morphed into [choice], all praise the Honkmother!</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/mask/gas/sexyclown
|
||||
name = "sexy-clown wig and mask"
|
||||
@@ -113,19 +121,26 @@
|
||||
flags_cover = MASKCOVERSEYES
|
||||
resistance_flags = FLAMMABLE
|
||||
actions_types = list(/datum/action/item_action/adjust)
|
||||
var/list/mimemask_designs = list()
|
||||
|
||||
|
||||
/obj/item/clothing/mask/gas/mime/Initialize(mapload)
|
||||
.=..()
|
||||
mimemask_designs = list(
|
||||
"Blanc" = image(icon = src.icon, icon_state = "mime"),
|
||||
"Excité" = image(icon = src.icon, icon_state = "sexymime"),
|
||||
"Triste" = image(icon = src.icon, icon_state = "sadmime"),
|
||||
"Effrayé" = image(icon = src.icon, icon_state = "scaredmime")
|
||||
)
|
||||
|
||||
|
||||
/obj/item/clothing/mask/gas/mime/ui_action_click(mob/user)
|
||||
if(!istype(user) || user.incapacitated())
|
||||
return
|
||||
|
||||
var/list/options = list()
|
||||
options["Blanc"] = "mime"
|
||||
options["Triste"] = "sadmime"
|
||||
options["Effrayé"] = "scaredmime"
|
||||
options["Excité"] ="sexymime"
|
||||
var/static/list/options = list("Blanc" = "mime", "Triste" = "sadmime", "Effrayé" = "scaredmime", "Excité" ="sexymime")
|
||||
|
||||
var/choice = input(user,"To what form do you wish to Morph this mask?","Morph Mask") in options
|
||||
var/choice = show_radial_menu(user,src, mimemask_designs, custom_check = FALSE, radius = 36, require_near = TRUE)
|
||||
|
||||
if(src && choice && !user.incapacitated() && in_range(user,src))
|
||||
icon_state = options[choice]
|
||||
@@ -134,7 +149,7 @@
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
to_chat(user, "<span class='notice'>Your Mime Mask has now morphed into [choice]!</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/mask/gas/monkeymask
|
||||
name = "monkey mask"
|
||||
@@ -187,18 +202,25 @@
|
||||
max_integrity = 100
|
||||
actions_types = list(/datum/action/item_action/adjust)
|
||||
dog_fashion = null
|
||||
var/list/tikimask_designs = list()
|
||||
|
||||
|
||||
/obj/item/clothing/mask/gas/tiki_mask/Initialize(mapload)
|
||||
.=..()
|
||||
tikimask_designs = list(
|
||||
"Original Tiki" = image(icon = src.icon, icon_state = "tiki_eyebrow"),
|
||||
"Happy Tiki" = image(icon = src.icon, icon_state = "tiki_happy"),
|
||||
"Confused Tiki" = image(icon = src.icon, icon_state = "tiki_confused"),
|
||||
"Angry Tiki" = image(icon = src.icon, icon_state = "tiki_angry")
|
||||
)
|
||||
|
||||
/obj/item/clothing/mask/gas/tiki_mask/ui_action_click(mob/user)
|
||||
|
||||
var/mob/M = usr
|
||||
var/list/options = list()
|
||||
options["Original Tiki"] = "tiki_eyebrow"
|
||||
options["Happy Tiki"] = "tiki_happy"
|
||||
options["Confused Tiki"] = "tiki_confused"
|
||||
options["Angry Tiki"] ="tiki_angry"
|
||||
var/static/list/options = list("Original Tiki" = "tiki_eyebrow", "Happy Tiki" = "tiki_happy", "Confused Tiki" = "tiki_confused",
|
||||
"Angry Tiki" = "tiki_angry")
|
||||
|
||||
var/choice = input(M,"To what form do you wish to change this mask?","Morph Mask") in options
|
||||
var/choice = show_radial_menu(user,src, tikimask_designs, custom_check = FALSE, radius = 36, require_near = TRUE)
|
||||
|
||||
if(src && choice && !M.stat && in_range(M,src))
|
||||
icon_state = options[choice]
|
||||
@@ -207,4 +229,4 @@
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
to_chat(M, "The Tiki Mask has now changed into the [choice] Mask!")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
@@ -351,30 +351,40 @@
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 100
|
||||
actions_types = list(/datum/action/item_action/adjust)
|
||||
var/list/papermask_designs = list()
|
||||
|
||||
|
||||
/obj/item/clothing/mask/paper/Initialize(mapload)
|
||||
.=..()
|
||||
papermask_designs = list(
|
||||
"Blank" = image(icon = src.icon, icon_state = "plainmask"),
|
||||
"Neutral" = image(icon = src.icon, icon_state = "neutralmask"),
|
||||
"Eyes" = image(icon = src.icon, icon_state = "eyemask"),
|
||||
"Sleeping" = image(icon = src.icon, icon_state = "sleepingmask"),
|
||||
"Heart" = image(icon = src.icon, icon_state = "heartmask"),
|
||||
"Core" = image(icon = src.icon, icon_state = "coremask"),
|
||||
"Plus" = image(icon = src.icon, icon_state = "plusmask"),
|
||||
"Square" = image(icon = src.icon, icon_state = "squaremask"),
|
||||
"Bullseye" = image(icon = src.icon, icon_state = "bullseyemask"),
|
||||
"Vertical" = image(icon = src.icon, icon_state = "verticalmask"),
|
||||
"Horizontal" = image(icon = src.icon, icon_state = "horizontalmask"),
|
||||
"X" = image(icon = src.icon, icon_state = "xmask"),
|
||||
"Bugeyes" = image(icon = src.icon, icon_state = "bugmask"),
|
||||
"Double" = image(icon = src.icon, icon_state = "doublemask"),
|
||||
"Mark" = image(icon = src.icon, icon_state = "markmask")
|
||||
)
|
||||
|
||||
/obj/item/clothing/mask/paper/ui_action_click(mob/user)
|
||||
if(!istype(user) || user.incapacitated())
|
||||
return
|
||||
|
||||
var/list/options = list()
|
||||
options["Blank"] = "plainmask"
|
||||
options["Neutral"] = "neutralmask"
|
||||
options["Eyes"] = "eyemask"
|
||||
options["Sleeping"] ="sleepingmask"
|
||||
options["Heart"] = "heartmask"
|
||||
options["Core"] = "coremask"
|
||||
options["Plus"] = "plusmask"
|
||||
options["Square"] ="squaremask"
|
||||
options["Bullseye"] = "bullseyemask"
|
||||
options["Vertical"] = "verticalmask"
|
||||
options["Horizontal"] = "horizontalmask"
|
||||
options["X"] ="xmask"
|
||||
options["Bugeyes"] = "bugmask"
|
||||
options["Double"] = "doublemask"
|
||||
options["Mark"] = "markmask"
|
||||
var/static/list/options = list("Blank" = "plainmask", "Neutral" = "neutralmask", "Eyes" = "eyemask",
|
||||
"Sleeping" ="sleepingmask", "Heart" = "heartmask", "Core" = "coremask",
|
||||
"Plus" = "plusmask", "Square" ="squaremask", "Bullseye" = "bullseyemask",
|
||||
"Vertical" = "verticalmask", "Horizontal" = "horizontalmask", "X" ="xmask",
|
||||
"Bugeyes" = "bugmask", "Double" = "doublemask", "Mark" = "markmask")
|
||||
|
||||
var/choice = input(user,"What symbol would you want on this mask?","Morph Mask") in options
|
||||
var/choice = show_radial_menu(user,src, papermask_designs, custom_check = FALSE, radius = 36, require_near = TRUE)
|
||||
|
||||
if(src && choice && !user.incapacitated() && in_range(user,src))
|
||||
icon_state = options[choice]
|
||||
|
||||
@@ -276,6 +276,19 @@
|
||||
R.hud_used.update_robot_modules_display()
|
||||
SSblackbox.record_feedback("tally", "cyborg_modules", 1, R.module)
|
||||
|
||||
/**
|
||||
* check_menu: Checks if we are allowed to interact with a radial menu
|
||||
*
|
||||
* Arguments:
|
||||
* * user The mob interacting with a menu
|
||||
*/
|
||||
/obj/item/robot_module/proc/check_menu(mob/user)
|
||||
if(!istype(user))
|
||||
return FALSE
|
||||
if(user.incapacitated() || !user.Adjacent(src))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/robot_module/standard
|
||||
name = "Standard"
|
||||
basic_modules = list(
|
||||
@@ -337,13 +350,28 @@
|
||||
|
||||
/obj/item/robot_module/medical/be_transformed_to(obj/item/robot_module/old_module)
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
var/medmodels = list("Default", "Heavy", "Sleek", "Marina", "Droid", "Eyebot", "Medihound", "Medihound Dark", "Vale")
|
||||
if(R.client && (R.client.ckey in list("nezuli")))
|
||||
medmodels += "Alina"
|
||||
var/borg_icon = input(R, "Select an icon!", "Robot Icon", null) as null|anything in medmodels
|
||||
if(!borg_icon)
|
||||
return FALSE
|
||||
switch(borg_icon)
|
||||
var/static/list/med_icons
|
||||
if(!med_icons)
|
||||
med_icons = list(
|
||||
"Default" = image(icon = 'icons/mob/robots.dmi', icon_state = "medical"),
|
||||
"Droid" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "medical"),
|
||||
"Sleek" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "sleekmed"),
|
||||
"Marina" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "marinamed"),
|
||||
"Eyebot" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "eyebotmed"),
|
||||
"Heavy" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "heavymed")
|
||||
)
|
||||
var/list/L = list("Medihound" = "medihound", "Medihound Dark" = "medihounddark", "Vale" = "valemed")
|
||||
for(var/a in L)
|
||||
var/image/wide = image(icon = 'modular_citadel/icons/mob/widerobot.dmi', icon_state = L[a])
|
||||
wide.pixel_x = -16
|
||||
med_icons[a] = wide
|
||||
if(R.client && R.client.ckey == "nezuli")
|
||||
var/image/bad_snowflake = image(icon = 'modular_citadel/icons/mob/widerobot.dmi', icon_state = "alina-med")
|
||||
bad_snowflake.pixel_x = -16
|
||||
med_icons["Alina"] = bad_snowflake
|
||||
med_icons = sortList(med_icons)
|
||||
var/med_borg_icon = show_radial_menu(R, R , med_icons, custom_check = CALLBACK(src, .proc/check_menu, R), radius = 42, require_near = TRUE)
|
||||
switch(med_borg_icon)
|
||||
if("Default")
|
||||
cyborg_base_icon = "medical"
|
||||
if("Droid")
|
||||
@@ -391,6 +419,8 @@
|
||||
moduleselect_icon = "medihound"
|
||||
moduleselect_alternate_icon = 'modular_citadel/icons/ui/screen_cyborg.dmi'
|
||||
dogborg = TRUE
|
||||
else
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/robot_module/engineering
|
||||
@@ -434,13 +464,31 @@
|
||||
|
||||
/obj/item/robot_module/engineering/be_transformed_to(obj/item/robot_module/old_module)
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
var/list/engymodels = list("Default", "Default - Treads", "Heavy", "Sleek", "Marina", "Can", "Spider", "Loader","Handy", "Pup Dozer", "Vale")
|
||||
if(R.client && (R.client.ckey in list("nezuli")))
|
||||
engymodels += "Alina"
|
||||
var/borg_icon = input(R, "Select an icon!", "Robot Icon", null) as null|anything in engymodels
|
||||
if(!borg_icon)
|
||||
return FALSE
|
||||
switch(borg_icon)
|
||||
var/static/list/engi_icons
|
||||
if(!engi_icons)
|
||||
engi_icons = list(
|
||||
"Default" = image(icon = 'icons/mob/robots.dmi', icon_state = "engineer"),
|
||||
"Default - Treads" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "engi-tread"),
|
||||
"Loader" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "loaderborg"),
|
||||
"Handy" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "handyeng"),
|
||||
"Sleek" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "sleekeng"),
|
||||
"Can" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "caneng"),
|
||||
"Marina" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "marinaeng"),
|
||||
"Spider" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "spidereng"),
|
||||
"Heavy" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "heavyeng")
|
||||
)
|
||||
var/list/L = list("Pup Dozer" = "pupdozer", "Vale" = "valeeng")
|
||||
for(var/a in L)
|
||||
var/image/wide = image(icon = 'modular_citadel/icons/mob/widerobot.dmi', icon_state = L[a])
|
||||
wide.pixel_x = -16
|
||||
engi_icons[a] = wide
|
||||
if(R.client && R.client.ckey == "nezuli")
|
||||
var/image/bad_snowflake = image(icon = 'modular_citadel/icons/mob/widerobot.dmi', icon_state = "alina-eng")
|
||||
bad_snowflake.pixel_x = -16
|
||||
engi_icons["Alina"] = bad_snowflake
|
||||
engi_icons = sortList(engi_icons)
|
||||
var/engi_borg_icon = show_radial_menu(R, R , engi_icons, custom_check = CALLBACK(src, .proc/check_menu, R), radius = 42, require_near = TRUE)
|
||||
switch(engi_borg_icon)
|
||||
if("Default")
|
||||
cyborg_base_icon = "engineer"
|
||||
if("Default - Treads")
|
||||
@@ -485,6 +533,8 @@
|
||||
cyborg_icon_override = 'modular_citadel/icons/mob/widerobot.dmi'
|
||||
sleeper_overlay = "alinasleeper"
|
||||
dogborg = TRUE
|
||||
else
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/robot_module/security
|
||||
@@ -512,13 +562,29 @@
|
||||
|
||||
/obj/item/robot_module/security/be_transformed_to(obj/item/robot_module/old_module)
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
var/list/secmodels = list("Default", "Default - Treads", "Heavy", "Sleek", "Can", "Marina", "Spider", "K9", "K9 Dark", "Vale")
|
||||
if(R.client && (R.client.ckey in list("nezuli")))
|
||||
secmodels += "Alina"
|
||||
var/borg_icon = input(R, "Select an icon!", "Robot Icon", null) as null|anything in secmodels
|
||||
if(!borg_icon)
|
||||
return FALSE
|
||||
switch(borg_icon)
|
||||
var/static/list/sec_icons
|
||||
if(!sec_icons)
|
||||
sec_icons = list(
|
||||
"Default" = image(icon = 'icons/mob/robots.dmi', icon_state = "sec"),
|
||||
"Default - Treads" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "sec-tread"),
|
||||
"Sleek" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "sleeksec"),
|
||||
"Can" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "cansec"),
|
||||
"Marina" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "marinasec"),
|
||||
"Spider" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "spidersec"),
|
||||
"Heavy" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "heavysec")
|
||||
)
|
||||
var/list/L = list("K9" = "k9", "Vale" = "valesec", "K9 Dark" = "k9dark")
|
||||
for(var/a in L)
|
||||
var/image/wide = image(icon = 'modular_citadel/icons/mob/widerobot.dmi', icon_state = L[a])
|
||||
wide.pixel_x = -16
|
||||
sec_icons[a] = wide
|
||||
if(R.client && R.client.ckey == "nezuli")
|
||||
var/image/bad_snowflake = image(icon = 'modular_citadel/icons/mob/widerobot.dmi', icon_state = "alina-sec")
|
||||
bad_snowflake.pixel_x = -16
|
||||
sec_icons["Alina"] = bad_snowflake
|
||||
sec_icons = sortList(sec_icons)
|
||||
var/sec_borg_icon = show_radial_menu(R, R , sec_icons, custom_check = CALLBACK(src, .proc/check_menu, R), radius = 42, require_near = TRUE)
|
||||
switch(sec_borg_icon)
|
||||
if("Default")
|
||||
cyborg_base_icon = "sec"
|
||||
if("Default - Treads")
|
||||
@@ -561,6 +627,8 @@
|
||||
sleeper_overlay = "valesecsleeper"
|
||||
cyborg_icon_override = 'modular_citadel/icons/mob/widerobot.dmi'
|
||||
dogborg = TRUE
|
||||
else
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/robot_module/security/Initialize()
|
||||
@@ -599,10 +667,13 @@
|
||||
|
||||
/obj/item/robot_module/peacekeeper/be_transformed_to(obj/item/robot_module/old_module)
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
var/borg_icon = input(R, "Select an icon!", "Robot Icon", null) as null|anything in list("Default", "Spider", "Borgi")
|
||||
if(!borg_icon)
|
||||
return FALSE
|
||||
switch(borg_icon)
|
||||
var/static/list/peace_icons = sortList(list(
|
||||
"Default" = image(icon = 'icons/mob/robots.dmi', icon_state = "peace"),
|
||||
"Borgi" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "borgi"),
|
||||
"Spider" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "whitespider")
|
||||
))
|
||||
var/peace_borg_icon = show_radial_menu(R, R , peace_icons, custom_check = CALLBACK(src, .proc/check_menu, R), radius = 42, require_near = TRUE)
|
||||
switch(peace_borg_icon)
|
||||
if("Default")
|
||||
cyborg_base_icon = "peace"
|
||||
if("Spider")
|
||||
@@ -615,6 +686,8 @@
|
||||
hat_offset = INFINITY
|
||||
cyborg_icon_override = 'modular_citadel/icons/mob/robots.dmi'
|
||||
has_snowflake_deadsprite = TRUE
|
||||
else
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
//Janitor module combined with Service module
|
||||
@@ -738,10 +811,35 @@
|
||||
|
||||
/obj/item/robot_module/butler/be_transformed_to(obj/item/robot_module/old_module)
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
var/borg_icon = input(R, "Select an icon!", "Robot Icon", null) as null|anything in list("(Service) Waitress", "(Service) Heavy", "(Service) Sleek", "(Service) Butler", "(Service) Tophat", "(Service) Can", "(Service) Bro", "(Service) DarkK9", "(Service) Vale", "(Service) ValeDark", "(Janitor) Default", "(Janitor) Sleek", "(Janitor) Marina", "(Janitor) Can", "(Janitor) Heavy", "(Janitor) Scrubpuppy")
|
||||
if(!borg_icon)
|
||||
return FALSE
|
||||
switch(borg_icon)
|
||||
var/static/list/service_icons
|
||||
if(!service_icons)
|
||||
service_icons = list(
|
||||
"(Service) Waitress" = image(icon = 'icons/mob/robots.dmi', icon_state = "service_f"),
|
||||
"(Service) Butler" = image(icon = 'icons/mob/robots.dmi', icon_state = "service_m"),
|
||||
"(Service) Bro" = image(icon = 'icons/mob/robots.dmi', icon_state = "brobot"),
|
||||
"(Service) Can" = image(icon = 'icons/mob/robots.dmi', icon_state = "kent"),
|
||||
"(Service) Tophat" = image(icon = 'icons/mob/robots.dmi', icon_state = "tophat"),
|
||||
"(Service) Sleek" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "sleekserv"),
|
||||
"(Service) Heavy" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "heavyserv"),
|
||||
"(Janitor) Default" = image(icon = 'icons/mob/robots.dmi', icon_state = "janitor"),
|
||||
"(Janitor) Marina" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "marinajan"),
|
||||
"(Janitor) Sleek" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "sleekjan"),
|
||||
"(Janitor) Can" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "canjan"),
|
||||
"(Janitor) Heavy" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "heavyjan"),
|
||||
)
|
||||
var/list/L = list("(Service) DarkK9" = "k50", "(Service) Vale" = "valeserv", "(Service) ValeDark" = "valeservdark",
|
||||
"(Janitor) Scrubpuppy" = "scrubpup")
|
||||
for(var/a in L)
|
||||
var/image/wide = image(icon = 'modular_citadel/icons/mob/widerobot.dmi', icon_state = L[a])
|
||||
wide.pixel_x = -16
|
||||
service_icons[a] = wide
|
||||
if(R.client && R.client.ckey == "nezuli")
|
||||
var/image/bad_snowflake = image(icon = 'modular_citadel/icons/mob/widerobot.dmi', icon_state = "alina-sec")
|
||||
bad_snowflake.pixel_x = -16
|
||||
service_icons["Alina"] = bad_snowflake
|
||||
service_icons = sortList(service_icons)
|
||||
var/service_robot_icon = show_radial_menu(R, R , service_icons, custom_check = CALLBACK(src, .proc/check_menu, R), radius = 42, require_near = TRUE)
|
||||
switch(service_robot_icon)
|
||||
if("(Service) Waitress")
|
||||
cyborg_base_icon = "service_f"
|
||||
special_light_key = "service"
|
||||
@@ -799,6 +897,8 @@
|
||||
cyborg_icon_override = 'modular_citadel/icons/mob/widerobot.dmi'
|
||||
sleeper_overlay = "jsleeper"
|
||||
dogborg = TRUE
|
||||
else
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/robot_module/miner
|
||||
@@ -833,10 +933,25 @@
|
||||
|
||||
/obj/item/robot_module/miner/be_transformed_to(obj/item/robot_module/old_module)
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
var/borg_icon = input(R, "Select an icon!", "Robot Icon", null) as null|anything in list("Lavaland", "Heavy", "Sleek", "Marina", "Can", "Spider", "Asteroid", "Droid", "Blade", "Vale")
|
||||
if(!borg_icon)
|
||||
return FALSE
|
||||
switch(borg_icon)
|
||||
var/static/list/mining_icons
|
||||
if(!mining_icons)
|
||||
mining_icons = list(
|
||||
"Lavaland" = image(icon = 'icons/mob/robots.dmi', icon_state = "miner"),
|
||||
"Asteroid" = image(icon = 'icons/mob/robots.dmi', icon_state = "minerOLD"),
|
||||
"Droid" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "miner"),
|
||||
"Sleek" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "sleekmin"),
|
||||
"Marina" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "marinamin"),
|
||||
"Can" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "canmin"),
|
||||
"Heavy" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "heavymin"),
|
||||
)
|
||||
var/list/L = list("Blade" = "blade", "Vale" = "valemine")
|
||||
for(var/a in L)
|
||||
var/image/wide = image(icon = 'modular_citadel/icons/mob/widerobot.dmi', icon_state = L[a])
|
||||
wide.pixel_x = -16
|
||||
mining_icons[a] = wide
|
||||
mining_icons = sortList(mining_icons)
|
||||
var/mining_borg_icon = show_radial_menu(R, R , mining_icons, custom_check = CALLBACK(src, .proc/check_menu, R), radius = 42, require_near = TRUE)
|
||||
switch(mining_borg_icon)
|
||||
if("Lavaland")
|
||||
cyborg_base_icon = "miner"
|
||||
if("Asteroid")
|
||||
@@ -871,6 +986,8 @@
|
||||
cyborg_icon_override = 'modular_citadel/icons/mob/widerobot.dmi'
|
||||
sleeper_overlay = "valeminesleeper"
|
||||
dogborg = TRUE
|
||||
else
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/robot_module/syndicate
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 49 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Reference in New Issue
Block a user