Skip to content

Commit 2dd588e

Browse files
authored
Remove (almost) unused var/item_color from /obj/item (#30453)
* it's black and white * Update soft_caps.dm * bruh * bruh * tweaks * comment * Update abduction_gear.dm * Update paradise.dme * Update paradise.dme * Update paradise.dme
1 parent 63f6856 commit 2dd588e

File tree

83 files changed

+227
-840
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+227
-840
lines changed

code/game/gamemodes/miniantags/abduction/abduction_gear.dm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ CONTENTS:
6363
desc = "A highly breathable, alien uniform designed for optimal abduction and dissection."
6464
icon_state = "abductor"
6565
inhand_icon_state = "bl_suit"
66-
item_color = "abductor"
6766
has_sensor = FALSE
6867

6968
sprite_sheets = list(

code/game/machinery/computer/HolodeckControl.dm

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -354,48 +354,47 @@
354354
icon = 'icons/obj/weapons/energy_melee.dmi'
355355
lefthand_file = 'icons/mob/inhands/weapons_lefthand.dmi'
356356
righthand_file = 'icons/mob/inhands/weapons_righthand.dmi'
357-
icon_state = "sword0"
357+
icon_state = "sword"
358358
hitsound = "swing_hit"
359359
force = 3.0
360360
throw_speed = 1
361361
throw_range = 5
362362
w_class = WEIGHT_CLASS_SMALL
363363
armor_penetration_percentage = 50
364364
var/active = FALSE
365+
/// Color of this e-sword. You can see supported colors in icon file
366+
var/sword_color
365367

366368
/obj/item/holo/esword/Initialize(mapload)
367369
. = ..()
370+
if(!sword_color)
371+
sword_color = pick("red", "blue", "green", "purple")
368372
AddComponent(/datum/component/parry, _stamina_constant = 2, _stamina_coefficient = 0.5, _parryable_attack_types = NON_PROJECTILE_ATTACKS)
369373

370-
/obj/item/holo/esword/green/New()
371-
..()
372-
item_color = "green"
374+
/obj/item/holo/esword/update_icon_state()
375+
icon_state = "[initial(icon_state)][active ? sword_color : ""]"
373376

374-
/obj/item/holo/esword/red/New()
375-
..()
376-
item_color = "red"
377+
/obj/item/holo/esword/green
378+
sword_color = "green"
379+
380+
/obj/item/holo/esword/red
381+
sword_color = "red"
377382

378383
/obj/item/holo/esword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
379384
if(active)
380385
return ..()
381386
return 0
382387

383-
/obj/item/holo/esword/New()
384-
..()
385-
item_color = pick("red","blue","green","purple")
386-
387388
/obj/item/holo/esword/attack_self__legacy__attackchain(mob/living/user as mob)
388389
active = !active
389390
if(active)
390391
force = 30
391-
icon_state = "sword[item_color]"
392392
hitsound = "sound/weapons/blade1.ogg"
393393
w_class = WEIGHT_CLASS_BULKY
394394
playsound(user, 'sound/weapons/saberon.ogg', 20, 1)
395395
to_chat(user, "<span class='notice'>[src] is now active.</span>")
396396
else
397397
force = 3
398-
icon_state = "sword0"
399398
hitsound = "swing_hit"
400399
w_class = WEIGHT_CLASS_SMALL
401400
playsound(user, 'sound/weapons/saberoff.ogg', 20, 1)
@@ -405,7 +404,7 @@
405404
H.update_inv_l_hand()
406405
H.update_inv_r_hand()
407406
add_fingerprint(user)
408-
return
407+
update_icon(UPDATE_ICON_STATE)
409408

410409
/obj/machinery/readybutton
411410
name = "Ready Declaration Device"

code/game/objects/items.dm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
9999
var/dyeing_key
100100
/// If this item is put into a washing machine to be dyed, can objects of this type be dyed into a different color/icon?
101101
var/dyeable = FALSE
102-
var/item_color
103102
/// What bodyflags does this item cover? See setup.dm for appropriate bit flags
104103
var/body_parts_covered = 0
105104
/// For leaking gas from turf to mask and vice-versa.

code/game/objects/items/bio_chips/bio_chip.dm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
icon_state = "generic" //Shows up as a auto surgeon, used as a placeholder when a implant doesn't have a sprite
1111
origin_tech = "materials=2;biotech=3;programming=2"
1212
actions_types = list(/datum/action/item_action/hands_free/activate)
13-
item_color = "black"
1413
flags = DROPDEL // By default, don't let implants be harvestable.
1514

1615
///which implant overlay should be used for implant cases. This should point to a state in bio_chips.dmi

code/game/objects/items/bio_chips/bio_chip_shock.dm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
name = "power bio-chip"
33
desc = "A shockingly effective bio-chip for stunning or killing all those in your way. Do it."
44
icon_state = "lighting_bolt"
5-
item_color = "r"
65
origin_tech = "combat=5;magnets=3;biotech=4;syndicate=2"
76
implant_data = /datum/implant_fluff/shock
87
implant_state = "implant-syndicate"

code/game/objects/items/bio_chips/bio_chip_storage.dm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
desc = "Stores up to two big items in a bluespace pocket."
1414
icon_state = "storage"
1515
origin_tech = "materials=2;magnets=4;bluespace=5;syndicate=4"
16-
item_color = "r"
1716
implant_data = /datum/implant_fluff/storage
1817
implant_state = "implant-syndicate"
1918

code/game/objects/items/collar.dm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
name = "pet collar"
33
desc = "The latest fashion accessory for your favorite pets!"
44
icon_state = "petcollar"
5-
item_color = "petcollar"
65
var/tagname = null
76
var/original_name
87
var/original_real_name

code/game/objects/items/dyeing.dm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
worn_icon_state = initial(target_obj.worn_icon_state)
3131
inhand_icon_state = initial(target_obj.inhand_icon_state)
3232
sprite_sheets = target_obj.sprite_sheets
33-
item_color = target_obj.item_color
3433
desc = target_obj.desc
3534
base_icon_state = target_obj.base_icon_state
3635

code/game/objects/items/toys.dm

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171
name = "toy sword"
172172
desc = "A cheap, plastic replica of an energy sword. Realistic sounds! Ages 8 and up."
173173
icon = 'icons/obj/weapons/energy_melee.dmi'
174-
icon_state = "sword0"
174+
icon_state = "sword"
175175
lefthand_file = 'icons/mob/inhands/weapons_lefthand.dmi'
176176
righthand_file = 'icons/mob/inhands/weapons_righthand.dmi'
177177
var/active = FALSE
@@ -190,7 +190,7 @@
190190
else
191191
to_chat(user, "<span class='notice'>You push the plastic blade back down into the handle.</span>")
192192
playsound(user, 'sound/weapons/saberoff.ogg', 20, 1)
193-
icon_state = "sword0"
193+
icon_state = "sword"
194194
w_class = WEIGHT_CLASS_SMALL
195195

196196
if(ishuman(user))
@@ -442,15 +442,17 @@
442442
icon_state = "therapyred"
443443
inhand_icon_state = "egg4"
444444
w_class = WEIGHT_CLASS_TINY
445-
var/cooldown = 0
446445
resistance_flags = FLAMMABLE
446+
var/cooldown = 0
447+
/// Color of the doll. Affects appearance, make sure there is appropriate icon_state in icon file
448+
var/doll_color
447449

448-
/obj/item/toy/therapy/New()
449-
..()
450-
if(item_color)
451-
name = "[item_color] therapy doll"
452-
desc += " This one is [item_color]."
453-
icon_state = "therapy[item_color]"
450+
/obj/item/toy/therapy/Initialize(mapload)
451+
. = ..()
452+
if(doll_color)
453+
name = "[doll_color] therapy doll"
454+
desc += " This one is [doll_color]."
455+
icon_state = "therapy[doll_color]"
454456

455457
/obj/item/toy/therapy/activate_self(mob/user)
456458
if(..() || !(cooldown < world.time - 8))
@@ -460,26 +462,26 @@
460462
cooldown = world.time
461463

462464
/obj/item/toy/therapy/red
463-
item_color = "red"
465+
doll_color = "red"
464466

465467
/obj/item/toy/therapy/purple
466468
inhand_icon_state = "egg1" // It's the magenta egg in items_left/righthand
467-
item_color = "purple"
469+
doll_color = "purple"
468470

469471
/obj/item/toy/therapy/blue
470472
inhand_icon_state = "egg2" // It's the blue egg in items_left/righthand
471-
item_color = "blue"
473+
doll_color = "blue"
472474

473475
/obj/item/toy/therapy/yellow
474476
inhand_icon_state = "egg5" // It's the yellow egg in items_left/righthand
475-
item_color = "yellow"
477+
doll_color = "yellow"
476478

477479
/obj/item/toy/therapy/orange
478-
item_color = "orange"
480+
doll_color = "orange"
479481

480482
/obj/item/toy/therapy/green
481483
inhand_icon_state = "egg3" // It's the green egg in items_left/righthand
482-
item_color = "green"
484+
doll_color = "green"
483485

484486
/*
485487
* Fake meteor

code/game/objects/items/weapons/bio_chips/bio_chip_freedom.dm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
name = "freedom bio-chip"
33
desc = "Use this to escape from those evil Red Shirts."
44
icon_state = "freedom"
5-
item_color = "r"
65
origin_tech = "combat=5;magnets=3;biotech=4;syndicate=2"
76
uses = 4
87
implant_data = /datum/implant_fluff/freedom

0 commit comments

Comments
 (0)