Merge branch 'master' into upstream-merge-33498

This commit is contained in:
LetterJay
2017-12-19 17:50:11 -06:00
committed by GitHub
284 changed files with 5080 additions and 1897 deletions
+1 -1
View File
@@ -104,7 +104,7 @@
/obj/item/mecha_parts/mecha_equipment/proc/attach(obj/mecha/M)
M.equipment += src
chassis = M
src.loc = M
forceMove(M)
M.log_message("[src] initialized.")
if(!M.selected && selectable)
M.selected = src
@@ -39,7 +39,7 @@
O.anchored = TRUE
if(do_after_cooldown(target))
cargo_holder.cargo += O
O.loc = chassis
O.forceMove(chassis)
O.anchored = FALSE
occupant_message("<span class='notice'>[target] successfully loaded.</span>")
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
@@ -91,7 +91,7 @@
O.anchored = TRUE
if(do_after_cooldown(target))
cargo_holder.cargo += O
O.loc = chassis
O.forceMove(chassis)
O.anchored = FALSE
occupant_message("<span class='notice'>[target] successfully loaded.</span>")
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
+5 -7
View File
@@ -24,7 +24,7 @@
infra_luminosity = 15 //byond implementation is bugged.
force = 5
flags_1 = HEAR_1
var/can_move = 1
var/can_move = 0 //time of next allowed movement
var/mob/living/carbon/occupant = null
var/step_in = 10 //make a step in step_in/10 sec.
var/dir_in = 2//What direction will the mech face when entered/powered on? Defaults to South.
@@ -502,7 +502,7 @@
return domove(direction)
/obj/mecha/proc/domove(direction)
if(!can_move)
if(can_move >= world.time)
return 0
if(!Process_Spacemove(direction))
return 0
@@ -520,21 +520,19 @@
return 0
var/move_result = 0
var/oldloc = loc
if(internal_damage & MECHA_INT_CONTROL_LOST)
move_result = mechsteprand()
else if(dir != direction && !strafe)
move_result = mechturn(direction)
else
move_result = mechstep(direction)
if(move_result)
if(move_result || loc != oldloc)// halfway done diagonal move still returns false
use_power(step_energy_drain)
can_move = 0
spawn(step_in)
can_move = 1
can_move = world.time + step_in
return 1
return 0
/obj/mecha/proc/mechturn(direction)
setDir(direction)
if(turnsound)
+5 -5
View File
@@ -542,7 +542,7 @@
else
user.visible_message("[user] removes the capacitor from the [holder].", "<span class='notice'>You remove the capacitor from the [holder].</span>")
var/obj/item/I = locate(/obj/item/stock_parts/capacitor) in holder
I.loc = get_turf(holder)
I.forceMove(holder.drop_location())
holder.icon_state = "gygax12"
if(9)
if(diff==FORWARD)
@@ -1155,7 +1155,7 @@
else
user.visible_message("[user] removes the scanner module from the [holder].", "<span class='notice'>You remove the scanner module from the [holder].</span>")
var/obj/item/I = locate(/obj/item/stock_parts/scanning_module) in holder
I.loc = get_turf(holder)
I.forceMove(holder.drop_location())
holder.icon_state = "durand10"
if(11)
if(diff==FORWARD)
@@ -1173,7 +1173,7 @@
else
user.visible_message("[user] removes the super capacitor from the [holder].", "<span class='notice'>You remove the capacitor from the [holder].</span>")
var/obj/item/I = locate(/obj/item/stock_parts/capacitor) in holder
I.loc = get_turf(holder)
I.forceMove(holder.drop_location())
holder.icon_state = "durand12"
if(9)
if(diff==FORWARD)
@@ -1480,7 +1480,7 @@
else
user.visible_message("[user] removes the phasic scanner module from the [holder].", "<span class='notice'>You remove the scanner module from the [holder].</span>")
var/obj/item/I = locate(/obj/item/stock_parts/scanning_module) in holder
I.loc = get_turf(holder)
I.forceMove(holder.drop_location())
holder.icon_state = "phazon10"
if(15)
if(diff==FORWARD)
@@ -1498,7 +1498,7 @@
else
user.visible_message("[user] removes the super capacitor from the [holder].", "<span class='notice'>You remove the capacitor from the [holder].</span>")
var/obj/item/I = locate(/obj/item/stock_parts/capacitor) in holder
I.loc = get_turf(holder)
I.forceMove(holder.drop_location())
holder.icon_state = "phazon12"
if(13)
if(diff==FORWARD)
+1 -1
View File
@@ -68,7 +68,7 @@
if(crowbar_salvage && crowbar_salvage.len)
var/obj/S = pick(crowbar_salvage)
if(S)
S.loc = get_turf(user)
S.forceMove(user.drop_location())
crowbar_salvage -= S
user.visible_message("[user] pries [S] from [src].", "<span class='notice'>You pry [S] from [src].</span>")
return