mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Moves some list initializations to New
Fixes missing ..() calls in New()
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@
|
||||
var/datum/reagents/reagents = null
|
||||
|
||||
//This atom's HUD (med/sec, etc) images. Associative list.
|
||||
var/list/image/hud_list = list()
|
||||
var/list/image/hud_list = null
|
||||
//HUD images that this atom can provide.
|
||||
var/list/hud_possible
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
if(loc == newloc) //Remove this check and people can accelerate. Not opening that can of worms just yet.
|
||||
newtonian_move(last_move)
|
||||
|
||||
if(. && buckled_mobs.len && !handle_buckled_mob_movement(loc,direct)) //movement failed due to buckled mob(s)
|
||||
if(. && has_buckled_mobs() && !handle_buckled_mob_movement(loc,direct)) //movement failed due to buckled mob(s)
|
||||
. = 0
|
||||
|
||||
//Called after a successful Move(). By this point, we've already moved
|
||||
@@ -137,7 +137,7 @@
|
||||
stop_pulling()
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob(src,force=1)
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
unbuckle_all_mobs(force=1)
|
||||
. = ..()
|
||||
if(client)
|
||||
|
||||
@@ -461,7 +461,7 @@
|
||||
/obj/effect/clockwork/spatial_gateway/attack_hand(mob/living/user)
|
||||
if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
|
||||
var/mob/living/L = user.pulling
|
||||
if(L.buckled || L.anchored || L.buckled_mobs.len)
|
||||
if(L.buckled || L.anchored || L.has_buckled_mobs())
|
||||
return 0
|
||||
user.visible_message("<span class='warning'>[user] shoves [L] into [src]!</span>", "<span class='danger'>You shove [L] into [src]!</span>")
|
||||
user.stop_pulling()
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
if(user.pulledby)
|
||||
user.pulledby.stop_pulling()
|
||||
user.stop_pulling()
|
||||
if(user.buckled_mobs.len)
|
||||
if(user.has_buckled_mobs())
|
||||
user.unbuckle_all_mobs(force=1)
|
||||
sleep(40) //4 seconds
|
||||
if(!qdeleted(user))
|
||||
|
||||
@@ -177,11 +177,11 @@ Class Procs:
|
||||
density = 1
|
||||
if(!target)
|
||||
for(var/mob/living/carbon/C in loc)
|
||||
if(C.buckled || C.buckled_mobs.len)
|
||||
if(C.buckled || C.has_buckled_mobs())
|
||||
continue
|
||||
else
|
||||
target = C
|
||||
if(target && !target.buckled && !target.buckled_mobs.len)
|
||||
if(target && !target.buckled && !target.has_buckled_mobs())
|
||||
occupant = target
|
||||
target.forceMove(src)
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
|
||||
if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
|
||||
var/mob/living/L = user.pulling
|
||||
if(L.buckled || L.buckled_mobs.len)
|
||||
if(L.buckled || L.has_buckled_mobs())
|
||||
return
|
||||
if(state_open)
|
||||
if(iscorgi(L))
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
if(target.buckled)
|
||||
occupant_message("<span class='warning'>[target] will not fit into the sleeper because they are buckled to [target.buckled]!</span>")
|
||||
return
|
||||
if(target.buckled_mobs.len)
|
||||
if(target.has_buckled_mobs())
|
||||
occupant_message("<span class='warning'>[target] will not fit into the sleeper because of the creatures attached to it!</span>")
|
||||
return
|
||||
if(patient)
|
||||
|
||||
@@ -806,7 +806,7 @@
|
||||
user << "<span class='warning'>You are currently buckled and cannot move.</span>"
|
||||
log_append_to_last("Permission denied.")
|
||||
return
|
||||
if(user.buckled_mobs.len) //mob attached to us
|
||||
if(user.has_buckled_mobs()) //mob attached to us
|
||||
user << "<span class='warning'>You can't enter the exosuit with other creatures attached to you!</span>"
|
||||
return
|
||||
|
||||
@@ -819,7 +819,7 @@
|
||||
user << "<span class='danger'>[occupant] was faster! Try better next time, loser.</span>"
|
||||
else if(user.buckled)
|
||||
user << "<span class='warning'>You can't enter the exosuit while buckled.</span>"
|
||||
else if(user.buckled_mobs.len)
|
||||
else if(user.has_buckled_mobs())
|
||||
user << "<span class='warning'>You can't enter the exosuit with other creatures attached to you!</span>"
|
||||
else
|
||||
moved_inside(user)
|
||||
|
||||
@@ -4,15 +4,13 @@
|
||||
var/can_buckle = 0
|
||||
var/buckle_lying = -1 //bed-like behaviour, forces mob.lying = buckle_lying if != -1
|
||||
var/buckle_requires_restraints = 0 //require people to be handcuffed before being able to buckle. eg: pipes
|
||||
var/list/mob/living/buckled_mobs = list()
|
||||
var/list/mob/living/buckled_mobs = null //list()
|
||||
var/max_buckled_mobs = 1
|
||||
|
||||
|
||||
|
||||
//Interaction
|
||||
/atom/movable/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(can_buckle && buckled_mobs.len)
|
||||
if(can_buckle && has_buckled_mobs())
|
||||
if(buckled_mobs.len > 1)
|
||||
var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in buckled_mobs
|
||||
if(user_unbuckle_mob(unbuckled,user))
|
||||
@@ -27,14 +25,23 @@
|
||||
if(user_buckle_mob(M, user))
|
||||
return 1
|
||||
|
||||
|
||||
//Cleanup
|
||||
/atom/movable/Destroy()
|
||||
. = ..()
|
||||
unbuckle_all_mobs(force=1)
|
||||
|
||||
/atom/movable/proc/has_buckled_mobs()
|
||||
if(!buckled_mobs)
|
||||
return FALSE
|
||||
if(buckled_mobs.len)
|
||||
return TRUE
|
||||
|
||||
//procs that handle the actual buckling and unbuckling
|
||||
/atom/movable/proc/buckle_mob(mob/living/M, force = 0)
|
||||
if(!buckled_mobs)
|
||||
buckled_mobs = list()
|
||||
if(!M.buckled_mobs)
|
||||
M.buckled_mobs = list()
|
||||
if((!can_buckle && !force) || !istype(M) || (M.loc != loc) || M.buckled || (M.buckled_mobs.len >= max_buckled_mobs) || (buckle_requires_restraints && !M.restrained()) || M == src)
|
||||
return 0
|
||||
if(!M.can_buckle() && !force)
|
||||
@@ -72,6 +79,8 @@
|
||||
post_buckle_mob(.)
|
||||
|
||||
/atom/movable/proc/unbuckle_all_mobs(force=0)
|
||||
if(!has_buckled_mobs())
|
||||
return
|
||||
for(var/m in buckled_mobs)
|
||||
unbuckle_mob(m, force)
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
var/obj/item/device/toner/ink = null
|
||||
|
||||
/obj/item/weapon/airlock_painter/New()
|
||||
..()
|
||||
ink = new /obj/item/device/toner(src)
|
||||
|
||||
//This proc doesn't just check if the painter can be used, but also uses it.
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/screwdriver/New(loc, var/param_color = null)
|
||||
..()
|
||||
if(!icon_state)
|
||||
if(!param_color)
|
||||
param_color = pick("red","blue","pink","brown","green","cyan","yellow")
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/nest/user_unbuckle_mob(mob/living/buckled_mob, mob/living/user)
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
for(var/buck in buckled_mobs) //breaking a nest releases all the buckled mobs, because the nest isn't holding them down anymore
|
||||
var/mob/living/M = buck
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
if(!user.getorgan(/obj/item/organ/alien/plasmavessel))
|
||||
return
|
||||
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
unbuckle_all_mobs()
|
||||
|
||||
if(buckle_mob(M))
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
return
|
||||
|
||||
var/obj/structure/bed/roller/R = target
|
||||
if(R.buckled_mobs.len)
|
||||
if(R.has_buckled_mobs())
|
||||
if(R.buckled_mobs.len > 1)
|
||||
R.unbuckle_all_mobs()
|
||||
user.visible_message("<span class='notice'>[user] unbuckles all creatures from [R].</span>")
|
||||
|
||||
@@ -71,14 +71,14 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/attack_tk(mob/user)
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
..()
|
||||
else
|
||||
rotate()
|
||||
return
|
||||
|
||||
/obj/structure/chair/proc/handle_rotation(direction)
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.buckled = null //Temporary, so Move() succeeds.
|
||||
@@ -99,7 +99,7 @@
|
||||
/obj/structure/chair/proc/spin()
|
||||
dir = turn(dir, 90)
|
||||
handle_layer()
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.dir = dir
|
||||
@@ -167,7 +167,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/comfy/post_buckle_mob(mob/living/M)
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
overlays += armrest
|
||||
else
|
||||
overlays -= armrest
|
||||
@@ -215,7 +215,7 @@
|
||||
/obj/structure/chair/MouseDrop(over_object, src_location, over_location)
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr))
|
||||
if(!item_chair || !ishuman(usr) || buckled_mobs.len || src.flags & NODECONSTRUCT)
|
||||
if(!item_chair || !ishuman(usr) || has_buckled_mobs() || src.flags & NODECONSTRUCT)
|
||||
return
|
||||
if(usr.incapacitated())
|
||||
usr << "<span class='warning'>You can't do that right now!</span>"
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
if(!isliving(AM)) //let's not put ghosts or camera mobs inside closets...
|
||||
return
|
||||
var/mob/living/L = AM
|
||||
if(L.anchored || L.buckled || L.incorporeal_move || L.buckled_mobs.len)
|
||||
if(L.anchored || L.buckled || L.incorporeal_move || L.has_buckled_mobs())
|
||||
return
|
||||
if(L.mob_size > MOB_SIZE_TINY) // Tiny mobs are treated as items.
|
||||
if(horizontal && L.density)
|
||||
@@ -160,7 +160,7 @@
|
||||
return
|
||||
if(!allow_dense && AM.density)
|
||||
return
|
||||
if(AM.anchored || AM.buckled_mobs.len || (AM.flags & NODROP))
|
||||
if(AM.anchored || AM.has_buckled_mobs() || (AM.flags & NODROP))
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(12, 1, src)
|
||||
s.start()
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.electrocute_act(85, src, 1)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
/obj/structure/kitchenspike/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/crowbar))
|
||||
if(!buckled_mobs.len)
|
||||
if(!has_buckled_mobs())
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
if(do_after(user, 20/I.toolspeed, target = src))
|
||||
user << "<span class='notice'>You pry the spikes out of the frame.</span>"
|
||||
@@ -57,7 +57,7 @@
|
||||
if(user.pulling && isliving(user.pulling) && user.a_intent == "grab" && !buckled_mobs.len)
|
||||
var/mob/living/L = user.pulling
|
||||
if(do_mob(user, src, 120))
|
||||
if(buckled_mobs.len) //to prevent spam/queing up attacks
|
||||
if(has_buckled_mobs()) //to prevent spam/queing up attacks
|
||||
return
|
||||
if(L.buckled)
|
||||
return
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
return prob(60)
|
||||
|
||||
var/obj/structure/bed/B = A
|
||||
if (istype(A, /obj/structure/bed) && (B.buckled_mobs.len || B.density))//if it's a bed/chair and is dense or someone is buckled, it will not pass
|
||||
if (istype(A, /obj/structure/bed) && (B.has_buckled_mobs() || B.density))//if it's a bed/chair and is dense or someone is buckled, it will not pass
|
||||
return 0
|
||||
|
||||
if (istype(A, /obj/structure/closet/cardboard))
|
||||
|
||||
@@ -64,13 +64,13 @@
|
||||
if(icon_state == "open")
|
||||
var/mob/living/GM = user.pulling
|
||||
if(user.grab_state >= GRAB_AGGRESSIVE)
|
||||
if(GM.buckled || GM.buckled_mobs.len)
|
||||
if(GM.buckled || GM.has_buckled_mobs())
|
||||
user << "<span class='warning'>[GM] is attached to something!</span>"
|
||||
return
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
pod.visible_message("<span class='warning'>[user] starts putting [GM] into the [pod]!</span>")
|
||||
if(do_after(user, 15, target = src))
|
||||
if(GM && user.grab_state >= GRAB_AGGRESSIVE && user.pulling == GM && !GM.buckled && !GM.buckled_mobs.len)
|
||||
if(GM && user.grab_state >= GRAB_AGGRESSIVE && user.pulling == GM && !GM.buckled && !GM.has_buckled_mobs())
|
||||
GM.Weaken(5)
|
||||
src.Bumped(GM)
|
||||
break
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
//heatup/cooldown any mobs buckled to ourselves based on our temperature
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
var/hc = pipe_air.heat_capacity()
|
||||
var/mob/living/heat_source = buckled_mobs[1]
|
||||
//Best guess-estimate of the total bodytemperature of all the mobs, since they share the same environment it's ~ok~ to guess like this
|
||||
@@ -82,7 +82,7 @@
|
||||
animate(src, color = rgb(h_r, h_g, h_b), time = 20, easing = SINE_EASING)
|
||||
|
||||
//burn any mobs buckled based on temperature
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
var/heat_limit = 1000
|
||||
if(pipe_air.temperature > heat_limit + 1)
|
||||
for(var/m in buckled_mobs)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
burn_state = FIRE_PROOF
|
||||
|
||||
/obj/item/clothing/gloves/color/fyellow/New()
|
||||
..()
|
||||
siemens_coefficient = pick(0,0.5,0.5,0.5,0.5,0.75,1.5)
|
||||
|
||||
/obj/item/clothing/gloves/color/black
|
||||
@@ -182,6 +183,7 @@
|
||||
item_color = "mime"
|
||||
|
||||
/obj/item/clothing/gloves/color/random/New()
|
||||
..()
|
||||
var/list/gloves = list(
|
||||
/obj/item/clothing/gloves/color/orange = 1,
|
||||
/obj/item/clothing/gloves/color/red = 1,
|
||||
|
||||
@@ -363,7 +363,7 @@
|
||||
KZ.production = (master.spread_cap / initial(master.spread_cap)) * 50
|
||||
mutations = list()
|
||||
SetOpacity(0)
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
unbuckle_all_mobs(force=1)
|
||||
return ..()
|
||||
|
||||
@@ -540,7 +540,7 @@
|
||||
SM.on_grow(src)
|
||||
|
||||
/obj/effect/spacevine/proc/entangle_mob()
|
||||
if(!buckled_mobs.len && prob(25))
|
||||
if(!has_buckled_mobs() && prob(25))
|
||||
for(var/mob/living/V in src.loc)
|
||||
entangle(V)
|
||||
if(buckled_mobs.len)
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
user << "<span class='danger'>This item is not suitable for the gibber!</span>"
|
||||
return
|
||||
var/mob/living/carbon/C = L
|
||||
if(C.buckled ||C.buckled_mobs.len)
|
||||
if(C.buckled ||C.has_buckled_mobs())
|
||||
user << "<span class='warning'>[C] is attached to something!</span>"
|
||||
return
|
||||
if(C.abiotic(1) && !ignore_clothing)
|
||||
@@ -112,7 +112,7 @@
|
||||
user.visible_message("<span class='danger'>[user] starts to put [C] into the gibber!</span>")
|
||||
src.add_fingerprint(user)
|
||||
if(do_after(user, gibtime, target = src))
|
||||
if(C && user.pulling == C && !C.buckled && !C.buckled_mobs.len && !occupant)
|
||||
if(C && user.pulling == C && !C.buckled && !C.has_buckled_mobs() && !occupant)
|
||||
user.visible_message("<span class='danger'>[user] stuffs [C] into the gibber!</span>")
|
||||
C.forceMove(src)
|
||||
occupant = C
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
if(target.stat == 0)
|
||||
user << "<span class='warning'>The monkey is struggling far too much to put it in the recycler.</span>"
|
||||
return
|
||||
if(target.buckled || target.buckled_mobs.len)
|
||||
if(target.buckled || target.has_buckled_mobs())
|
||||
user << "<span class='warning'>The monkey is attached to something.</span>"
|
||||
return
|
||||
qdel(target)
|
||||
|
||||
@@ -233,6 +233,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/ore/New()
|
||||
..()
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
|
||||
@@ -259,6 +260,7 @@
|
||||
var/value = 1
|
||||
|
||||
/obj/item/weapon/coin/New()
|
||||
..()
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ Sorry Giacom. Please don't be mad :(
|
||||
if(moving_diagonally)//no mob swap during diagonal moves.
|
||||
return 1
|
||||
|
||||
if(!M.buckled && !M.buckled_mobs.len)
|
||||
if(!M.buckled && !M.has_buckled_mobs())
|
||||
var/mob_swap
|
||||
//the puller can always swap with its victim if on grab intent
|
||||
if(M.pulledby == src && a_intent == "grab")
|
||||
|
||||
@@ -357,7 +357,7 @@ var/global/mulebot_count = 0
|
||||
|
||||
if(isobj(AM))
|
||||
var/obj/O = AM
|
||||
if(O.buckled_mobs.len || (locate(/mob) in AM)) //can't load non crates objects with mobs buckled to it or inside it.
|
||||
if(O.has_buckled_mobs() || (locate(/mob) in AM)) //can't load non crates objects with mobs buckled to it or inside it.
|
||||
buzz(SIGH)
|
||||
return
|
||||
|
||||
|
||||
@@ -811,7 +811,7 @@
|
||||
|
||||
if(icon_state == "parrot_fly")
|
||||
for(var/mob/living/carbon/human/H in view(src,1))
|
||||
if(H.buckled_mobs.len >= H.max_buckled_mobs) //Already has a parrot, or is being eaten by a slime
|
||||
if(H.has_buckled_mobs() && H.buckled_mobs.len >= H.max_buckled_mobs) //Already has a parrot, or is being eaten by a slime
|
||||
continue
|
||||
perch_on_human(H)
|
||||
return
|
||||
|
||||
@@ -15,7 +15,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/components/unary
|
||||
if(restrained())
|
||||
src << "You can't vent crawl while you're restrained!"
|
||||
return
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
src << "You can't vent crawl with others creatures on you!"
|
||||
return
|
||||
if(buckled)
|
||||
|
||||
@@ -25,6 +25,7 @@ var/next_mob_id = 0
|
||||
..()
|
||||
|
||||
/atom/proc/prepare_huds()
|
||||
hud_list = list()
|
||||
for(var/hud in hud_possible)
|
||||
var/image/I = image('icons/mob/hud.dmi', src, "")
|
||||
I.appearance_flags = RESET_COLOR
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
return
|
||||
if(!istype(user.loc, /turf/)) //No magically doing it from inside closets
|
||||
return
|
||||
if(target.buckled || target.buckled_mobs.len)
|
||||
if(target.buckled || target.has_buckled_mobs())
|
||||
return
|
||||
if(target.mob_size > MOB_SIZE_HUMAN)
|
||||
user << "<span class='warning'>[target] doesn't fit inside [src]!</span>"
|
||||
|
||||
@@ -588,6 +588,7 @@
|
||||
var/cooldown
|
||||
|
||||
/obj/item/weapon/relic/New()
|
||||
..()
|
||||
icon_state = pick("shock_kit","armor-igniter-analyzer","infra-igniter0","infra-igniter1","radio-multitool","prox-radio1","radio-radio","timer-multitool0","radio-igniter-tank")
|
||||
realName = "[pick("broken","twisted","spun","improved","silly","regular","badly made")] [pick("device","object","toy","illegal tech","weapon")]"
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
var/rating = 1
|
||||
|
||||
/obj/item/weapon/stock_parts/New()
|
||||
..()
|
||||
src.pixel_x = rand(-5, 5)
|
||||
src.pixel_y = rand(-5, 5)
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
src.ExtinguishMob()
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob(src,force=1)
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
unbuckle_all_mobs(force=1)
|
||||
if(pulledby)
|
||||
pulledby.stop_pulling()
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
if(target.pulledby)
|
||||
target.pulledby.stop_pulling()
|
||||
target.stop_pulling()
|
||||
if(target.buckled_mobs.len)
|
||||
if(target.has_buckled_mobs())
|
||||
target.unbuckle_all_mobs(force=1)
|
||||
jaunt_disappear(animation, target)
|
||||
target.loc = holder
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
if(!target.Move(picked))
|
||||
if(target.buckled)
|
||||
target.buckled.unbuckle_mob(target,force=1)
|
||||
if(target.buckled_mobs.len)
|
||||
if(target.has_buckled_mobs())
|
||||
target.unbuckle_all_mobs(force=1)
|
||||
target.loc = picked
|
||||
playsound(get_turf(user), sound2, 50,1)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
obj/vehicle/atv/post_buckle_mob(mob/living/M)
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
overlays += atvcover
|
||||
else
|
||||
overlays -= atvcover
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
/obj/vehicle/janicart/handle_vehicle_offsets()
|
||||
..()
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
switch(buckled_mob.dir)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
/obj/vehicle/scooter/handle_vehicle_offsets()
|
||||
..()
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
switch(buckled_mob.dir)
|
||||
@@ -46,14 +46,14 @@
|
||||
density = 0
|
||||
|
||||
/obj/vehicle/scooter/skateboard/post_buckle_mob(mob/living/M)//allows skateboards to be non-dense but still allows 2 skateboarders to collide with each other
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
density = 1
|
||||
else
|
||||
density = 0
|
||||
|
||||
/obj/vehicle/scooter/skateboard/Bump(atom/A)
|
||||
..()
|
||||
if(A.density && buckled_mobs.len)
|
||||
if(A.density && has_buckled_mobs())
|
||||
var/mob/living/carbon/H = buckled_mobs[1]
|
||||
var/atom/throw_target = get_edge_target_turf(H, pick(cardinal))
|
||||
unbuckle_mob(H)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
dir = move_dir
|
||||
|
||||
/obj/vehicle/space/speedbike/Move(newloc,move_dir)
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
PoolOrNew(/obj/effect/overlay/temp/speedbike_trail,list(loc,move_dir))
|
||||
. = ..()
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
pixel_y = 0
|
||||
|
||||
/obj/vehicle/space/speedbike/handle_vehicle_offsets()
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.dir = dir
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
//if they differ between directions, otherwise use the
|
||||
//generic variables
|
||||
/obj/vehicle/proc/handle_vehicle_offsets()
|
||||
if(buckled_mobs.len)
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.dir = dir
|
||||
@@ -123,7 +123,7 @@
|
||||
/obj/vehicle/Bump(atom/movable/M)
|
||||
. = ..()
|
||||
if(auto_door_open)
|
||||
if(istype(M, /obj/machinery/door) && buckled_mobs.len)
|
||||
if(istype(M, /obj/machinery/door) && has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
M.Bumped(m)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user