|
142 | 142 | qdel(O) |
143 | 143 | return TRUE |
144 | 144 |
|
| 145 | + |
145 | 146 | /datum/action/cooldown/chameleon_copy |
146 | 147 | name = "Copy person" |
147 | 148 | button_icon_state = "default" //Temporary, just to test it works |
|
151 | 152 | var/copying = FALSE |
152 | 153 | var/in_use = FALSE |
153 | 154 |
|
| 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 | + |
154 | 160 | /datum/action/cooldown/chameleon_copy/Grant(mob/M) |
155 | 161 | if(syndicate) |
156 | 162 | owner_has_control = is_syndicate(M) |
157 | | - return ..() |
| 163 | + . = ..() |
158 | 164 |
|
159 | 165 | /datum/action/cooldown/chameleon_copy/Trigger(trigger_flags, atom/target) |
160 | 166 | message_admins("Trigger called") |
|
177 | 183 | return FALSE |
178 | 184 | return TRUE |
179 | 185 |
|
180 | | -/datum/action/cooldown/chameleon_copy/proc/CheckCanTarget(atom/target) |
181 | | - return !isnull(target) |
182 | | - |
183 | 186 | /datum/action/cooldown/chameleon_copy/proc/click_with_power(atom/target_atom) |
184 | 187 | message_admins("click_with_power called") |
185 | 188 | message_admins("Click: [target_atom]") |
186 | 189 | if(in_use || !CheckValidTarget(target_atom)) |
187 | 190 | message_admins("Failed click_with_power 1") |
188 | 191 | return FALSE |
189 | | - if(!CheckCanTarget(target_atom)) |
190 | | - message_admins("Failed click_with_power 2") |
191 | | - return TRUE |
192 | 192 | in_use = TRUE |
193 | 193 | FireTargetedPower(target_atom) |
194 | 194 | in_use = FALSE |
195 | 195 | return TRUE |
196 | 196 |
|
197 | 197 | /datum/action/cooldown/chameleon_copy/proc/FireTargetedPower(atom/target_atom) |
198 | 198 | message_admins("FireTargetedPower called") |
199 | | - var/mob/M = target |
| 199 | + var/mob/M = target_atom |
200 | 200 | message_admins("Atom: [target_atom]") |
201 | 201 | message_admins("Mob: [M]") |
202 | 202 | //var/datum/outfit/O = new() |
|
207 | 207 | message_admins(item) |
208 | 208 | to_chat(owner, span_notice("Successfully copied [M]!")) |
209 | 209 | active = FALSE |
210 | | - |
211 | 210 |
|
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) |
216 | 211 |
|
217 | 212 | /datum/action/item_action/chameleon/change |
218 | 213 | name = "Chameleon Change" |
|
0 commit comments