Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 13851bf

Browse files
committed
Finally works
1 parent 7acb94a commit 13851bf

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

code/modules/clothing/chameleon.dm

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@
142142
qdel(O)
143143
return TRUE
144144

145+
145146
/datum/action/cooldown/chameleon_copy
146147
name = "Copy person"
147148
button_icon_state = "default" //Temporary, just to test it works
@@ -151,10 +152,15 @@
151152
var/copying = FALSE
152153
var/in_use = FALSE
153154

155+
/datum/action/cooldown/chameleon_copy/InterceptClickOn(mob/living/caller, params, atom/target)
156+
message_admins("InterceptClickOn called")
157+
message_admins("Intercept: [target]")
158+
click_with_power(target)
159+
154160
/datum/action/cooldown/chameleon_copy/Grant(mob/M)
155161
if(syndicate)
156162
owner_has_control = is_syndicate(M)
157-
return ..()
163+
. = ..()
158164

159165
/datum/action/cooldown/chameleon_copy/Trigger(trigger_flags, atom/target)
160166
message_admins("Trigger called")
@@ -177,26 +183,20 @@
177183
return FALSE
178184
return TRUE
179185

180-
/datum/action/cooldown/chameleon_copy/proc/CheckCanTarget(atom/target)
181-
return !isnull(target)
182-
183186
/datum/action/cooldown/chameleon_copy/proc/click_with_power(atom/target_atom)
184187
message_admins("click_with_power called")
185188
message_admins("Click: [target_atom]")
186189
if(in_use || !CheckValidTarget(target_atom))
187190
message_admins("Failed click_with_power 1")
188191
return FALSE
189-
if(!CheckCanTarget(target_atom))
190-
message_admins("Failed click_with_power 2")
191-
return TRUE
192192
in_use = TRUE
193193
FireTargetedPower(target_atom)
194194
in_use = FALSE
195195
return TRUE
196196

197197
/datum/action/cooldown/chameleon_copy/proc/FireTargetedPower(atom/target_atom)
198198
message_admins("FireTargetedPower called")
199-
var/mob/M = target
199+
var/mob/M = target_atom
200200
message_admins("Atom: [target_atom]")
201201
message_admins("Mob: [M]")
202202
//var/datum/outfit/O = new()
@@ -207,12 +207,7 @@
207207
message_admins(item)
208208
to_chat(owner, span_notice("Successfully copied [M]!"))
209209
active = FALSE
210-
211210

212-
/datum/action/cooldown/chameleon_copy/InterceptClickOn(/mob/living/caller, params, atom/target)
213-
message_admins("InterceptClickOn called")
214-
message_admins("Intercept: [target]")
215-
click_with_power(target)
216211

217212
/datum/action/item_action/chameleon/change
218213
name = "Chameleon Change"

0 commit comments

Comments
 (0)