Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(WIP) Necromorph marker redux #13900

Closed
27 changes: 23 additions & 4 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,24 @@ About the new airlock wires panel:
visible_message("<span class='warning'>\The [user] forces \the [src] [density ? "open" : "closed"]!</span>")
density ? open(1) : close(1)

/obj/machinery/door/airlock/attack_animal(mob/user as mob)
if(isElectrified() && Adjacent(user))
shock(user, 100)
if(istype(user, /mob/living/simple_animal))
var/mob/living/simple_animal/SA = user
if(locked || welded || jammed || SA.can_force_doors != 2)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's locked, welded, jammed, or can_force_doors does not equal two, return

Copy link
Contributor Author

@gbasood gbasood Feb 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops
I meant to change this

to_chat(user, "<span class='notice'>The airlock won't budge!</span>")
else if (SA.can_force_doors > 0)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, if can_force_doors > 0

to_chat(user, "<span class='notice'>You start forcing the airlock [density ? "open" : "closed"].</span>")
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
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>")
density ? open(1) : close(1)

//You can ALWAYS screwdriver a door. Period. Well, at least you can even if it's open
/obj/machinery/door/airlock/togglePanelOpen(var/obj/toggleitem, mob/user)
if(!operating)
Expand Down Expand Up @@ -1233,11 +1251,12 @@ About the new airlock wires panel:
..()

/obj/machinery/door/airlock/open(var/forced=0)
if((operating && !forced) || locked || welded)
return 0
if(!forced)
if( !arePowerSystemsOn() || (stat & NOPOWER) || isWireCut(AIRLOCK_WIRE_OPEN_DOOR) )
if(forced != 2)
if((operating && !forced) || locked || welded)
return 0
if(!forced)
if( !arePowerSystemsOn() || (stat & NOPOWER) || isWireCut(AIRLOCK_WIRE_OPEN_DOOR) )
return 0
use_power(50)
playsound(get_turf(src), soundeffect, pitch, 1)
if(src.closeOther != null && istype(src.closeOther, /obj/machinery/door/airlock/) && !src.closeOther.density)
Expand Down
11 changes: 11 additions & 0 deletions code/game/machinery/doors/door.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ var/list/all_doors = list()

if(allowed(user))
open()
else if(isanimal(user))
var/mob/living/simple_animal/SA = user
if(SA.can_force_doors)
open()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May want to change this up, as right now it means the big thing with scary claws can open a door instantly, but also can be locked down via door bolts.

Maybe rather than having can_force_doors act as a boolean, have it variable, with 1 being can open doors after some time but not bolted doors, 2 being can open doors that are bolted/welded/jammed, but it takes a bit of time

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm changing it on airlocks right now but the base door type applies to non-airlocks as well, so this block will stay as is

else if(!operating)
denied()

Expand All @@ -119,6 +123,9 @@ var/list/all_doors = list()
/obj/machinery/door/attack_paw(mob/user as mob)
attack_hand(user)

/obj/machinery/door/attack_animal(mob/user as mob)
attack_hand(user)

/obj/machinery/door/attack_hand(mob/user as mob)
if (prob(HEADBUTT_PROBABILITY) && density && ishuman(user))
var/mob/living/carbon/human/H = user
Expand Down Expand Up @@ -170,6 +177,10 @@ var/list/all_doors = list()
return close()
else
return open()
else if(isanimal(user))
var/mob/living/simple_animal/SA = user
if(SA.can_force_doors)
open()

if(horror_force(user))
return
Expand Down
6 changes: 6 additions & 0 deletions code/game/machinery/doors/firedoor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ var/global/list/alert_overlays_global = list()
/obj/machinery/door/firedoor/attack_hand(mob/user as mob)
return attackby(null, user)

/obj/machinery/door/firedoor/attack_animal(mob/user as mob)
if(istype(user, /mob/living/simple_animal))
var/mob/living/simple_animal/SA = user
if(SA.can_force_doors)
force_open(user)

/obj/machinery/door/firedoor/attack_alien(mob/living/carbon/alien/humanoid/user)
force_open(user)

Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/simple_animal/hostile/monster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
max_n2 = 0
minbodytemp = 0
var/stance_step = 0
can_force_doors = 1

/mob/living/simple_animal/hostile/monster/skrite
name = "skrite"
Expand Down
6 changes: 6 additions & 0 deletions code/modules/mob/living/simple_animal/simple_animal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ var/global/list/animal_count = list() //Stores types, and amount of animals of t
universal_speak = 1
universal_understand = 1

// Whether or not this animal, when controlled by players, can open doors.
// 0 = can't
// 1 = can open unbolted doors after a time
// 2 = can open bolted, welded doors after a time
var/can_force_doors = 0

var/life_tick = 0
var/list/colourmatrix = list()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
#define NECROMARKER_MIN_WHISPER_INTERVAL 200
#define NECROMARKER_MAX_WHISPER_INTERVAL 450
/obj/structure/necromarker
name = "mysterious sculpture"
desc = "A mysterious scultpure of spiral spines, covered in runes."
icon = 'icons/xenoarch_icons/necromarker.dmi'
icon_state = "black"
density = 1

var/next_whisper = 30 SECONDS
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()

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

/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/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)
// Z.ckey = M.ckey
if(M.mind)
M.mind.transfer_to(Z)
else
for(var/mob/dead/observer/O in candidates)
if(O && O.mind && O.ckey)
O.mind.transfer_to(Z)
Z.ckey = O.ckey // Because ghosts don't get key changes
candidates -= O
break
else
candidates -= O
visible_message("<span class='warning'>[src] spins the flesh and bone of [M] into a hellish monstrosity!</span>")
M.gib()
if(user)
message_admins("[key_name(user)] forcefully turned [key_name(M)] into a necromorph. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</A>)")
log_game("[key_name(user)] forcefully turned [key_name(M)] into a necromorph.")
else
message_admins("[key_name(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_name(M)] turned into a necromorph.")

// /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/structure/necromarker/attack_hand(mob/user)
if(!isobserver(user))
if(Adjacent(user))
Consume(user)
else
if(user in candidates)
candidates -= user
to_chat(user, "<span class='info'>You will no longer spawn as a necromorph.</span>")
else
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/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/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/structure/necromarker/Destroy()
candidates = null
..()

/obj/structure/necromarker/animationBolt(var/mob/firer)
return FALSE // jesus christ how horrifying
Binary file added icons/xenoarch_icons/necromarker.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions vgstation13.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1884,6 +1884,7 @@
#include "code\modules\research\xenoarchaeology\artifact\artifact_crystal.dm"
#include "code\modules\research\xenoarchaeology\artifact\artifact_gigadrill.dm"
#include "code\modules\research\xenoarchaeology\artifact\artifact_hoverpod.dm"
#include "code\modules\research\xenoarchaeology\artifact\artifact_necromarker.dm"
#include "code\modules\research\xenoarchaeology\artifact\artifact_replicator.dm"
#include "code\modules\research\xenoarchaeology\artifact\artifact_unknown.dm"
#include "code\modules\research\xenoarchaeology\artifact\effect.dm"
Expand Down