mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-26 14:47:50 +01:00
[MIRROR] ports matrix recolouring, Ports Colourmate update, ports simple mob/robot recolouring from CHOMP (#7997)
Co-authored-by: Casey <a.roaming.shadow@gmail.com> Co-authored-by: Raeschen <rycoop29@gmail.com>
This commit is contained in:
co-authored by
Casey
Raeschen
parent
5061d322c1
commit
93d48c1680
@@ -63,39 +63,3 @@ var/datum/gear_tweak/item_tf_spawn/gear_tweak_item_tf_spawn = new()
|
||||
return
|
||||
I.spawn_mob_type = simplemob_list[metadata]
|
||||
I.spawn_mob_name = metadata
|
||||
|
||||
GLOBAL_DATUM_INIT(gear_tweak_free_matrix_recolor, /datum/gear_tweak/matrix_recolor, new)
|
||||
|
||||
/datum/gear_tweak/matrix_recolor
|
||||
|
||||
/datum/gear_tweak/matrix_recolor/get_contents(var/metadata)
|
||||
if(islist(metadata) && length(metadata))
|
||||
return "Matrix Recolor: [english_list(metadata)]"
|
||||
return "Matrix Recolor"
|
||||
|
||||
/datum/gear_tweak/matrix_recolor/get_default()
|
||||
return null
|
||||
|
||||
/datum/gear_tweak/matrix_recolor/get_metadata(user, metadata)
|
||||
var/list/returned = color_matrix_picker(user, "Pick a color matrix for this item", "Matrix Recolor", "Ok", "Erase", "Cancel", TRUE, 10 MINUTES, islist(metadata) && metadata)
|
||||
var/list/L = returned["matrix"]
|
||||
if(returned["button"] == 3)
|
||||
return metadata
|
||||
if((returned["button"] == 2) || !islist(L) || !ISINRANGE(L.len, 9, 20))
|
||||
return list()
|
||||
var/identity = TRUE
|
||||
var/static/list/ones = list(1, 5, 9)
|
||||
for(var/i in 1 to L.len)
|
||||
if(L[i] != ((i in ones)? 1 : 0))
|
||||
identity = FALSE
|
||||
break
|
||||
return identity? list() : L
|
||||
|
||||
/datum/gear_tweak/matrix_recolor/tweak_item(obj/item/I, metadata)
|
||||
. = ..()
|
||||
if(!islist(metadata) || (length(metadata) < 12))
|
||||
return
|
||||
if(istype(I))
|
||||
I.add_atom_colour(metadata, FIXED_COLOUR_PRIORITY)
|
||||
else
|
||||
I.color = metadata // fuck off underwear
|
||||
@@ -1,7 +1,6 @@
|
||||
/mob/living/silicon/robot
|
||||
var/sleeper_resting = FALSE //Enable resting belly sprites for dogborgs that have the sprites
|
||||
var/datum/matter_synth/water_res = null //Enable water for lick clean
|
||||
var/has_recoloured = FALSE
|
||||
//Multibelly support. We do not want to apply it to any module not supporting it in it's sprites
|
||||
var/list/vore_light_states = list() //Robot exclusive
|
||||
vore_capacity_ex = list()
|
||||
@@ -54,19 +53,7 @@
|
||||
|
||||
/mob/living/silicon/robot/module_reset()
|
||||
..()
|
||||
has_recoloured = FALSE
|
||||
// We only use the chomp system when the sprite supports it. Else we go through the fallback
|
||||
vore_capacity_ex = list()
|
||||
vore_fullness_ex = list()
|
||||
vore_light_states = list()
|
||||
|
||||
/mob/living/silicon/robot/verb/ColorMate()
|
||||
set name = "Recolour Module"
|
||||
set category = "Robot Commands"
|
||||
set desc = "Allows to recolour once."
|
||||
|
||||
if(!has_recoloured)
|
||||
var/datum/ColorMate/recolour = new /datum/ColorMate(usr)
|
||||
recolour.tgui_interact(usr)
|
||||
return
|
||||
to_chat(usr, "You've already recoloured yourself once. Ask for a module reset for another.")
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
var/list/speech_sounds = list()
|
||||
var/speech_chance = 75 //mobs can be a bit more emotive than carbon/humans
|
||||
var/speech_sound_enabled = TRUE
|
||||
var/has_recoloured = FALSE
|
||||
|
||||
//vars for vore_icons toggle control
|
||||
var/vore_icons_cache = null // null by default. Going from ON to OFF should store vore_icons val here, OFF to ON reset as null
|
||||
@@ -136,14 +135,3 @@
|
||||
|
||||
/mob/living/simple_mob/proc/character_directory_species()
|
||||
return "simplemob"
|
||||
|
||||
/mob/living/simple_mob/verb/ColorMate()
|
||||
set name = "Recolour"
|
||||
set category = "Abilities"
|
||||
set desc = "Allows to recolour once."
|
||||
|
||||
if(!has_recoloured)
|
||||
var/datum/ColorMate/recolour = new /datum/ColorMate(usr)
|
||||
recolour.tgui_interact(usr)
|
||||
return
|
||||
to_chat(usr, "You've already recoloured yourself once. You are only allowed to recolour yourself once during a around.")
|
||||
|
||||
Reference in New Issue
Block a user