-
Notifications
You must be signed in to change notification settings - Fork 542
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
Changes from all commits
a234177
c463301
983f739
7e4e139
c97a1a6
c24f2ac
556248e
7ca0e71
5546b5f
ec8c6cd
31e502b
c43de27
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) | ||
to_chat(user, "<span class='notice'>The airlock won't budge!</span>") | ||
else if (SA.can_force_doors > 0) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) | ||
|
@@ -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) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm changing it on airlocks right now but the base |
||
else if(!operating) | ||
denied() | ||
|
||
|
@@ -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 | ||
|
@@ -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 | ||
|
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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