module things, jfc

This commit is contained in:
Poojawa
2018-09-11 07:51:01 -05:00
parent 8b9ef1e400
commit 284e9d0325
695 changed files with 11343 additions and 5661 deletions
@@ -134,6 +134,8 @@
return TRUE
/obj/machinery/power/rad_collector/screwdriver_act(mob/living/user, obj/item/I)
if(..())
return TRUE
if(loaded_tank)
to_chat(user, "<span class='warning'>Remove the plasma tank first!</span>")
else
@@ -87,7 +87,7 @@
/obj/machinery/field
var/hasShocked = FALSE //Used to add a delay between shocks. In some cases this used to crash servers by spawning hundreds of sparks every second.
/obj/machinery/field/CollidedWith(atom/movable/mover)
/obj/machinery/field/Bumped(atom/movable/mover)
if(hasShocked)
return
if(isliving(mover))
+44 -4
View File
@@ -31,16 +31,19 @@
var/allow_switch_interact = TRUE
var/projectile_type = /obj/item/projectile/beam/emitter
var/projectile_sound = 'sound/weapons/emitter.ogg'
var/datum/effect_system/spark_spread/sparks
var/obj/item/gun/energy/gun
var/list/gun_properties
var/mode = 0
// The following 3 vars are mostly for the prototype
var/manual = FALSE
var/charge = 0
var/last_projectile_params
/obj/machinery/power/emitter/anchored
anchored = TRUE
@@ -269,10 +272,14 @@
return TRUE
/obj/machinery/power/emitter/crowbar_act(mob/living/user, obj/item/I)
if(panel_open && gun)
return remove_gun(user)
default_deconstruction_crowbar(I)
return TRUE
/obj/machinery/power/emitter/screwdriver_act(mob/living/user, obj/item/I)
if(..())
return TRUE
default_deconstruction_screwdriver(user, "emitter_open", "emitter", I)
return TRUE
@@ -295,9 +302,42 @@
else if(is_wire_tool(I) && panel_open)
wires.interact(user)
return
else if(panel_open && !gun && istype(I,/obj/item/gun/energy))
if(integrate(I,user))
return
return ..()
/obj/machinery/power/emitter/proc/integrate(obj/item/gun/energy/E,mob/user)
if(istype(E, /obj/item/gun/energy))
if(!user.transferItemToLoc(E, src))
return
gun = E
gun_properties = gun.get_turret_properties()
set_projectile()
return TRUE
/obj/machinery/power/emitter/proc/remove_gun(mob/user)
if(!gun)
return
user.put_in_hands(gun)
gun = null
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
gun_properties = list()
set_projectile()
return TRUE
/obj/machinery/power/emitter/proc/set_projectile()
if(LAZYLEN(gun_properties))
if(mode || !gun_properties["lethal_projectile"])
projectile_type = gun_properties["stun_projectile"]
projectile_sound = gun_properties["stun_projectile_sound"]
else
projectile_type = gun_properties["lethal_projectile"]
projectile_sound = gun_properties["lethal_projectile_sound"]
return
projectile_type = initial(projectile_type)
projectile_sound = initial(projectile_sound)
/obj/machinery/power/emitter/emag_act(mob/user)
if(obj_flags & EMAGGED)
return
@@ -405,7 +445,7 @@
var/delay = 0
/obj/item/turret_control/afterattack(atom/targeted_atom, mob/user, proxflag, clickparams)
..()
. = ..()
var/obj/machinery/power/emitter/E = user.buckled
E.setDir(get_dir(E,targeted_atom))
user.setDir(E.dir)
@@ -17,12 +17,6 @@
var/energy = 0
var/creation_type = /obj/singularity
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/machinery/the_singularitygen/attack_hand(mob/user)
if(user.a_intent == INTENT_GRAB && user_buckle_mob(user.pulling, user, check_loc = 0))
return
. = ..()
/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/wrench))
default_unfasten_wrench(user, W, 0)
+10 -10
View File
@@ -1,5 +1,5 @@
/obj/singularity/narsie //Moving narsie to a child object of the singularity so it can be made to function differently. --NEO
name = "Nar-sie's Avatar"
name = "Nar'Sie's Avatar"
desc = "Your mind begins to bubble and ooze as it tries to comprehend what it sees."
icon = 'icons/obj/magic_terror.dmi'
pixel_x = -89
@@ -15,10 +15,10 @@
light_range = 15
light_color = rgb(255, 0, 0)
gender = FEMALE
var/clashing = FALSE //If Nar-Sie is fighting Ratvar
var/clashing = FALSE //If Nar'Sie is fighting Ratvar
/obj/singularity/narsie/large
name = "Nar-Sie"
name = "Nar'Sie"
icon = 'icons/obj/narsie.dmi'
// Pixel stuff centers Narsie.
pixel_x = -236
@@ -29,13 +29,13 @@
/obj/singularity/narsie/large/Initialize()
. = ..()
send_to_playing_players("<span class='narsie'>NAR-SIE HAS RISEN</span>")
send_to_playing_players("<span class='narsie'>NAR'SIE HAS RISEN</span>")
sound_to_playing_players('sound/creatures/narsie_rises.ogg')
var/area/A = get_area(src)
if(A)
var/mutable_appearance/alert_overlay = mutable_appearance('icons/effects/cult_effects.dmi', "ghostalertsie")
notify_ghosts("Nar-Sie has risen in \the [A.name]. Reach out to the Geometer to be given a new shell for your soul.", source = src, alert_overlay = alert_overlay, action=NOTIFY_ATTACK)
notify_ghosts("Nar'Sie has risen in \the [A.name]. Reach out to the Geometer to be given a new shell for your soul.", source = src, alert_overlay = alert_overlay, action=NOTIFY_ATTACK)
INVOKE_ASYNC(src, .proc/narsie_spawn_animation)
/obj/singularity/narsie/large/cult // For the new cult ending, guaranteed to end the round within 3 minutes
@@ -118,10 +118,10 @@
return clashing
/obj/singularity/narsie/Collide(atom/A)
/obj/singularity/narsie/Bump(atom/A)
var/turf/T = get_turf(A)
if(T == loc)
T = get_step(A, A.dir) //please don't slam into a window like a bird, nar-sie
T = get_step(A, A.dir) //please don't slam into a window like a bird, Nar'Sie
forceMove(T)
@@ -185,12 +185,12 @@
/obj/singularity/narsie/proc/acquire(atom/food)
if(food == target)
return
to_chat(target, "<span class='cultsmall'>NAR-SIE HAS LOST INTEREST IN YOU.</span>")
to_chat(target, "<span class='cultsmall'>NAR'SIE HAS LOST INTEREST IN YOU.</span>")
target = food
if(ishuman(target))
to_chat(target, "<span class ='cult'>NAR-SIE HUNGERS FOR YOUR SOUL.</span>")
to_chat(target, "<span class ='cult'>NAR'SIE HUNGERS FOR YOUR SOUL.</span>")
else
to_chat(target, "<span class ='cult'>NAR-SIE HAS CHOSEN YOU TO LEAD HER TO HER NEXT MEAL.</span>")
to_chat(target, "<span class ='cult'>NAR'SIE HAS CHOSEN YOU TO LEAD HER TO HER NEXT MEAL.</span>")
//Wizard narsie
/obj/singularity/narsie/wizard
@@ -28,7 +28,7 @@
addtimer(CALLBACK(src, .proc/move), 1)
/obj/effect/accelerated_particle/Collide(atom/A)
/obj/effect/accelerated_particle/Bump(atom/A)
if(A)
if(isliving(A))
toxmob(A)
+16 -2
View File
@@ -81,6 +81,20 @@
/obj/singularity/blob_act(obj/structure/blob/B)
return
/obj/singularity/attack_tk(mob/user)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.visible_message("<span class='danger'>[C]'s head begins to collapse in on itself!</span>", "<span class='userdanger'>Your head feels like it's collapsing in on itself! This was really not a good idea!</span>", "<span class='italics'>You hear something crack and explode in gore.</span>")
var/turf/T = get_turf(C)
for(var/i in 1 to 3)
C.apply_damage(30, BRUTE, BODY_ZONE_HEAD)
new /obj/effect/gibspawner/generic(T)
sleep(1)
C.ghostize()
var/obj/item/bodypart/head/rip_u = C.get_bodypart(BODY_ZONE_HEAD)
rip_u.dismember(BURN) //nice try jedi
qdel(rip_u)
/obj/singularity/ex_act(severity, target)
switch(severity)
if(1)
@@ -101,12 +115,12 @@
return 0 //Will there be an impact? Who knows. Will we see it? No.
/obj/singularity/Collide(atom/A)
/obj/singularity/Bump(atom/A)
consume(A)
return
/obj/singularity/CollidedWith(atom/movable/AM)
/obj/singularity/Bumped(atom/movable/AM)
consume(AM)