Adds Boats, Ports /TG/ Buckling (#4527)

* Adds Boats, Ports /TG/ Buckling

* Travis Appeasement

* Changelog
This commit is contained in:
Neerti
2018-01-14 14:58:15 -06:00
committed by Anewbe
parent 3715fa1f12
commit 96d3d361d0
52 changed files with 888 additions and 327 deletions
+4
View File
@@ -95,6 +95,10 @@ var/list/slot_equipment_priority = list( \
//Returns the thing in our inactive hand
/mob/proc/get_inactive_hand()
// Override for your specific mob's hands or lack thereof.
/mob/proc/is_holding_item_of_type(typepath)
return FALSE
//Puts the item into your l_hand if possible and calls all necessary triggers/updates. returns 1 on success.
/mob/proc/put_in_l_hand(var/obj/item/W)
if(lying || !istype(W))
@@ -352,3 +352,10 @@ This saves us from having to call add_fingerprint() any time something is put in
if(slot_l_ear) return l_ear
if(slot_r_ear) return r_ear
return ..()
/mob/living/carbon/human/is_holding_item_of_type(typepath)
for(var/obj/item/I in list(l_hand, r_hand))
if(istype(I, typepath))
return I
return FALSE
+1 -1
View File
@@ -175,4 +175,4 @@
return
visible_message("<span class='danger'>[usr] manages to unbuckle themself!</span>",
"<span class='notice'>You successfully unbuckle yourself.</span>")
buckled.user_unbuckle_mob(src)
buckled.user_unbuckle_mob(src, src)
+7 -4
View File
@@ -822,7 +822,7 @@ default behaviour is:
/mob/living/proc/escape_buckle()
if(buckled)
buckled.user_unbuckle_mob(src)
buckled.user_unbuckle_mob(src, src)
/mob/living/proc/resist_grab()
var/resisting = 0
@@ -951,11 +951,14 @@ default behaviour is:
if(is_physically_disabled())
lying = 0
canmove = 1
pixel_y = V.mob_offset_y - 5
if(!V.riding_datum) // If it has a riding datum, the datum handles moving the pixel_ vars.
pixel_y = V.mob_offset_y - 5
else
if(buckled.buckle_lying != -1) lying = buckled.buckle_lying
if(buckled.buckle_lying != -1)
lying = buckled.buckle_lying
canmove = 1
pixel_y = V.mob_offset_y
if(!V.riding_datum) // If it has a riding datum, the datum handles moving the pixel_ vars.
pixel_y = V.mob_offset_y
else if(buckled)
anchored = 1
canmove = 0
@@ -338,8 +338,9 @@
weaponlock_time = 120
/mob/living/silicon/robot/update_canmove()
if(paralysis || stunned || weakened || buckled || lockdown || !is_component_functioning("actuator")) canmove = 0
else canmove = 1
..() // Let's not reinvent the wheel.
if(lockdown || !is_component_functioning("actuator"))
canmove = FALSE
return canmove
/mob/living/silicon/robot/update_fire()
@@ -44,11 +44,12 @@
if(istype(L, /mob/living/carbon) && L.getCloneLoss() >= L.getMaxHealth() * 1.5 || istype(L, /mob/living/simple_animal) && L.stat == DEAD)
to_chat(src, "This subject does not have an edible life energy...")
return FALSE
if(L.buckled_mob)
if(istype(L.buckled_mob, /mob/living/simple_animal/slime))
if(L.buckled_mob != src)
to_chat(src, "\The [L.buckled_mob] is already feeding on this subject...")
return FALSE
if(L.has_buckled_mobs())
for(var/A in L.buckled_mobs)
if(istype(A, /mob/living/simple_animal/slime))
if(A != src)
to_chat(src, "\The [A] is already feeding on this subject...")
return FALSE
return TRUE
/mob/living/simple_animal/slime/proc/start_consuming(var/mob/living/L)
+14 -8
View File
@@ -167,6 +167,12 @@
src.m_flag = 1
if ((A != src.loc && A && A.z == src.z))
src.last_move = get_dir(A, src.loc)
if(.)
Moved(A, direct)
return
// Called on a successful Move().
/atom/movable/proc/Moved(atom/oldloc)
return
/client/proc/Move_object(direct)
@@ -533,23 +539,23 @@
/mob/proc/update_gravity()
return
/*
// The real Move() proc is above, but touching that massive block just to put this in isn't worth it.
/mob/Move(var/newloc, var/direct)
. = ..(newloc, direct)
if(.)
post_move(newloc, direct)
*/
// Called when a mob successfully moves.
// Would've been an /atom/movable proc but it caused issues.
/mob/proc/post_move(var/newloc, var/direct)
/mob/Moved(atom/oldloc)
for(var/obj/O in contents)
O.on_loc_moved(newloc, direct)
O.on_loc_moved(oldloc)
// Received from post_move(), useful for items that need to know that their loc just moved.
/obj/proc/on_loc_moved(var/newloc, var/direct)
// Received from Moved(), useful for items that need to know that their loc just moved.
/obj/proc/on_loc_moved(atom/oldloc)
return
/obj/item/weapon/storage/on_loc_moved(var/newloc, var/direct)
/obj/item/weapon/storage/on_loc_moved(atom/oldloc)
for(var/obj/O in contents)
O.on_loc_moved(newloc, direct)
O.on_loc_moved(oldloc)