Merge pull request #15930 from SandPoot/reskinning
Update to reskinning
This commit is contained in:
@@ -272,9 +272,13 @@ GLOBAL_LIST_INIT(pda_styles, list(MONO, VT, ORBITRON, SHARE))
|
||||
#define PDA_SKIN_MODERN "Modern"
|
||||
#define PDA_SKIN_MINIMAL "Minimal"
|
||||
|
||||
GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_SKIN_ALT = 'icons/obj/pda_alt.dmi',
|
||||
PDA_SKIN_RUGGED = 'icons/obj/pda_rugged.dmi', PDA_SKIN_MODERN = 'icons/obj/pda_modern.dmi',
|
||||
PDA_SKIN_MINIMAL = 'icons/obj/pda_minimal.dmi'))
|
||||
GLOBAL_LIST_INIT(pda_reskins, list(
|
||||
PDA_SKIN_CLASSIC = list("icon" = 'icons/obj/pda.dmi'),
|
||||
PDA_SKIN_ALT = list("icon" = 'icons/obj/pda_alt.dmi'),
|
||||
PDA_SKIN_RUGGED = list("icon" = 'icons/obj/pda_rugged.dmi'),
|
||||
PDA_SKIN_MODERN = list("icon" = 'icons/obj/pda_modern.dmi'),
|
||||
PDA_SKIN_MINIMAL = list("icon" = 'icons/obj/pda_minimal.dmi')
|
||||
))
|
||||
|
||||
/////////////////////////////////////
|
||||
// atom.appearence_flags shortcuts //
|
||||
|
||||
@@ -405,7 +405,7 @@
|
||||
return
|
||||
|
||||
/atom/proc/CtrlShiftClick(mob/user)
|
||||
SEND_SIGNAL(src, COMSIG_CLICK_CTRL_SHIFT)
|
||||
SEND_SIGNAL(src, COMSIG_CLICK_CTRL_SHIFT, user)
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* # Element: Object Reskinning
|
||||
*
|
||||
* Allows players to modify the appearance of their object (and other attributes if possible)
|
||||
* PLEASE DO NOT HAVE INVALID VALUES IN unique_reskin I DON'T EVEN WANT TO KNOW WHAT HAPPENS.
|
||||
* USAGE:
|
||||
* unique_reskins = list(
|
||||
* "skin 1" = list(
|
||||
* "desc" = "very cool description",
|
||||
* "icon" = 'very_cool_icon.dmi'
|
||||
* ),
|
||||
* "skin 2" = list(
|
||||
* "desc" = "not as cool description",
|
||||
* "icon" = 'the_boring_skin.dmi'
|
||||
* )
|
||||
* )
|
||||
*/
|
||||
/datum/element/object_reskinning
|
||||
element_flags = ELEMENT_DETACH
|
||||
|
||||
/datum/element/object_reskinning/Attach(datum/target)
|
||||
. = ..()
|
||||
var/obj/the_obj = target
|
||||
if(!istype(the_obj))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
if(!islist(the_obj.unique_reskin) || !length(the_obj.unique_reskin))
|
||||
message_admins("[src] was given to an object without any unique reskins, if you really need to, give it a couple skins first.")
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
|
||||
RegisterSignal(the_obj, COMSIG_PARENT_EXAMINE, .proc/on_examine)
|
||||
RegisterSignal(the_obj, the_obj.reskin_binding, .proc/reskin)
|
||||
|
||||
/datum/element/object_reskinning/Detach(datum/source, force)
|
||||
var/obj/being_deleted = source
|
||||
UnregisterSignal(source, list(COMSIG_PARENT_EXAMINE, being_deleted.reskin_binding))
|
||||
return ..()
|
||||
|
||||
/datum/element/object_reskinning/proc/on_examine(obj/obj, mob/user, list/examine_list)
|
||||
examine_list += span_notice("[capitalize(replacetext(obj.reskin_binding, "_", "-"))] to reskin it ([length(obj.unique_reskin)] possible styles).")
|
||||
if(obj.always_reskinnable)
|
||||
examine_list += span_notice("It has no limit to reskinning.")
|
||||
|
||||
/*
|
||||
* Reskins an object according to user's choice.
|
||||
* Will detach itself if there's no skins or if done successfully but not always reskinnable.
|
||||
*
|
||||
* Arguments:
|
||||
* * to_reskin The object we will be reskinning
|
||||
* * user The user who wants to choose a skin for the object
|
||||
*/
|
||||
/datum/element/object_reskinning/proc/reskin(obj/to_reskin, mob/user)
|
||||
// Just stop early
|
||||
if(!LAZYLEN(to_reskin.unique_reskin))
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] attempted to reskin an object that has no skins!")
|
||||
Detach(to_reskin)
|
||||
return FALSE
|
||||
|
||||
// Can't use
|
||||
if(!user.canUseTopic(to_reskin, BE_CLOSE, NO_DEXTERY, NO_TK))
|
||||
return FALSE
|
||||
|
||||
// Get our choices
|
||||
var/list/items = list()
|
||||
for(var/reskin_option in to_reskin.unique_reskin)
|
||||
var/image/item_image = image(
|
||||
icon = to_reskin.unique_reskin[reskin_option]["icon"] ? to_reskin.unique_reskin[reskin_option]["icon"] : to_reskin.icon,
|
||||
icon_state = to_reskin.unique_reskin[reskin_option]["icon_state"] ? to_reskin.unique_reskin[reskin_option]["icon_state"] : to_reskin.icon_state)
|
||||
items += list("[reskin_option]" = item_image)
|
||||
sortList(items)
|
||||
|
||||
// Display to the user
|
||||
var/pick = show_radial_menu(user, to_reskin, items, custom_check = CALLBACK(src, .proc/check_reskin_menu, user, to_reskin), radius = 38, require_near = TRUE)
|
||||
if(!pick)
|
||||
return FALSE
|
||||
|
||||
// Finish the work
|
||||
to_reskin.current_skin = pick
|
||||
for(var/reskin_var in to_reskin.unique_reskin[pick])
|
||||
to_reskin.vars[reskin_var] = to_reskin.unique_reskin[pick][reskin_var]
|
||||
to_chat(user, "[to_reskin] is now skinned as '[pick].'")
|
||||
to_reskin.reskin_obj(user)
|
||||
|
||||
// Only once or always?
|
||||
if(!to_reskin.always_reskinnable)
|
||||
Detach(to_reskin)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Checks if we are allowed to interact with a radial menu for reskins
|
||||
*
|
||||
* Arguments:
|
||||
* * user The mob interacting with the menu
|
||||
* * obj The obj to be checking against
|
||||
*/
|
||||
/datum/element/object_reskinning/proc/check_reskin_menu(mob/user, obj/obj)
|
||||
if(QDELETED(obj))
|
||||
return FALSE
|
||||
if(!obj.always_reskinnable && obj.current_skin)
|
||||
return FALSE
|
||||
if(!istype(user))
|
||||
return FALSE
|
||||
if(user.incapacitated())
|
||||
return FALSE
|
||||
return TRUE
|
||||
@@ -32,6 +32,9 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 100)
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
always_reskinnable = TRUE
|
||||
reskin_binding = COMSIG_CLICK_CTRL_SHIFT
|
||||
|
||||
//Main variables
|
||||
var/owner = null // String name of owner
|
||||
var/default_cartridge = 0 // Access level defined by cartridge
|
||||
@@ -112,10 +115,10 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
. += id ? "<span class='notice'>Alt-click to remove the id.</span>" : ""
|
||||
if(inserted_item && (!isturf(loc)))
|
||||
. += "<span class='notice'>Ctrl-click to remove [inserted_item].</span>"
|
||||
if(LAZYLEN(GLOB.pda_reskins))
|
||||
. += "<span class='notice'>Ctrl-shift-click it to reskin it.</span>"
|
||||
|
||||
/obj/item/pda/Initialize(mapload)
|
||||
if(GLOB.pda_reskins)
|
||||
unique_reskin = GLOB.pda_reskins
|
||||
. = ..()
|
||||
if(fon)
|
||||
set_light(f_lum, f_pow, f_col)
|
||||
@@ -130,28 +133,10 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
new_overlays = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/item/pda/CtrlShiftClick(mob/living/user)
|
||||
. = ..()
|
||||
if(GLOB.pda_reskins && user.canUseTopic(src, BE_CLOSE, NO_DEXTERY))
|
||||
reskin_obj(user)
|
||||
|
||||
/obj/item/pda/reskin_obj(mob/M)
|
||||
if(!LAZYLEN(GLOB.pda_reskins))
|
||||
return
|
||||
var/dat = "<b>Reskin options for [name]:</b>"
|
||||
for(var/V in GLOB.pda_reskins)
|
||||
var/output = icon2html(GLOB.pda_reskins[V], M, icon_state)
|
||||
dat += "\n[V]: <span class='reallybig'>[output]</span>"
|
||||
to_chat(M, dat)
|
||||
|
||||
var/choice = input(M, "Choose the a reskin for [src]","Reskin Object") as null|anything in GLOB.pda_reskins
|
||||
var/new_icon = GLOB.pda_reskins[choice]
|
||||
if(QDELETED(src) || isnull(new_icon) || new_icon == icon || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
icon = new_icon
|
||||
. = ..()
|
||||
new_overlays = TRUE
|
||||
update_icon()
|
||||
to_chat(M, "[src] is now skinned as '[choice]'.")
|
||||
|
||||
/obj/item/pda/proc/set_new_overlays()
|
||||
if(!overlays_offsets || !(icon in overlays_offsets))
|
||||
@@ -191,7 +176,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
else
|
||||
font_index = MODE_MONO
|
||||
font_mode = FONT_MONO
|
||||
var/pref_skin = GLOB.pda_reskins[C.prefs.pda_skin]
|
||||
var/pref_skin = GLOB.pda_reskins[C.prefs.pda_skin]["icon"]
|
||||
if(icon != pref_skin)
|
||||
icon = pref_skin
|
||||
new_overlays = TRUE
|
||||
|
||||
@@ -193,34 +193,29 @@
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/saber
|
||||
possible_colors = list("red" = LIGHT_COLOR_RED, "blue" = LIGHT_COLOR_LIGHT_CYAN, "green" = LIGHT_COLOR_GREEN, "purple" = LIGHT_COLOR_LAVENDER)
|
||||
unique_reskin = list("Sword" = "sword0", "Saber" = "esaber0")
|
||||
unique_reskin = list(
|
||||
"Sword" = list("icon_state" = "sword0"),
|
||||
"Saber" = list("icon_state" = "esaber0")
|
||||
)
|
||||
var/hacked = FALSE
|
||||
var/saber = FALSE
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/saber/transform_weapon(mob/living/user, supress_message_text)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(active)
|
||||
if(sword_color)
|
||||
if(saber)
|
||||
icon_state = "esaber[sword_color]"
|
||||
else
|
||||
icon_state = "sword[sword_color]"
|
||||
else
|
||||
if(saber)
|
||||
icon_state = "esaber0"
|
||||
switch(current_skin)
|
||||
if("Saber")
|
||||
icon_state = "esaber[active ? sword_color : "0"]"
|
||||
// No skin
|
||||
else
|
||||
icon_state = "sword0"
|
||||
icon_state = "sword[active ? sword_color : "0"]"
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/saber/reskin_obj(mob/M)
|
||||
. = ..()
|
||||
if(icon_state == "esaber0")
|
||||
saber = TRUE
|
||||
if(active)
|
||||
if(saber)
|
||||
icon_state = "esaber[sword_color]"
|
||||
else
|
||||
icon_state = "sword[sword_color]"
|
||||
switch(current_skin)
|
||||
if("Sword")
|
||||
icon_state = "sword[active ? sword_color : "0"]"
|
||||
if("Saber")
|
||||
icon_state = "esaber[active ? sword_color : "0"]"
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/saber/set_sword_color(var/color_forced)
|
||||
if(color_forced) // wow i really do not like this at fucking all holy SHIT
|
||||
|
||||
+17
-45
@@ -28,9 +28,17 @@
|
||||
var/resistance_flags = NONE // INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ON_FIRE | UNACIDABLE | ACID_PROOF
|
||||
|
||||
var/persistence_replacement //have something WAY too amazing to live to the next round? Set a new path here. Overuse of this var will make me upset.
|
||||
var/current_skin //the item reskin
|
||||
var/list/unique_reskin //List of options to reskin.
|
||||
|
||||
//Reskin variables
|
||||
/// The item reskin
|
||||
var/current_skin
|
||||
/// List of options to reskin.
|
||||
var/list/unique_reskin
|
||||
/// Can always be modified
|
||||
var/always_reskinnable = FALSE
|
||||
/// How to bring up the reskinning menu
|
||||
var/reskin_binding = COMSIG_CLICK_ALT
|
||||
//
|
||||
|
||||
// Access levels, used in modules\jobs\access.dm
|
||||
var/list/req_access
|
||||
@@ -76,6 +84,10 @@
|
||||
var/turf/T = loc
|
||||
T.add_blueprints_preround(src)
|
||||
|
||||
/obj/ComponentInitialize()
|
||||
. = ..()
|
||||
if(islist(unique_reskin) && length(unique_reskin))
|
||||
AddElement(/datum/element/object_reskinning)
|
||||
|
||||
/obj/Destroy(force=FALSE)
|
||||
if(!ismachinery(src))
|
||||
@@ -340,50 +352,10 @@
|
||||
. = ..()
|
||||
if(obj_flags & UNIQUE_RENAME)
|
||||
. += "<span class='notice'>Use a pen on it to rename it or change its description.</span>"
|
||||
if(unique_reskin && (!current_skin || always_reskinnable))
|
||||
. += "<span class='notice'>Alt-click it to reskin it.</span>"
|
||||
|
||||
/obj/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(unique_reskin && (!current_skin || always_reskinnable) && user.canUseTopic(src, BE_CLOSE, NO_DEXTERY))
|
||||
reskin_obj(user)
|
||||
return TRUE
|
||||
|
||||
/obj/proc/reskin_obj(mob/M)
|
||||
if(!LAZYLEN(unique_reskin))
|
||||
return
|
||||
|
||||
var/list/items = list()
|
||||
for(var/reskin_option in unique_reskin)
|
||||
var/image/item_image = image(icon = src.icon, icon_state = unique_reskin[reskin_option])
|
||||
items += list("[reskin_option]" = item_image)
|
||||
sortList(items)
|
||||
|
||||
var/pick = show_radial_menu(M, src, items, custom_check = CALLBACK(src, .proc/check_reskin_menu, M), radius = 38, require_near = TRUE)
|
||||
if(!pick)
|
||||
return
|
||||
if(!unique_reskin[pick])
|
||||
return
|
||||
current_skin = pick
|
||||
icon_state = unique_reskin[pick]
|
||||
to_chat(M, "[src] is now skinned as '[pick].'")
|
||||
|
||||
/**
|
||||
* Checks if we are allowed to interact with a radial menu for reskins
|
||||
*
|
||||
* Arguments:
|
||||
* * user The mob interacting with the menu
|
||||
*/
|
||||
/obj/proc/check_reskin_menu(mob/user)
|
||||
if(QDELETED(src))
|
||||
return FALSE
|
||||
if(current_skin)
|
||||
return FALSE
|
||||
if(!istype(user))
|
||||
return FALSE
|
||||
if(user.incapacitated())
|
||||
return FALSE
|
||||
return TRUE
|
||||
/// Do you want to make overrides, of course you do! Will be called if an object was reskinned successfully
|
||||
/obj/proc/reskin_obj(mob/user)
|
||||
return
|
||||
|
||||
/obj/update_overlays()
|
||||
. = ..()
|
||||
|
||||
@@ -79,16 +79,18 @@
|
||||
to_chat(user, "<span class='warning'>With [src] off of your arms, you feel less ready to punch things.</span>")
|
||||
|
||||
/obj/item/clothing/gloves/fingerless/pugilist/crafted
|
||||
unique_reskin = list("Short" = "armwraps",
|
||||
"Extended" = "armwraps_extended"
|
||||
)
|
||||
unique_reskin = list(
|
||||
"Short" = list("icon_state" = "armwraps"),
|
||||
"Extended" = list("icon_state" = "armwraps_extended")
|
||||
)
|
||||
|
||||
/obj/item/clothing/gloves/fingerless/pugilist/crafted/reskin_obj(mob/M)
|
||||
. = ..()
|
||||
if(icon_state == "armwraps_extended")
|
||||
item_state = "armwraps_extended"
|
||||
else
|
||||
return
|
||||
switch(current_skin)
|
||||
if("Short")
|
||||
item_state = "armwraps"
|
||||
if("Extended")
|
||||
item_state = "armwraps_extended"
|
||||
|
||||
/obj/item/clothing/gloves/fingerless/pugilist/chaplain
|
||||
name = "armwraps of unyielding resolve"
|
||||
|
||||
@@ -275,8 +275,10 @@
|
||||
pocket_storage_component_path = /datum/component/storage/concrete/pockets/shoes
|
||||
actions_types = list(/datum/action/item_action/bhop)
|
||||
permeability_coefficient = 0.05
|
||||
unique_reskin = list("Explorer" = "miningjet",
|
||||
"Jackboot" = "jetboots")
|
||||
unique_reskin = list(
|
||||
"Explorer" = list("icon_state" = "miningjet"),
|
||||
"Jackboot" = list("icon_state" = "jetboots")
|
||||
)
|
||||
var/jumpdistance = 5 //-1 from to see the actual distance, e.g 4 goes over 3 tiles
|
||||
var/jumpspeed = 3
|
||||
var/recharging_rate = 60 //default 6 seconds between each dash
|
||||
|
||||
@@ -80,9 +80,10 @@
|
||||
item_state = "hostrench"
|
||||
flags_inv = 0
|
||||
strip_delay = 80
|
||||
unique_reskin = list("Coat" = "hostrench",
|
||||
"Cloak" = "trenchcloak"
|
||||
)
|
||||
unique_reskin = list(
|
||||
"Coat" = list("icon_state" = "hostrench"),
|
||||
"Cloak" = list("icon_state" = "trenchcloak")
|
||||
)
|
||||
|
||||
/obj/item/clothing/suit/armor/hos/platecarrier
|
||||
name = "plate carrier"
|
||||
|
||||
@@ -565,10 +565,15 @@
|
||||
icon_state = "pride"
|
||||
above_suit = TRUE
|
||||
obj_flags = UNIQUE_RENAME
|
||||
unique_reskin = list("Rainbow Pride" = "pride",
|
||||
"Bisexual Pride" = "pride_bi",
|
||||
"Pansexual Pride" = "pride_pan",
|
||||
"Asexual Pride" = "pride_ace",
|
||||
"Non-binary Pride" = "pride_enby",
|
||||
"Transgender Pride" = "pride_trans",
|
||||
)
|
||||
unique_reskin = list(
|
||||
"Rainbow Pride" = list("icon_state" = "pride"),
|
||||
"Bisexual Pride" = list("icon_state" = "pride_bi"),
|
||||
"Pansexual Pride" = list("icon_state" = "pride_pan"),
|
||||
"Asexual Pride" = list("icon_state" = "pride_ace"),
|
||||
"Non-binary Pride" = list("icon_state" = "pride_enby"),
|
||||
"Transgender Pride" = list("icon_state" = "pride_trans")
|
||||
)
|
||||
|
||||
/obj/item/clothing/accessory/pride/reskin_obj(mob/M)
|
||||
. = ..()
|
||||
name = "[current_skin] pin"
|
||||
|
||||
@@ -253,8 +253,10 @@
|
||||
sharpness = SHARP_NONE // use your survival dagger or smth
|
||||
icon_state = "crusher-hands"
|
||||
item_state = "crusher0-fist"
|
||||
unique_reskin = list("Gauntlets" = "crusher-hands",
|
||||
"Fingerless" = "crusher-hands-bare")
|
||||
unique_reskin = list(
|
||||
"Gauntlets" = list("icon_state" = "crusher-hands"),
|
||||
"Fingerless" = list("icon_state" = "crusher-hands-bare")
|
||||
)
|
||||
detonation_damage = 45 // 60 on wield, compared to normal crusher's 70
|
||||
backstab_bonus = 70 // 130 on backstab though
|
||||
var/combo_on_anything = FALSE // @admins if you're varediting this you don't get to whine at me
|
||||
|
||||
@@ -105,12 +105,13 @@
|
||||
custom_materials = list(/datum/material/gold = 750)
|
||||
sharpness = SHARP_EDGED
|
||||
resistance_flags = FIRE_PROOF
|
||||
unique_reskin = list("Oak" = "pen-fountain-o",
|
||||
"Gold" = "pen-fountain-g",
|
||||
"Rosewood" = "pen-fountain-r",
|
||||
"Black and Silver" = "pen-fountain-b",
|
||||
"Command Blue" = "pen-fountain-cb"
|
||||
)
|
||||
unique_reskin = list(
|
||||
"Oak" = list("icon_state" = "pen-fountain-o"),
|
||||
"Gold" = list("icon_state" = "pen-fountain-g"),
|
||||
"Rosewood" = list("icon_state" = "pen-fountain-r"),
|
||||
"Black and Silver" = list("icon_state" = "pen-fountain-b"),
|
||||
"Command Blue" = list("icon_state" = "pen-fountain-cb")
|
||||
)
|
||||
embedding = list("embed_chance" = 75)
|
||||
|
||||
/obj/item/pen/fountain/captain/Initialize(mapload)
|
||||
@@ -118,9 +119,8 @@
|
||||
AddComponent(/datum/component/butchering, 200, 115) //the pen is mightier than the sword
|
||||
|
||||
/obj/item/pen/fountain/captain/reskin_obj(mob/M)
|
||||
..()
|
||||
if(current_skin)
|
||||
desc = "It's an expensive [current_skin] fountain pen. The nib is quite sharp."
|
||||
. = ..()
|
||||
desc = "It's an expensive [current_skin] fountain pen. The nib is quite sharp."
|
||||
|
||||
/obj/item/pen/attack_self(mob/living/carbon/user)
|
||||
var/deg = input(user, "What angle would you like to rotate the pen head to? (1-360)", "Rotate Pen Head") as null|num
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
/obj/item/gun/ballistic/update_icon_state()
|
||||
if(current_skin)
|
||||
icon_state = "[unique_reskin[current_skin]][suppressed ? "-suppressed" : ""][sawn_off ? "-sawn" : ""]"
|
||||
icon_state = "[unique_reskin[current_skin]["icon_state"]][suppressed ? "-suppressed" : ""][sawn_off ? "-sawn" : ""]"
|
||||
else
|
||||
icon_state = "[initial(icon_state)][suppressed ? "-suppressed" : ""][sawn_off ? "-sawn" : ""]"
|
||||
|
||||
|
||||
@@ -30,27 +30,28 @@
|
||||
can_unsuppress = TRUE
|
||||
automatic_burst_overlay = FALSE
|
||||
obj_flags = UNIQUE_RENAME
|
||||
unique_reskin = list("Default" = "cde",
|
||||
"N-99" = "n99",
|
||||
"Stealth" = "stealthpistol",
|
||||
"HKVP-78" = "vp78",
|
||||
"Luger" = "p08b",
|
||||
"Mk.58" = "secguncomp",
|
||||
"PX4 Storm" = "px4"
|
||||
)
|
||||
unique_reskin = list(
|
||||
"Default" = list("icon_state" = "cde"),
|
||||
"N-99" = list("icon_state" = "n99"),
|
||||
"Stealth" = list("icon_state" = "stealthpistol"),
|
||||
"HKVP-78" = list("icon_state" = "vp78"),
|
||||
"Luger" = list("icon_state" = "p08b"),
|
||||
"Mk.58" = list("icon_state" = "secguncomp"),
|
||||
"PX4 Storm" = list("icon_state" = "px4")
|
||||
)
|
||||
|
||||
/obj/item/gun/ballistic/automatic/pistol/modular/update_icon_state()
|
||||
if(current_skin)
|
||||
icon_state = "[unique_reskin[current_skin]][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
|
||||
icon_state = "[unique_reskin[current_skin]["icon_state"]][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
|
||||
else
|
||||
icon_state = "[initial(icon_state)][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
|
||||
|
||||
/obj/item/gun/ballistic/automatic/pistol/modular/update_overlays()
|
||||
. = ..()
|
||||
if(magazine && suppressed)
|
||||
. += "[unique_reskin[current_skin]]-magazine-sup" //Yes, this means the default iconstate can't have a magazine overlay
|
||||
. += "[unique_reskin[current_skin]["icon_state"]]-magazine-sup" //Yes, this means the default iconstate can't have a magazine overlay
|
||||
else if (magazine)
|
||||
. += "[unique_reskin[current_skin]]-magazine"
|
||||
. += "[unique_reskin[current_skin]["icon_state"]]-magazine"
|
||||
|
||||
/obj/item/gun/ballistic/automatic/pistol/m1911
|
||||
name = "\improper M1911"
|
||||
|
||||
@@ -88,13 +88,15 @@
|
||||
|
||||
/obj/item/gun/ballistic/revolver/syndicate
|
||||
obj_flags = UNIQUE_RENAME
|
||||
unique_reskin = list("Default" = "revolver",
|
||||
"Silver" = "russianrevolver",
|
||||
"Robust" = "revolvercit",
|
||||
"Bulky" = "revolverhakita",
|
||||
"Polished" = "revolvertoriate",
|
||||
"Soulless" = "revolveroldflip",
|
||||
"Soul" = "revolverold")
|
||||
unique_reskin = list(
|
||||
"Default" = list("icon_state" = "revolver"),
|
||||
"Silver" = list("icon_state" = "russianrevolver"),
|
||||
"Robust" = list("icon_state" = "revolvercit"),
|
||||
"Bulky" = list("icon_state" = "revolverhakita"),
|
||||
"Polished" = list("icon_state" = "revolvertoriate"),
|
||||
"Soulless" = list("icon_state" = "revolveroldflip"),
|
||||
"Soul" = list("icon_state" = "revolverold")
|
||||
)
|
||||
|
||||
/obj/item/gun/ballistic/revolver/detective
|
||||
name = "\improper .38 Mars Special"
|
||||
@@ -102,12 +104,13 @@
|
||||
icon_state = "detective"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/rev38
|
||||
obj_flags = UNIQUE_RENAME
|
||||
unique_reskin = list("Default" = "detective",
|
||||
"Leopard Spots" = "detective_leopard",
|
||||
"Black Panther" = "detective_panther",
|
||||
"Gold Trim" = "detective_gold",
|
||||
"The Peacemaker" = "detective_peacemaker"
|
||||
)
|
||||
unique_reskin = list(
|
||||
"Default" = list("icon_state" = "detective"),
|
||||
"Leopard Spots" = list("icon_state" = "detective_leopard"),
|
||||
"Black Panther" = list("icon_state" = "detective_panther"),
|
||||
"Gold Trim" = list("icon_state" = "detective_gold"),
|
||||
"The Peacemaker" = list("icon_state" = "detective_peacemaker")
|
||||
)
|
||||
var/list/safe_calibers
|
||||
|
||||
/obj/item/gun/ballistic/revolver/detective/Initialize(mapload)
|
||||
@@ -294,13 +297,14 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/dual
|
||||
sawn_desc = "Omar's coming!"
|
||||
obj_flags = UNIQUE_RENAME
|
||||
unique_reskin = list("Default" = "dshotgun",
|
||||
"Dark Red Finish" = "dshotgun-d",
|
||||
"Ash" = "dshotgun-f",
|
||||
"Faded Grey" = "dshotgun-g",
|
||||
"Maple" = "dshotgun-l",
|
||||
"Rosewood" = "dshotgun-p"
|
||||
)
|
||||
unique_reskin = list(
|
||||
"Default" = list("icon_state" = "dshotgun"),
|
||||
"Dark Red Finish" = list("icon_state" = "dshotgun-d"),
|
||||
"Ash" = list("icon_state" = "dshotgun-f"),
|
||||
"Faded Grey" = list("icon_state" = "dshotgun-g"),
|
||||
"Maple" = list("icon_state" = "dshotgun-l"),
|
||||
"Rosewood" = list("icon_state" = "dshotgun-p")
|
||||
)
|
||||
|
||||
/obj/item/gun/ballistic/revolver/doublebarrel/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
@@ -342,9 +346,10 @@
|
||||
slot_flags = null
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/improvised
|
||||
sawn_desc = "I'm just here for the gasoline."
|
||||
unique_reskin = list("Default" = "ishotgun",
|
||||
"Cobbled" = "old_ishotgun"
|
||||
)
|
||||
unique_reskin = list(
|
||||
"Default" = list("icon_state" = "ishotgun"),
|
||||
"Cobbled" = list("icon_state" = "old_ishotgun")
|
||||
)
|
||||
var/slung = FALSE
|
||||
|
||||
/obj/item/gun/ballistic/revolver/doublebarrel/improvised/attackby(obj/item/A, mob/user, params)
|
||||
|
||||
@@ -98,9 +98,10 @@
|
||||
fire_delay = 7
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/riot
|
||||
sawn_desc = "Come with me if you want to live."
|
||||
unique_reskin = list("Tactical" = "riotshotgun",
|
||||
"Wood Stock" = "wood_riotshotgun"
|
||||
)
|
||||
unique_reskin = list(
|
||||
"Tactical" = list("icon_state" = "riotshotgun"),
|
||||
"Wood Stock" = list("icon_state" = "wood_riotshotgun")
|
||||
)
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/riot/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
@@ -238,9 +239,10 @@
|
||||
fire_delay = 5
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/com
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
unique_reskin = list("Tactical" = "cshotgun",
|
||||
"Slick" = "cshotgun_slick"
|
||||
)
|
||||
unique_reskin = list(
|
||||
"Tactical" = list("icon_state" = "cshotgun"),
|
||||
"Slick" = list("icon_state" = "cshotgun_slick")
|
||||
)
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/automatic/combat/compact
|
||||
name = "warden's combat shotgun"
|
||||
@@ -279,7 +281,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/update_icon_state()
|
||||
icon_state = "[current_skin ? unique_reskin[current_skin] : "cshotgun"][stock ? "" : "c"]"
|
||||
icon_state = "[current_skin ? unique_reskin[current_skin]["icon_state"] : "cshotgun"][stock ? "" : "c"]"
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/afterattack(atom/target, mob/living/user, flag, params)
|
||||
if(!stock)
|
||||
@@ -381,7 +383,7 @@
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/leveraction/update_icon_state()
|
||||
if(current_skin)
|
||||
icon_state = "[unique_reskin[current_skin]][sawn_off ? "-sawn" : ""][chambered ? "" : "-e"]"
|
||||
icon_state = "[unique_reskin[current_skin]["icon_state"]][sawn_off ? "-sawn" : ""][chambered ? "" : "-e"]"
|
||||
else
|
||||
icon_state = "[initial(icon_state)][sawn_off ? "-sawn" : ""][chambered ? "" : "-e"]"
|
||||
|
||||
|
||||
@@ -9,15 +9,16 @@
|
||||
possible_transfer_amounts = list(1,2,5,10)
|
||||
container_flags = APTFT_VERB
|
||||
obj_flags = UNIQUE_RENAME
|
||||
unique_reskin = list("hypovial" = "hypovial",
|
||||
"red hypovial" = "hypovial-b",
|
||||
"blue hypovial" = "hypovial-d",
|
||||
"green hypovial" = "hypovial-a",
|
||||
"orange hypovial" = "hypovial-k",
|
||||
"purple hypovial" = "hypovial-p",
|
||||
"black hypovial" = "hypovial-t",
|
||||
"pink hypovial" = "hypovial-pink"
|
||||
)
|
||||
unique_reskin = list(
|
||||
"hypovial" = list("icon_state" = "hypovial"),
|
||||
"red hypovial" = list("icon_state" = "hypovial-b"),
|
||||
"blue hypovial" = list("icon_state" = "hypovial-d"),
|
||||
"green hypovial" = list("icon_state" = "hypovial-a"),
|
||||
"orange hypovial" = list("icon_state" = "hypovial-k"),
|
||||
"purple hypovial" = list("icon_state" = "hypovial-p"),
|
||||
"black hypovial" = list("icon_state" = "hypovial-t"),
|
||||
"pink hypovial" = list("icon_state" = "hypovial-pink")
|
||||
)
|
||||
always_reskinnable = TRUE
|
||||
cached_icon = "hypovial"
|
||||
|
||||
@@ -50,14 +51,15 @@
|
||||
icon_state = "hypoviallarge"
|
||||
volume = 120
|
||||
possible_transfer_amounts = list(1,2,5,10,20)
|
||||
unique_reskin = list("large hypovial" = "hypoviallarge",
|
||||
"large red hypovial" = "hypoviallarge-b",
|
||||
"large blue hypovial" = "hypoviallarge-d",
|
||||
"large green hypovial" = "hypoviallarge-a",
|
||||
"large orange hypovial" = "hypoviallarge-k",
|
||||
"large purple hypovial" = "hypoviallarge-p",
|
||||
"large black hypovial" = "hypoviallarge-t"
|
||||
)
|
||||
unique_reskin = list(
|
||||
"large hypovial" = list("icon_state" = "hypoviallarge"),
|
||||
"large red hypovial" = list("icon_state" = "hypoviallarge-b"),
|
||||
"large blue hypovial" = list("icon_state" = "hypoviallarge-d"),
|
||||
"large green hypovial" = list("icon_state" = "hypoviallarge-a"),
|
||||
"large orange hypovial" = list("icon_state" = "hypoviallarge-k"),
|
||||
"large purple hypovial" = list("icon_state" = "hypoviallarge-p"),
|
||||
"large black hypovial" = list("icon_state" = "hypoviallarge-t")
|
||||
)
|
||||
cached_icon = "hypoviallarge"
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/vial/large/bluespace
|
||||
|
||||
Reference in New Issue
Block a user