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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a before and after loc comparsion to picking up dropship equipment. #5856

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions code/modules/cm_marines/dropship_equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,16 @@
playsound(loc, 'sound/machines/hydraulics_2.ogg', 40, 1)
var/duration_time = 10
var/point_loc
var/old_loc = src.loc
if(ship_base)
duration_time = 70 //uninstalling equipment takes more time
point_loc = ship_base.loc
if(!do_after(user, duration_time * user.get_skill_duration_multiplier(SKILL_ENGINEER), INTERRUPT_NO_NEEDHAND|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD))
return
if(point_loc && ship_base && ship_base.loc != point_loc) //dropship flew away
return
if(old_loc != src.loc) //We somehow moved (possibly into a different powerloader)
return
if(!PC.linked_powerloader || PC.loaded || PC.linked_powerloader.buckled_mob != user)
return
PC.grab_object(user, src, "ds_gear", 'sound/machines/hydraulics_1.ogg')
Expand Down
Loading