mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
* Spells 1 * Barely functional, but more converted than before! Now with more coderart! Some bullshit to let you use charges and holder var at the same time! * Renames plasma storage variable Makes it so xenos once again get verbs and spells added on new() Changes some code around so you can have holder var requirements and recharging time requirements * AHHHHHHH FUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUCK Fixes a bug with spell channeling switching Makes it so plasma DOESN'T USE ADJUST TOX LOSS TO ADJUST ITSELF RECODES CONJURE SO IT HAS A SPELL FLAG TO NOT PLACE DUPLICATE **MAKES IT SO THE FUCKING CONJURE DOESN'T HAVE A WELDER SOUND FOR NO REASON FOR EVERY CHILD** I DONT EVEN KNOW WHAT ELSE CHRIST * WATAFAK * readds screen spells * Fixes more conflicts * New sprites * Removes Unacidable Final pass on corrosive acid Converts regurgitate to spell * Final revision before testing and completion Creates alien spellmaster * More things * Some spell master stuff and bugfixes * Finishes the code, fixes the bugs, removes unacidable from fucking defficiency * FUCK YOU DEFFICIENCY, FUCK YOU AGAIN * This is more reasonable * Arbitrary balance changes ahoy * Resolve issues
81 lines
1.8 KiB
Plaintext
81 lines
1.8 KiB
Plaintext
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
|
|
|
/obj/machinery/containment_field
|
|
name = "Containment Field"
|
|
desc = "An energy field."
|
|
icon = 'icons/obj/singularity.dmi'
|
|
icon_state = "Contain_F"
|
|
anchored = 1
|
|
density = 0
|
|
use_power = 0
|
|
luminosity = 4
|
|
|
|
flags = FPRINT | PROXMOVE
|
|
|
|
var/obj/machinery/field_generator/FG1 = null
|
|
var/obj/machinery/field_generator/FG2 = null
|
|
var/hasShocked = 0 //Used to add a delay between shocks. In some cases this used to crash servers by spawning hundreds of sparks every second.
|
|
|
|
/obj/machinery/containment_field/Destroy()
|
|
if(FG1 && !FG1.clean_up)
|
|
FG1.cleanup()
|
|
if(FG2 && !FG2.clean_up)
|
|
FG2.cleanup()
|
|
..()
|
|
|
|
/obj/machinery/containment_field/attack_hand(mob/user as mob)
|
|
if(get_dist(src, user) > 1)
|
|
return 0
|
|
else
|
|
shock(user)
|
|
return 1
|
|
|
|
|
|
/obj/machinery/containment_field/blob_act()
|
|
return 0
|
|
|
|
|
|
/obj/machinery/containment_field/ex_act(severity)
|
|
return 0
|
|
|
|
/obj/machinery/containment_field/HasProximity(atom/movable/AM as mob|obj)
|
|
if(Adjacent(AM)) //checking for windows and shit
|
|
if(istype(AM,/mob/living/silicon) && prob(40))
|
|
shock(AM)
|
|
return 1
|
|
if(istype(AM,/mob/living/carbon) && prob(50))
|
|
shock(AM)
|
|
return 1
|
|
return 0
|
|
|
|
|
|
|
|
/obj/machinery/containment_field/shock(const/mob/living/user)
|
|
if(hasShocked)
|
|
return 0
|
|
|
|
if(isnull(FG1) || isnull(FG2))
|
|
qdel(src)
|
|
return 0
|
|
|
|
if(isliving(user))
|
|
hasShocked = 1
|
|
var/shock_damage = min(rand(30, 40), rand(30, 40))
|
|
user.electrocute_act(shock_damage, src)
|
|
|
|
if(iscarbon(user))
|
|
var/atom/target = get_edge_target_turf(user, get_dir(src, get_step_away(user, src)))
|
|
user.throw_at(target, 200, 4)
|
|
|
|
sleep(20)
|
|
hasShocked = 0
|
|
|
|
/obj/machinery/containment_field/proc/set_master(var/master1,var/master2)
|
|
if(!master1 || !master2)
|
|
return 0
|
|
FG1 = master1
|
|
FG2 = master2
|
|
return 1
|
|
|
|
/obj/machinery/containment_field/acidable()
|
|
return 0 |