[FEATURE] 'Hit artifact with robo-part to try to activate it'-patch. - Printable Version +- Goonstation Forums (https://forum.ss13.co) +-- Forum: Discussion (https://forum.ss13.co/forumdisplay.php?fid=6) +--- Forum: Patches (https://forum.ss13.co/forumdisplay.php?fid=30) +---- Forum: Implemented (https://forum.ss13.co/forumdisplay.php?fid=31) +---- Thread: [FEATURE] 'Hit artifact with robo-part to try to activate it'-patch. (/showthread.php?tid=8040) |
[FEATURE] 'Hit artifact with robo-part to try to activate it'-patch. - The Grim Sleeper - 01-27-2017 (09-12-2014, 09:38 AM)Archenteron Wrote: Touch an artefact with cyborg arm replacement = Silicontouch (01-25-2017, 10:27 PM)poland spring Wrote: Or you can just hit them with a damn cyborg arm it shouldn't be that hard That I can make. But I can't reliably spawn a silitouch artifact, so I can't properly test if this code works. Thx again Cirrial. So here it is, please try it out, and leave feedback. Notes:
RE: [FEATURE] 'Hit artifact with robo-part to try to activate it'-patch. - Cirrial - 01-27-2017 Artifact_attackby is called in an if statement by the attackby proc in the parent artifact obj. If Artifact_attackby returns 0, it does not call the contents in the if statement, which is the parent proc. The parent proc is what triggers the "you hit the artifact with thing" message. What you need to do is the same as has been done for stun batons, welders and zippos: return 0 at the end of the if check for robotic parts. You can too reliably spawn a silitouch artifact. 1. Spawn an artifact. Probably best to do this using the artifact controller (Admin -> Secrets -> Artifact Controller) 2. Right click, View variables. 3. Select the artifact datum (should be a blue hyperlink that opens a new window) 4. Find triggers (should be a list of datums) and click it 5. Add a new item to the list (temporarily escapes me how) that is "new instance of a type" 5. The type you want is /datum/artifact_trigger/silicon_touch. Now the embarrassing part is I don't currently have the time or access to the stuff I need to test this process, this is half memory and half double checking the Github repo. This SHOULD more or less be the process to add silicon touch to an artifact's triggers, though. RE: [FEATURE] 'Hit artifact with robo-part to try to activate it'-patch. - ZeWaka - 01-27-2017 (01-27-2017, 04:35 AM)Cirrial Wrote: Now the embarrassing part is I don't currently have the time or access to the stuff I need to test this process, this is half memory and half double checking the Github repo. This SHOULD more or less be the process to add silicon touch to an artifact's triggers, though. could also just spawn in the silicon touch artifact path RE: [FEATURE] 'Hit artifact with robo-part to try to activate it'-patch. - The Grim Sleeper - 01-28-2017 (01-27-2017, 04:35 AM)Cirrial Wrote: ... return 0 at the end of the if check for robotic parts.*facepalms. I should have spotted that right of the bat, I actually copied those lines to make this code. I should not code in a rush. Code updated. (01-27-2017, 04:35 AM)Cirrial Wrote: 1. Spawn an artifact. Probably best to do this using the artifact controller (Admin -> Secrets -> Artifact Controller)Ah, yes, just log in as an Administrator. That is how you test things, not by playing as a player and then playing without admin access, like some halfwit. ... So, how do I get logged in as Administrator? I tried adding my gamename to the '\config\names.txt' and recompiling, but I didn't get it to work. RE: [FEATURE] 'Hit artifact with robo-part to try to activate it'-patch. - Cirrial - 01-28-2017 It's /config/admins.txt, and basically follow the format the other names in the file do. Key thing to remember: your player key has to be in "canonical" form, which means all lowercase, no spaces or punctuation, so I imagine for you it'd be "thegrimsleeper". RE: [FEATURE] 'Hit artifact with robo-part to try to activate it'-patch. - The Grim Sleeper - 01-28-2017 Right, thank you. ... Right, cleaned the code, tested it, and yes now it work fine. I'll update the original post 2. |