Skip to content

Commit

Permalink
no longer a machine
Browse files Browse the repository at this point in the history
  • Loading branch information
gbasood committed Feb 9, 2017
1 parent 31e502b commit 74e4e86
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 22 deletions.
2 changes: 1 addition & 1 deletion code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ About the new airlock wires panel:
visible_message("<span class='warning'>\The [src]'s motors whine as something begins trying to force it [density ? "open" : "closed"]!</span>",\
"<span class='notice'>You hear groaning metal and overworked motors.</span>")
if(do_after(user,src,100))
if(locked || welded || jammed || SA.can_force_doors != 2)) //if it got welded/bolted during the do_after
if(locked || welded || jammed || SA.can_force_doors != 2) //if it got welded/bolted during the do_after
to_chat(user, "<span class='notice'>The airlock won't budge!</span>")
return
visible_message("<span class='warning'>\The [user] forces \the [src] [density ? "open" : "closed"]!</span>")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#define NECROMARKER_MIN_WHISPER_INTERVAL 200
#define NECROMARKER_MAX_WHISPER_INTERVAL 450
/obj/machinery/necromarker
/obj/structure/necromarker
name = "mysterious sculpture"
desc = "A mysterious scultpure of spiral spines, covered in runes."
icon = 'icons/xenoarch_icons/necromarker.dmi'
Expand All @@ -11,18 +11,16 @@
var/whispers = list("...bring us flesh...", "...make us whole...", "...we must be whole...", "...join us in unity...", "...one mind, one soul, one flesh...", "...MAKE US WHOLE...")
var/list/mob/dead/observer/candidates = list()

machine_flags = WRENCHMOVE

/obj/machinery/necromarker/New()
/obj/structure/necromarker/New()
. = ..()

/obj/machinery/necromarker/MouseDrop_T(mob/M as mob, mob/user as mob)
/obj/structure/necromarker/MouseDrop_T(mob/M as mob, mob/user as mob)
if(!istype(M) || isobserver(user))
return
if(Adjacent(user))
Consume(M)

/obj/machinery/necromarker/proc/Consume(mob/M as mob, mob/user as mob)
/obj/structure/necromarker/proc/Consume(mob/M as mob, mob/user as mob)
if(anchored && ismob(M) && Adjacent(M) && iscarbon(M) && !istype(M, /mob/living/simple_animal/hostile/monster/necromorph/))
var/mob/living/simple_animal/hostile/monster/necromorph/Z = new(src.loc)
if(M.ckey)
Expand All @@ -47,19 +45,19 @@
message_admins("[key_user(M)] turned into a necromorph via a marker. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</A>)")
log_game("[key_user(M)] turned into a necromorph.")

/obj/machinery/necromarker/wrenchAnchor(var/mob/user)
var/wasanchored = anchored
. = ..()
if(anchored == wasanchored)
return //Nothing changed so change nothing
if(anchored)
icon_state = "red"
visible_message("<span class='warning'>[src] begins to glow an ominous shade of red...</span>")
if(!anchored)
icon_state = "black"
visible_message("<span class='info'>[src]'s glow slowly diminishes.'</span>")
// /obj/structure/necromarker/wrenchAnchor(var/mob/user)
// var/wasanchored = anchored
// . = ..()
// if(anchored == wasanchored)
// return //Nothing changed so change nothing
// if(anchored)
// icon_state = "red"
// visible_message("<span class='warning'>[src] begins to glow an ominous shade of red...</span>")
// if(!anchored)
// icon_state = "black"
// visible_message("<span class='info'>[src]'s glow slowly diminishes.'</span>")

/obj/machinery/necromarker/attack_hand(mob/user)
/obj/structure/necromarker/attack_hand(mob/user)
if(!isobserver(user))
if(Adjacent(user))
Consume(user)
Expand All @@ -71,21 +69,31 @@
to_chat(user, "<span class='info'>You have been signed up to take control of the next mindless necromorph that the marker spawns. Click again to revoke this.</span>")
candidates += user

/obj/machinery/necromarker/attackby(obj/item/weapon/W, mob/user)
/obj/structure/necromarker/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
if(ismob(G.affecting))
Consume(G.affecting)
return //Mission complete, everyone get the fuck out
..()

/obj/structure/necromarker/kick_act(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
if(ismob(G.affecting))
Consume(G.affecting)
return //Mission complete, everyone get the fuck out
..()

/obj/machinery/necromarker/process()
/obj/structure/necromarker/process()
if(next_whisper >= world.time)
visible_message("[pick(whispers)]")
next_whisper = rand(NECROMARKER_MIN_WHISPER_INTERVAL, NECROMARKER_MAX_WHISPER_INTERVAL)
next_whisper += world.time

/obj/machinery/necromarker/Destroy()
/obj/structure/necromarker/Destroy()
candidates = null
..()

/obj/structure/necromarker/animationBolt(var/mob/firer)
return FALSE // jesus christ how horrifying

0 comments on commit 74e4e86

Please sign in to comment.