diff --git a/code/game/gamemodes/technomancer/core_obj.dm b/code/game/gamemodes/technomancer/core_obj.dm index 9dd3c05861a..9048a13dd39 100644 --- a/code/game/gamemodes/technomancer/core_obj.dm +++ b/code/game/gamemodes/technomancer/core_obj.dm @@ -32,6 +32,8 @@ var/never_remove = FALSE // whether it can ever be removed + var/global/list/chameleon_options + /obj/item/technomancer_core/Initialize() . = ..() START_PROCESSING(SSprocessing, src) @@ -39,6 +41,10 @@ verbs += /obj/item/technomancer_core/proc/toggle_lock else canremove = FALSE + if(!chameleon_options) + var/list/blocked = list(/obj/item/storage/backpack/satchel/withwallet) + typesof(/obj/item/technomancer_core) + chameleon_options = list("Reset") + chameleon_options += generate_chameleon_choices(/obj/item/storage/backpack, blocked) /obj/item/technomancer_core/Destroy() dismiss_all_summons() @@ -138,6 +144,36 @@ wards_in_use -= ward qdel(ward) +/obj/item/technomancer_core/verb/change_appearance(picked in chameleon_options) + set name = "Change Core Appearance" + set category = "Chameleon Items" + set src in usr + + if(picked != "Reset" && !ispath(chameleon_options[picked])) + return + + if(!usr.mind || !technomancers.is_technomancer(usr.mind)) + to_chat(usr, SPAN_WARNING("You have no idea how to do this!")) + return + + var/chameleon_type + if(picked == "Reset") + chameleon_type = type + else + chameleon_type = chameleon_options[picked] + + set_appearance_to(chameleon_type) + +/obj/item/technomancer_core/proc/set_appearance_to(var/path) + disguise(path) + if(ismob(loc)) + var/mob/M = loc + M.update_inv_back() + update_held_icon() + +/obj/item/technomancer_core/emp_act() + set_appearance_to(type) + // This is what is clicked on to place a spell in the user's hands. /obj/spellbutton name = "generic spellbutton" @@ -357,4 +393,4 @@ set desc = "Toggles the locking mechanism on your manipulation core." canremove = !canremove - to_chat(usr, "You [canremove ? "de" : ""]activate the locking mechanism on \the [src].") \ No newline at end of file + to_chat(usr, "You [canremove ? "de" : ""]activate the locking mechanism on \the [src].") diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 9cc54305fe7..29d0a5ed663 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -31,11 +31,11 @@ return copy //for inheritance -/proc/generate_chameleon_choices(var/basetype, var/blacklist=list()) +/proc/generate_chameleon_choices(var/basetype, var/blacklist=list(), var/list/whitelist=list()) . = list() var/i = 1 //in case there is a collision with both name AND icon_state - for(var/typepath in typesof(basetype) - blacklist) + for(var/typepath in (whitelist + typesof(basetype) - blacklist)) var/obj/O = typepath if(initial(O.icon) && initial(O.icon_state)) var/name = initial(O.name) diff --git a/html/changelogs/geeves-techno_chameleon.yml b/html/changelogs/geeves-techno_chameleon.yml new file mode 100644 index 00000000000..5b8d94637cd --- /dev/null +++ b/html/changelogs/geeves-techno_chameleon.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Technomancer Cores can now be disguised like other chameleon gear. Getting EMPd will reset it to default." \ No newline at end of file