Dreamix Posted December 9, 2015 Posted December 9, 2015 I have NO idea how to check if the sword is on. For example, I have this: if(istype(W, /obj/item/weapon/melee/energy)) for(var/mob/O in viewers(user, 4)) O.show_message("\blue The [src] was sliced apart by [user]'s energy sword!", 1, "\red You hear [src] coming apart.", 2) destroy() How the hell do I use call's, and istypes? Why can't I just do "if (active)", that's already in melee/energy (albeit, in different .dm), why can't I just specify the path? Help.
EvilBrage Posted December 9, 2015 Posted December 9, 2015 If they can do all that, the price should increase, since it makes both the emag and traitor toolset obsolete. Not necessarily; the emag's usefulness is far beyond simply opening doors, not to mention they're inexpensive compared to the sword. If you ask me, using the sword to cut open walls and doors would be a last-resort kind of thing. Tools, on the other hand, are a quick purchase when you've only got one crystal left and are in a bind. Far as the code goes, we do have code for slicing the walls apart with the energy blade, and we have an is(active) variable for the energy sword, so we just need to combine the two - or if we want to be lazy, we can do like thermite does. if( istype(W, /obj/item/weapon/melee/energy/sword) ) is(active) user << "<span class='notice'>You begin slicing through the wall.</span>" playsound(src, "sparks", 50, 1) playsound(src, 'sound/weapons/blade1.ogg', 50, 1) sleep(60) dismantle_wall(1) else user << "<span class='notice'>You should turn your sword on first.</span>" return Or we could just add something onto the deconstruction line. else if( istype(W, /obj/item/weapon/melee/energy/sword) ) if(active) user << "<span class='notice'>You begin slicing through the wall with your energy sword.</span>" playsound(src, 'sound/items/Welder.ogg', 100, 1) sleep(60) if(mineral == "diamond")//Oh look, it's tougher sleep(60) if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return if( user.loc == T && user.get_active_hand() == W ) user << "<span class='notice'>You cut a man-sized hole into the wall.</span>" dismantle_wall(1) for(var/mob/O in viewers(user, 5)) O.show_message("<span class='warning'>The wall was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear metal being sliced apart.</span>", 2) return I doubt either of these would work on their own because I'm much better at comprehending code than writing it, but it's a little something to work with.
Alberyk Posted July 28, 2016 Posted July 28, 2016 Necro bump of getting shit done: https://github.com/Aurorastation/Aurora.3/pull/645
Nanako Posted July 28, 2016 Posted July 28, 2016 This is an awesome idea and i seem to have dropped in late. Lordfowl is right, doors should be very easy to cut open. Two seconds for any ordinary door, some higher time (maybe 10 sec) for high security doors, and an additional eight seconds for any door which is bolted and evilbrage is right about the emag and toolkit. Using the emag to open doors is either dumb, or a desperate last resort, either way its a waste of its power.
Nikov Posted July 29, 2016 Posted July 29, 2016 I would estimate a door as being more structurally secure than a wall, since a wall is thin plates on a girder but a door has to bear all of its pressure on its body. When cut by an energy sword, the functionality should not be a plasma-cutter, precisely deconstructing the wall. Instead it should create a noticeable, obvious hole, as thermite does. TL;DR: e-swords make thermite holes.
Recommended Posts