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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ports Tg Simple Vehicle Framework #4119

Merged
merged 4 commits into from
Apr 11, 2016

Conversation

Aurorablade
Copy link
Contributor

ports tgstation/tgstation#14076
ports tgstation/tgstation#15725

to do:
Fix Turret ATV
Think of code for hookup of ambulance trolly bed to ambulance.....

馃啈 Fethas
rscdel: Nukes the cargo train code
rscadd:Adds simple vehicle framework and converts secway/janicart/snowmobiles/bikes/cars/ambulance to it
rscadd:Adds space speedbike, red and blue versions, yes you WILL need a spacesuit
rscadd:Maps janicart and secway onto metastation (but not ambulance no pareamedic garage, no i am not mapping that)
/:cl:

/obj/vehicle/janicart/examine(mob/user)
..()
if(floorbuffer)
user << "It has been upgraded with a floor buffer."
Copy link
Contributor

Choose a reason for hiding this comment

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

to_chat(user, "It has been upgraded with a floor buffer.")

@KasparoVy
Copy link
Contributor

Damn son, those speeders look REAL good. Future space motorcycles ftw, so mint.

generic_pixel_x = 0
generic_pixel_y = 4
vehicle_move_delay = 1
var/static/image/carcover = null
Copy link
Contributor

Choose a reason for hiding this comment

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

seriously what does static do

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no idea..i could remove it if needed....

Copy link
Contributor

Choose a reason for hiding this comment

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

http://www.byond.com/forum/?post=137782#comment936991
Assuming the post can be trusted (which I don't doubt) in this case it means that all instances of this (sub)type will share the same carcover image.

The good part is that you'll only ever have one instance of this image, no matter how many cars there are.
The bad part is, should the image change it'll affect all cars (but this can be worked around by having a second non-static var for custom image situations).

Copy link
Contributor

Choose a reason for hiding this comment

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

it's semi-synonymous with /global
it also has the quirk that you can access /static vars from a typepath WITHOUT using initial()

ie: the usual

var/obj/item/sword/I = /obj/item/sword
world << initial(I.attackpower)

would be

var/obj/item/sword/I = /obj/item/sword
world << I.attackpower

But yes the main usage here was indeed so that only one version of the image ever needs to exist for all atvs, it's a good idea to do it for other types that will look the same too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Basically, BYOND's static keyword works surprisingly similar to how it does in other languages such as C++, C#, Java, etc.

@taukausanake
Copy link
Contributor

You murdered the cargo train? D: But I like the cargo train! I want to have a trail of everythings. Cargo has lost all purpose if the train is gone for good!

You can't make it work with this by any chance? I'm serious when I say it should be kept and actually used

anchored = 0

/obj/structure/stool/bed/amb_trolley/MouseDrop(obj/over_object as obj)
..()
Copy link
Member

Choose a reason for hiding this comment

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

this is redundant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Fox-McCloud sorry :( its kinda placeholderisque anyway...i am tying to think of how the attaching the bed to the ambulance is gonna work..so its changeable..

Copy link
Member

Choose a reason for hiding this comment

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

Well, it's not a huge deal, to be honest.

The ambulance driver can just carry around a roller bed with him and pull that like how janitors pull around the janitorial cart--same thing, effectively.

Copy link

Choose a reason for hiding this comment

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

If I can leave a comment, having played a paramedic a lot, I would GREATLY prefer the way the janitor cart works. The clip-attach system is such a pain in the ass. Please go with the janitor system, Aurorablade.

@Fox-McCloud
Copy link
Member

Make sure people on these things are actually impacted by projectiles.

@Aurorablade
Copy link
Contributor Author

@Fox-McCloud gotcha, i know one bit in the turret part runtimed one me and i had to change.

@Fox-McCloud Fox-McCloud added Feature This PR is a new addition to the game Refactor This PR will clean up the code but have the same ingame outcome labels Apr 7, 2016
//add ambulance bed hookup here
..()

/obj/vehicle/ambulance/RunOver(var/mob/living/carbon/human/H)
Copy link
Member

Choose a reason for hiding this comment

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

Let this die, IMO. It's annoying that an emergency vehicle deals damage when you accidentally run over a patient on the ground.

Copy link
Contributor

Choose a reason for hiding this comment

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

'accidentally'

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd keep it, honestly.

Copy link

Choose a reason for hiding this comment

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

please no keep

Removed runover, might need to change the buckled_mob.dir to the
ambulance bed moved thoug....ATV Turret still borked.
@Aurorablade
Copy link
Contributor Author

okay this is pretty much ready for review...i know the turret ATV is kinda iffy but...

keytype = /obj/item/key/ambulance
var/obj/structure/stool/bed/amb_trolley/bed = null


Copy link
Contributor

Choose a reason for hiding this comment

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

There's an extra empty line here

bikecover = image("icons/vehicles/motorcycle.dmi", "motorcycle_overlay_4d")
bikecover.layer = MOB_LAYER + 0.1


Copy link
Contributor

Choose a reason for hiding this comment

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

Extra empty line

@monster860
Copy link
Contributor

I am now tigercat 2.0

@Spacemanspark
Copy link
Contributor

Damn son.

/obj/vehicle/proc/remove_cell(var/mob/living/carbon/human/H)
if(!cell)
return
/obj/vehicle/Move(NewLoc,Dir=0,step_x=0,step_y=0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Spacing here

/obj/vehicle/Move(NewLoc, Dir=0, step_x=0, step_y=0)

@TheDZD
Copy link
Contributor

TheDZD commented Apr 8, 2016

@monster860 Meaning that you leave inane line comments about "issues" with spacing that don't affect readability at all.

name = "Speedbike"
icon = 'icons/obj/bike.dmi'
icon_state = "speedbike_blue"
layer = OBJ_LAYER
Copy link
Member

Choose a reason for hiding this comment

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

MOB_LAYER - 0.1

@Fox-McCloud
Copy link
Member

Some thing that need to be tested:

  • Does lube still slip people on vehicles?
  • Do projectiles still hit people on vehicle?
  • You didn't implement/port the scooter and skateboard =(

step(src, direction)
update_mob()
handle_rotation()
if(istype(src.loc, /turf/simulated))
Copy link
Member

Choose a reason for hiding this comment

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

This is probably the section you'll have to add if lube doesn't knock people off.

if(is_cleanable(A))
qdel(A)
if(istype(A, /obj/effect))
if(is_cleanable(A))
Copy link
Member

Choose a reason for hiding this comment

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

no need to check for if it's an effect and cleanable. Just the above for the F.dirt = 0 is necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well i need to keep the cleanabel part but i can remove the effect part yeah

@Fox-McCloud Fox-McCloud merged commit b40c369 into ParadiseSS13:master Apr 11, 2016
ParadiseSS13-Bot pushed a commit that referenced this pull request Apr 11, 2016
@Aurorablade Aurorablade deleted the VehicleFramework branch May 11, 2017 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature This PR is a new addition to the game Refactor This PR will clean up the code but have the same ingame outcome
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet