Inhands var hardsetting (#70364)

This commit is contained in:
ShizCalev
2022-10-07 19:08:09 -07:00
committed by GitHub
parent 2e6ad82063
commit 7048110298
30 changed files with 110 additions and 24 deletions
+1
View File
@@ -7,6 +7,7 @@
name = "area modification item"
icon = 'icons/obj/weapons/items_and_weapons.dmi'
icon_state = "blueprints"
inhand_icon_state = "blueprints"
attack_verb_continuous = list("attacks", "baps", "hits")
attack_verb_simple = list("attack", "bap", "hit")
var/fluffnotice = "Nobody's gonna read this stuff!"
+1
View File
@@ -19,3 +19,4 @@
name = "rose bouquet"
desc = "A bouquet of roses. A bundle of love."
icon_state = "rosebouquet"
inhand_icon_state = "rosebouquet"
+6
View File
@@ -16,6 +16,7 @@
gender = PLURAL
icon = 'icons/obj/weapons/items_and_weapons.dmi'
icon_state = "soap"
inhand_icon_state = "soap"
worn_icon_state = "soap"
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
@@ -57,6 +58,7 @@
desc = "A homemade bar of soap. Smells of... well...."
grind_results = list(/datum/reagent/liquidgibs = 9, /datum/reagent/lye = 9)
icon_state = "soapgibs"
inhand_icon_state = "soapgibs"
worn_icon_state = "soapgibs"
cleanspeed = 3 SECONDS // faster than base soap to reward chemists for going to the effort
@@ -64,6 +66,7 @@
desc = "A heavy duty bar of Nanotrasen brand soap. Smells of plasma."
grind_results = list(/datum/reagent/toxin/plasma = 10, /datum/reagent/lye = 10)
icon_state = "soapnt"
inhand_icon_state = "soapnt"
worn_icon_state = "soapnt"
cleanspeed = 2.8 SECONDS //janitor gets this
uses = 300
@@ -74,6 +77,7 @@
desc = "A deluxe Waffle Co. brand bar of soap. Smells of high-class luxury."
grind_results = list(/datum/reagent/consumable/aloejuice = 10, /datum/reagent/lye = 10)
icon_state = "soapdeluxe"
inhand_icon_state = "soapdeluxe"
worn_icon_state = "soapdeluxe"
cleanspeed = 2 SECONDS //captain gets one of these
@@ -81,6 +85,7 @@
desc = "An untrustworthy bar of soap made of strong chemical agents that dissolve blood faster."
grind_results = list(/datum/reagent/toxin/acid = 10, /datum/reagent/lye = 10)
icon_state = "soapsyndie"
inhand_icon_state = "soapsyndie"
worn_icon_state = "soapsyndie"
cleanspeed = 0.5 SECONDS //faster than mops so it's useful for traitors who want to clean crime scenes
@@ -89,6 +94,7 @@
desc = "The most advanced soap known to mankind. The beginning of the end for germs."
grind_results = list(/datum/reagent/consumable/potato_juice = 9, /datum/reagent/consumable/ethanol/lizardwine = 9, /datum/reagent/monkey_powder = 9, /datum/reagent/drug/krokodil = 9, /datum/reagent/toxin/acid/nitracid = 9, /datum/reagent/baldium = 9, /datum/reagent/consumable/ethanol/hooch = 9, /datum/reagent/bluespace = 9, /datum/reagent/drug/pumpup = 9, /datum/reagent/consumable/space_cola = 9)
icon_state = "soapomega"
inhand_icon_state = "soapomega"
worn_icon_state = "soapomega"
cleanspeed = 0.3 SECONDS //Only the truest of mind soul and body get one of these
uses = 800 //In the Greek numeric system, Omega has a value of 800
+29 -9
View File
@@ -4,12 +4,38 @@
desc = "A generic brand of lipstick."
icon = 'icons/obj/weapons/items_and_weapons.dmi'
icon_state = "lipstick"
inhand_icon_state = "lipstick"
w_class = WEIGHT_CLASS_TINY
var/colour = "red"
var/open = FALSE
/// A trait that's applied while someone has this lipstick applied, and is removed when the lipstick is removed
var/lipstick_trait
/obj/item/lipstick/Initialize(mapload)
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
update_appearance(UPDATE_ICON)
/obj/item/lipstick/vv_edit_var(vname, vval)
. = ..()
if(vname == NAMEOF(src, open))
update_appearance(UPDATE_ICON)
/obj/item/lipstick/update_icon_state()
icon_state = "lipstick[open ? "_uncap" : null]"
inhand_icon_state = "lipstick[open ? "open" : null]"
return ..()
/obj/item/lipstick/update_overlays()
. = ..()
if(!open)
return
var/mutable_appearance/colored_overlay = mutable_appearance(icon, "lipstick_uncap_color")
colored_overlay.color = colour
. += colored_overlay
/obj/item/lipstick/purple
name = "purple lipstick"
colour = "purple"
@@ -39,16 +65,9 @@
name = "[colour] lipstick"
/obj/item/lipstick/attack_self(mob/user)
cut_overlays()
to_chat(user, span_notice("You twist \the [src] [open ? "closed" : "open"]."))
to_chat(user, span_notice("You twist [src] [open ? "closed" : "open"]."))
open = !open
if(open)
var/mutable_appearance/colored_overlay = mutable_appearance(icon, "lipstick_uncap_color")
colored_overlay.color = colour
icon_state = "lipstick_uncap"
add_overlay(colored_overlay)
else
icon_state = "lipstick"
update_appearance(UPDATE_ICON)
/obj/item/lipstick/attack(mob/M, mob/user)
if(!open || !ismob(M))
@@ -106,6 +125,7 @@
desc = "The latest and greatest power razor born from the science of shaving."
icon = 'icons/obj/weapons/items_and_weapons.dmi'
icon_state = "razor"
inhand_icon_state = "razor"
flags_1 = CONDUCT_1
w_class = WEIGHT_CLASS_TINY
+1
View File
@@ -3,6 +3,7 @@
desc = "A brace used to seal and reinforce an airlock. Useful for making areas inaccessible to those without opposable thumbs."
icon = 'icons/obj/weapons/items_and_weapons.dmi'
icon_state = "pneumatic_seal"
inhand_icon_state = "pneumatic_seal"
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
flags_1 = CONDUCT_1
+1
View File
@@ -1,6 +1,7 @@
/obj/item/food/burger
icon = 'icons/obj/food/burgerbread.dmi'
icon_state = "hburger"
inhand_icon_state = "burger"
bite_consumption = 3
food_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/protein = 5, /datum/reagent/consumable/nutriment/vitamin = 1)
tastes = list("bun" = 2, "beef patty" = 4)
+10 -3
View File
@@ -17,6 +17,7 @@
desc = "An egg!"
icon = 'icons/obj/food/egg.dmi'
icon_state = "egg"
inhand_icon_state = "egg"
food_reagents = list(/datum/reagent/consumable/eggyolk = 2, /datum/reagent/consumable/eggwhite = 4)
microwaved_type = /obj/item/food/boiledegg
foodtypes = MEAT | RAW
@@ -110,27 +111,32 @@
/obj/item/food/egg/blue
icon_state = "egg-blue"
inhand_icon_state = "egg-blue"
/obj/item/food/egg/green
icon_state = "egg-green"
inhand_icon_state = "egg-green"
/obj/item/food/egg/mime
icon_state = "egg-mime"
inhand_icon_state = "egg-mime"
/obj/item/food/egg/orange
icon_state = "egg-orange"
inhand_icon_state = "egg-orange"
/obj/item/food/egg/purple
icon_state = "egg-purple"
inhand_icon_state = "egg-purple"
/obj/item/food/egg/rainbow
icon_state = "egg-rainbow"
inhand_icon_state = "egg-rainbow"
/obj/item/food/egg/red
icon_state = "egg-red"
inhand_icon_state = "egg-red"
/obj/item/food/egg/yellow
icon_state = "egg-yellow"
inhand_icon_state = "egg-yellow"
/obj/item/food/friedegg
name = "fried egg"
@@ -164,6 +170,7 @@
desc = "A hard boiled egg."
icon = 'icons/obj/food/egg.dmi'
icon_state = "egg"
inhand_icon_state = "egg"
food_reagents = list(/datum/reagent/consumable/nutriment/protein = 3, /datum/reagent/consumable/nutriment/vitamin = 1)
tastes = list("egg" = 1)
foodtypes = MEAT | BREAKFAST
+1
View File
@@ -350,6 +350,7 @@
name = "Powercrepe"
desc = "With great power, comes great crepes. It looks like a pancake filled with jelly but packs quite a punch."
icon_state = "powercrepe"
inhand_icon_state = "powercrepe"
food_reagents = list(/datum/reagent/consumable/nutriment = 10, /datum/reagent/consumable/nutriment/vitamin = 5, /datum/reagent/consumable/cherryjelly = 5)
force = 30
throwforce = 15
+1
View File
@@ -1,6 +1,7 @@
/obj/item/food/pie
icon = 'icons/obj/food/piecake.dmi'
inhand_icon_state = "pie"
bite_consumption = 3
w_class = WEIGHT_CLASS_NORMAL
+1 -1
View File
@@ -225,7 +225,7 @@
// The colored energy swords we all know and love.
/obj/item/melee/energy/sword/saber
/// Assoc list of all possible saber colors to color define.
/// Assoc list of all possible saber colors to color define. If you add a new color, make sure to update /obj/item/toy/sword too!
var/list/possible_sword_colors = list(
"red" = COLOR_SOFT_RED,
"blue" = LIGHT_COLOR_LIGHT_CYAN,
+1
View File
@@ -1,5 +1,6 @@
/obj/item/picket_sign
icon_state = "picket"
inhand_icon_state = "picket"
name = "blank picket sign"
desc = "It's blank."
force = 5
+2
View File
@@ -9,6 +9,7 @@
desc = "Wrap packages with this festive paper to make gifts."
icon = 'icons/obj/stack_objects.dmi'
icon_state = "wrap_paper"
inhand_icon_state = "wrap_paper"
greyscale_config = /datum/greyscale_config/wrap_paper
item_flags = NOBLUDGEON
amount = 25
@@ -194,6 +195,7 @@
desc = "A tube... of cardboard."
icon = 'icons/obj/stack_objects.dmi'
icon_state = "c_tube"
inhand_icon_state = "c_tube"
throwforce = 0
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
@@ -2,6 +2,7 @@
name = "briefcase"
desc = "It's made of AUTHENTIC faux-leather and has a price-tag still attached. Its owner must be a real professional."
icon_state = "briefcase"
inhand_icon_state = "briefcase"
lefthand_file = 'icons/mob/inhands/equipment/briefcase_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/briefcase_righthand.dmi'
flags_1 = CONDUCT_1
@@ -12,6 +12,7 @@
name = "medkit"
desc = "It's an emergency medical kit for those serious boo-boos."
icon_state = "medkit"
inhand_icon_state = "medkit"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
throw_speed = 3
@@ -15,6 +15,7 @@
name = "oxygen tank"
desc = "A tank of oxygen, this one is blue."
icon_state = "oxygen"
inhand_icon_state = "oxygen_tank"
tank_holder_icon_state = "holder_oxygen"
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
force = 10
@@ -29,12 +30,14 @@
/obj/item/tank/internals/oxygen/yellow
desc = "A tank of oxygen, this one is yellow."
icon_state = "oxygen_f"
inhand_icon_state = "oxygen_f_tank"
tank_holder_icon_state = "holder_oxygen_f"
dog_fashion = null
/obj/item/tank/internals/oxygen/red
desc = "A tank of oxygen, this one is red."
icon_state = "oxygen_fr"
inhand_icon_state = "oxygen_fr_tank"
tank_holder_icon_state = "holder_oxygen_fr"
dog_fashion = null
@@ -64,6 +67,7 @@
name = "plasma tank"
desc = "Contains dangerous plasma. Do not inhale. Warning: extremely flammable."
icon_state = "plasma"
inhand_icon_state = "plasma_tank"
worn_icon_state = "plasmatank"
tank_holder_icon_state = null
flags_1 = CONDUCT_1
@@ -144,6 +148,7 @@
name = "emergency oxygen tank"
desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it."
icon_state = "emergency"
inhand_icon_state = "emergency_tank"
worn_icon_state = "emergency"
tank_holder_icon_state = "holder_emergency"
worn_icon = null
@@ -166,6 +171,7 @@
/obj/item/tank/internals/emergency_oxygen/engi
name = "extended-capacity emergency oxygen tank"
icon_state = "emergency_engi"
inhand_icon_state = "emergency_engi_tank"
worn_icon_state = "emergency_engi"
tank_holder_icon_state = "holder_emergency_engi"
worn_icon = null
@@ -192,6 +198,7 @@
name = "gas tank"
desc = "A generic tank used for storing and transporting gasses. Can be used for internals."
icon_state = "generic"
inhand_icon_state = "generic_tank"
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
force = 10
dog_fashion = /datum/dog_fashion/back
+1
View File
@@ -11,6 +11,7 @@
name = "tank"
icon = 'icons/obj/atmospherics/tank.dmi'
icon_state = "generic"
inhand_icon_state = "generic_tank"
lefthand_file = 'icons/mob/inhands/equipment/tanks_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/tanks_righthand.dmi'
flags_1 = CONDUCT_1
+4
View File
@@ -288,6 +288,10 @@
damtype = BURN
var/obj/item/nuke_core/supermatter_sliver/sliver
/obj/item/hemostat/supermatter/Initialize(mapload)
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/hemostat/supermatter/Destroy()
QDEL_NULL(sliver)
return ..()
+27 -11
View File
@@ -381,6 +381,7 @@
name = "toy sword"
desc = "A cheap, plastic replica of an energy sword. Realistic sounds! Ages 8 and up."
icon_state = "e_sword"
inhand_icon_state = "e_sword"
icon = 'icons/obj/weapons/transforming_energy.dmi'
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
@@ -399,6 +400,7 @@
hitsound_on = hitsound, \
clumsy_check = FALSE)
RegisterSignal(src, COMSIG_TRANSFORMING_ON_TRANSFORM, .proc/on_transform)
AddElement(/datum/element/update_icon_updates_onmob)
/*
* Signal proc for [COMSIG_TRANSFORMING_ON_TRANSFORM].
@@ -407,14 +409,34 @@
*/
/obj/item/toy/sword/proc/on_transform(obj/item/source, mob/user, active)
SIGNAL_HANDLER
if(active)
icon_state = "[icon_state]_[saber_color]"
balloon_alert(user, "[active ? "flicked out":"pushed in"] [src]")
playsound(user ? user : src, active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg', 20, TRUE)
update_appearance(UPDATE_ICON)
return COMPONENT_NO_DEFAULT_MESSAGE
/obj/item/toy/sword/vv_edit_var(vname, vval)
. = ..()
if(vname == NAMEOF(src, saber_color))
update_appearance(UPDATE_ICON)
/obj/item/toy/sword/update_icon_state()
. = ..()
var/datum/component/transforming/transforming_comp = GetComponent(/datum/component/transforming)
var/active = transforming_comp?.active
var/last_part = active ? "_on[saber_color ? "_[saber_color]" : null]" : null
icon_state = "[initial(icon_state)][last_part]"
inhand_icon_state = "[initial(inhand_icon_state)][last_part]"
/obj/item/toy/sword/multitool_act(mob/living/user, obj/item/tool)
if(hacked)
to_chat(user, span_warning("It's already fabulous!"))
return
hacked = TRUE
saber_color = "rainbow"
to_chat(user, span_warning("RNBW_ENGAGE"))
update_appearance(UPDATE_ICON)
// Copied from /obj/item/melee/energy/sword/attackby
/obj/item/toy/sword/attackby(obj/item/weapon, mob/living/user, params)
if(istype(weapon, /obj/item/toy/sword))
@@ -434,13 +456,6 @@
qdel(weapon)
qdel(src)
user.put_in_hands(new_saber)
else if(weapon.tool_behaviour == TOOL_MULTITOOL)
if(hacked)
to_chat(user, span_warning("It's already fabulous!"))
else
hacked = TRUE
saber_color = "rainbow"
to_chat(user, span_warning("RNBW_ENGAGE"))
else
return ..()
@@ -768,6 +783,7 @@
desc = "Relive the excitement of a meteor shower! SweetMeat-eor Co. is not responsible for any injuries, headaches or hearing loss caused by Mini-Meteor."
icon = 'icons/obj/toys/toy.dmi'
icon_state = "minimeteor"
inhand_icon_state = "minimeteor"
w_class = WEIGHT_CLASS_SMALL
/obj/item/toy/minimeteor/emag_act(mob/user)
+2
View File
@@ -494,6 +494,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
desc = "Apparently a staff used by the wizard."
icon = 'icons/obj/wizard.dmi'
icon_state = "staff"
inhand_icon_state = "staff"
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
force = 3
@@ -511,6 +512,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
desc = "Used for sweeping, and flying into the night while cackling. Black cat not included."
icon = 'icons/obj/wizard.dmi'
icon_state = "broom"
inhand_icon_state = "broom"
resistance_flags = FLAMMABLE
/obj/item/staff/stick