-
Notifications
You must be signed in to change notification settings - Fork 622
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor creating it's own file for souto mobile code instead of it b…
…eing in vehicle.dm. (#5498) # About the pull request Also changed some comment to be to doc stuff standard while i was modifying vehicle... <!-- Remove this text and explain what the purpose of your PR is. Mention if you have tested your changes. If you changed a map, make sure you used the mapmerge tool. If this is an Issue Correction, you can type "Fixes Issue #169420" to link the PR to the corresponding Issue number #169420. Remember: something that is self-evident to you might not be to others. Explain your rationale fully, even if you feel it goes without saying. --> # Explain why it's good for the game # Testing Photographs and Procedure <details> <summary>Screenshots & Videos</summary> Put screenshots and videos here with an empty line between the screenshots and the `<details>` tags. </details> # Changelog :cl: refactor: creating it's own file for souto mobile code instead of it being in vehicle.dm. /:cl: --------- Co-authored-by: Julien <[email protected]> Co-authored-by: Birdtalon <[email protected]>
- Loading branch information
1 parent
d2786b8
commit 698a9cd
Showing
3 changed files
with
52 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/obj/vehicle/souto | ||
name = "\improper Soutomobile" | ||
icon_state = "soutomobile" | ||
desc = "Almost, but not quite, the best ride in the universe." | ||
move_delay = 3 //The speed of a fed but shoeless pajamarine, or a bit slower than a heavy-armor marine. | ||
buckling_y = 4 | ||
layer = ABOVE_LYING_MOB_LAYER //Allows it to drive over people, but is below the driver. | ||
|
||
/obj/vehicle/souto/Initialize() | ||
. = ..() | ||
var/image/I = new(icon = 'icons/obj/vehicles/vehicles.dmi', icon_state = "soutomobile_overlay", layer = ABOVE_MOB_LAYER) //over mobs | ||
overlays += I | ||
|
||
/obj/vehicle/souto/manual_unbuckle(mob/user) | ||
if(buckled_mob && buckled_mob != user) | ||
if(do_after(user, 20, INTERRUPT_ALL, BUSY_ICON_GENERIC)) | ||
..() | ||
else ..() | ||
|
||
/obj/vehicle/souto/relaymove(mob/user, direction) | ||
if(user.is_mob_incapacitated()) return | ||
if(world.time > l_move_time + move_delay) | ||
. = step(src, direction) | ||
|
||
/obj/vehicle/souto/super | ||
desc = "The best ride in the universe, for the one-and-only Souto Man!" | ||
health = 1000 | ||
locked = FALSE | ||
unacidable = TRUE | ||
indestructible = TRUE | ||
|
||
/obj/vehicle/souto/super/explode() | ||
for(var/mob/M as anything in viewers(7, src)) | ||
M.show_message("Somehow, [src] still looks as bright and shiny as a new can of Souto Classic.", SHOW_MESSAGE_VISIBLE) | ||
health = initial(health) //Souto Man never dies, and neither does his bike. | ||
|
||
/obj/vehicle/souto/super/buckle_mob(mob/M, mob/user) | ||
if(!locked) //Vehicle is unlocked until first being mounted, since the Soutomobile is faction-locked and otherwise Souto Man cannot automatically buckle in on spawn as his equipment is spawned before his ID. | ||
locked = TRUE | ||
else if(M == user && M.faction != FACTION_SOUTO && locked == TRUE) //Are you a cool enough dude to drive this bike? Nah, nobody's THAT cool. | ||
to_chat(user, SPAN_WARNING("Somehow, as you take hold of the handlebars, [src] manages to glare at you. You back off. We didn't sign up for haunted motorbikes, man.")) | ||
return | ||
..() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters