-
Notifications
You must be signed in to change notification settings - Fork 9
WIP - Vending machine tipping and vandalism #37
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
base: Development
Are you sure you want to change the base?
Conversation
I also realise that it probably is not up to internal standards eg. Variable names, using verbs over procs etc. Please don't hesitate in pointing things out to me. |
It doesn't compile. Also the way you did your changes by copying your changed file into master and then merging into Development is causing a lot of things to show as changed that aren't really changing at all. How hard would it be for you to redo your changes on a clean Development branch? Or at least switch to the Development branch and copy the changed file into there, that would probably be sufficient. |
climbable = !climbable | ||
tipped = !tipped | ||
pass_flags = LETPASSTHROW | ||
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.
This should all be in a proc which is simply called by the verb. That way the proc can be used by other things in the future. You can have the to_chat stuff in the verb, but the actual code that does the tipping should be in another proc.
tipped = !tipped | ||
climbable = !climbable | ||
pass_flags = null | ||
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.
Ditto. Also this definitely needs to check if it's tipped or not, first. Also src.
is considered bad practice, you don't need it (it's implied).
I'm impressed you got it to function as cover that not only blocks projectiles, but has them pass over as well. Supposedly, this wasn't an easy task to accomplish with how projectiles functioned, so we'll have to look further into it for a cover system. |
else if((href_list["togglevoice"]) && (src.panel_open)) | ||
src.shut_up = !src.shut_up | ||
else if(href_list["togglevoice"] && panel_open) | ||
shut_up = !src.shut_up |
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.
src
should be implied.
to_chat(user, "<span class='notice'>[src] is already tipped over.</span>") | ||
return | ||
else | ||
src.visible_message("<b><font color=red>[user] starts to rock [src] back and forth!</font></b>") |
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.
I imagine there's an appropriate span class for this rather than using <font> and <b>
tags.
src.visible_message("<b><font color=red>[user] starts to rock [src] back and forth!</font></b>") | ||
do_after(user, 80, target = src) | ||
src.icon_state = "liberationstation" | ||
src.visible_message("<b><font color=red>[user] tips [src] to the ground with a thud!</font></b>") |
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.
Ditto
src.icon_state = "liberationstation" | ||
src.visible_message("<b><font color=red>[user] tips [src] to the ground with a thud!</font></b>") | ||
climbable = !climbable | ||
tipped = !tipped |
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.
You've just tipped the vending machine with this proc, I would set these to TRUE
or 1
rather than just flipping them. You know it's been tipped.
climbable = !climbable | ||
tipped = !tipped | ||
pass_flags = LETPASSTHROW | ||
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.
Trailing return isn't necessary. The proc returns anyway.
if(user.restrained() || user.buckled) | ||
to_chat(user, "<span class='notice'>You need your hands and legs free for this.</span>") | ||
return 0 | ||
if(user.stat || user.paralysis || user.sleeping || user.lying || user.weakened) |
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.
There's probably already procs for some of these check _HELPERS/mobs
|
||
climber = null | ||
|
||
/obj/machinery/vending/proc/can_touch(var/mob/user) |
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.
Does this need an ishuman()
check or are you okay with simple mobs etc doing it?
set name = "Stand up" | ||
set category = "Object" | ||
set src in view(1) | ||
src.visible_message("<b><font color=red>[user] starts to stand [src] back up!</font></b>") |
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.
Same here with <font>
tags.
@@ -1320,3 +1316,128 @@ | |||
component_parts += new /obj/item/weapon/vending_refill/crittercare(0) | |||
component_parts += new /obj/item/weapon/vending_refill/crittercare(0) | |||
component_parts += new /obj/item/weapon/vending_refill/crittercare(0) | |||
|
|||
//CODING BOOGALOO : FLIPPING OUT EDITION// |
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.
This isn't really what comments should be for. If something is a WIP it shouldn't be merged. But up to you.
@@ -42,7 +42,12 @@ | |||
layer = 2.9 | |||
anchored = 1 | |||
density = 1 | |||
pass_flags = null |
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.
Careful. If this uses bitflags this may cause issues with bump stuff. I don't have time to check right now how it works but it's worth making sure.
@@ -233,11 +235,12 @@ | |||
nanomanager.update_uis(src) | |||
return // don't smack that machine with your 2 thalers | |||
|
|||
if(default_unfasten_wrench(user, I, time = 60)) | |||
if(default_unfasten_wrench(user, I, time = 60)// && !tipped) |
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.
You're missing a )
here which is why you code didn't build.
WIP section of code to allow vending machines to be tipped, used as barricades and a few other things. This is in no way shape or form ready to be merged, as many features are still missing. It is being put here for others to review and help on if possible.
Features added:
1.Vending machines can be tipped over and climbed on top of. They must be un-anchored to do this. As of now no sprites have been done. So as a placeholder all tipped over machines will look like a liberationstation
Features missing:
1.Add chance for projectiles to be blocked/pass
2.Add checks to stop simple mobs from using these verbs
3.Add checks to only show tip over if it's not tipped and stand up if it's tipped
4.Prevent anchoring while tipped
5.Allow mobs to stand on the same tile as the machine when tipped, just like table barricades
6.Let items pass over the top of vending machines while tipped