-
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
Marker obj and door opening for simple animals (currently only necromorphs) #10742
Changes from all commits
080f9fa
0dae572
6a50eaa
eb0f46e
8c6d325
e961efb
27720b1
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 |
---|---|---|
@@ -0,0 +1,94 @@ | ||
#define NECROMARKER_MIN_WHISPER_INTERVAL 200 | ||
#define NECROMARKER_MAX_WHISPER_INTERVAL 450 | ||
/obj/machinery/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/ticks_not_whispered = 0 | ||
var/next_whisper = 300 | ||
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/machinery/necromarker/MouseDrop_T(mob/M as mob, mob/user as mob) | ||
if(!istype(M) || isobserver(user)) | ||
return | ||
if(Adjacent(user)) | ||
Consume(M) | ||
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. You probably should add this behavior to attackby as well, so grabbing someone and hitting the thing with them consumes as well. 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. You mean grabbed people? I could do that. It shouldn't do it for anything else though |
||
|
||
/obj/machinery/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 | ||
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. This line is copy pasted below, put it outside the |
||
break | ||
else | ||
candidates -= O | ||
visible_message("<span class='warning'>[src] spins the flesh and bone of [M] into a hellish monstrosity!</span>") | ||
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. Should have \the 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. Isn't 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. Should still use \the IMO. 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. Exxion, no, it's not. If [src] is capitalized then it won't add a the automatically, it only adds the automatically to \improper named objects (which is automatically true if the word isn't capitalized). 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. That's exactly how 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. 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. Which part is wrong?
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. That I was wrong. 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. Oh I see pictures now, didn't when I was on my phone. Just tested myself too, I guess I was wrong. Does \the even have a use then? I always figured it was just a failsafe and would add a the unless one was being automatically added due to improper nounage. Using "The [src]" makes it turn into The the light replacer. 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.
|
||
M.gib() | ||
if(user) | ||
message_admins("[user]/[user.ckey] forcefully turned [M]/[M.ckey] into a necromorph. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</A>)") | ||
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. Again. |
||
log_game("[user]/[user.ckey] forcefully turned [M]/[M.ckey] into a necromorph.") | ||
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 believe there are procs to handle this in a more clean way, and to make it easier on the admins (talking about the mob / key thing) 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. Not that I know of? 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 believe it's like 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. Welp |
||
else | ||
message_admins("[M]/[M.ckey] turned into a necromorph via a marker. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</A>)") | ||
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. Hey look! |
||
log_game("[M]/[M.ckey] turned into a necromorph.") | ||
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. Again! |
||
|
||
/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>") | ||
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. \the |
||
if(!anchored) | ||
icon_state = "black" | ||
visible_message("<span class='info'>[src]'s glow slowly diminishes.'</span>") | ||
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. \the |
||
|
||
/obj/machinery/necromarker/attack_hand(mob/user) | ||
if(!isobserver(user) && !issilicon(user)) | ||
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. Do observers even call 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. Yes. |
||
if(Adjacent(user)) | ||
Consume(user) | ||
else | ||
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. Wait won't this else trigger for silicons too? 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. Consume() has an iscarbon check 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 talking about the else block here. It looks like silicons will be added to the candidates list if they 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. w h o o p s |
||
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/machinery/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/machinery/necromarker/process() | ||
if(ticks_not_whispered > next_whisper) | ||
ticks_not_whispered = 0 | ||
visible_message("[pick(whispers)]") | ||
next_whisper = rand(NECROMARKER_MIN_WHISPER_INTERVAL, NECROMARKER_MAX_WHISPER_INTERVAL) | ||
else | ||
ticks_not_whispered++ | ||
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. Should be using world time timestamps. |
||
|
||
/obj/machinery/necromarker/Destroy() | ||
candidates = null | ||
..() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
author: Sood | ||
changes: [] | ||
changes: | ||
- rscadd: Adds a marker. The necromorph kind. Currently admin spawn only. | ||
- rscadd: Players can click on the marker with their bare hand to become a necromorph, or drag another mob onto it to turn it into a necromorph. | ||
- rscadd: Ghosts can sign up to be a necromorph by clicking on the marker. They will take control of the next mindless necromorph to spawn. | ||
- tweak: Player necromorphs can now open doors. |
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.
Also I found this gem.
Seriously why does this exist
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.
Probably put it in the wrong file and left it unfinished, it reminds me of the AI warning when it attempts to force open a firedoor.
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.
Looks like something that used to be an input.