mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Merge pull request #13588 from dearmochi/more-fix-stuff
More fixes: Custodial Locator, e-swords, upside-down-itis and grabbing
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
/atom/movable/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(can_buckle && has_buckled_mobs())
|
||||
if(buckled_mobs.len > 1)
|
||||
if(length(buckled_mobs) > 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))
|
||||
return TRUE
|
||||
@@ -26,15 +26,12 @@
|
||||
return TRUE
|
||||
|
||||
/atom/movable/proc/has_buckled_mobs()
|
||||
if(!buckled_mobs)
|
||||
return FALSE
|
||||
if(buckled_mobs.len)
|
||||
return TRUE
|
||||
return length(buckled_mobs)
|
||||
|
||||
/atom/movable/attack_robot(mob/living/user)
|
||||
. = ..()
|
||||
if(can_buckle && has_buckled_mobs() && Adjacent(user)) // attack_robot is called on all ranges, so the Adjacent check is needed
|
||||
if(buckled_mobs.len > 1)
|
||||
if(length(buckled_mobs) > 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))
|
||||
return TRUE
|
||||
@@ -54,7 +51,7 @@
|
||||
if(check_loc && M.loc != loc)
|
||||
return FALSE
|
||||
|
||||
if((!can_buckle && !force) || M.buckled || (buckled_mobs.len >= max_buckled_mobs) || (buckle_requires_restraints && !M.restrained()) || M == src)
|
||||
if((!can_buckle && !force) || M.buckled || (length(buckled_mobs) >= max_buckled_mobs) || (buckle_requires_restraints && !M.restrained()) || M == src)
|
||||
return FALSE
|
||||
M.buckling = src
|
||||
if(!M.can_buckle() && !force)
|
||||
@@ -69,6 +66,9 @@
|
||||
if(buckle_prevents_pull)
|
||||
M.pulledby.stop_pulling()
|
||||
|
||||
for(var/obj/item/grab/G in M.grabbed_by)
|
||||
qdel(G)
|
||||
|
||||
if(!check_loc && M.loc != loc)
|
||||
M.forceMove(loc)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/list/nemesis_factions //Any mob with a faction that exists in this list will take bonus damage/effects
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/w_class_on = WEIGHT_CLASS_BULKY
|
||||
var/icon_state_on = "axe1"
|
||||
var/icon_state_on
|
||||
var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
hitsound = 'sound/weapons/blade1.ogg' // Probably more appropriate than the previous hitsound. -- Dave
|
||||
usesound = 'sound/weapons/blade1.ogg'
|
||||
@@ -48,9 +48,9 @@
|
||||
throw_speed = 4
|
||||
if(attack_verb_on.len)
|
||||
attack_verb = attack_verb_on
|
||||
if(!item_color)
|
||||
if(icon_state_on)
|
||||
icon_state = icon_state_on
|
||||
set_light(brightness_on)
|
||||
set_light(brightness_on, l_color = item_color ? colormap[item_color] : null)
|
||||
else
|
||||
icon_state = "sword[item_color]"
|
||||
set_light(brightness_on, l_color=colormap[item_color])
|
||||
@@ -80,6 +80,7 @@
|
||||
name = "energy axe"
|
||||
desc = "An energised battle axe."
|
||||
icon_state = "axe0"
|
||||
icon_state_on = "axe1"
|
||||
force = 40
|
||||
force_on = 150
|
||||
throwforce = 25
|
||||
@@ -301,9 +302,9 @@
|
||||
throw_speed = 4
|
||||
if(attack_verb_on.len)
|
||||
attack_verb = attack_verb_on
|
||||
if(!item_color)
|
||||
if(icon_state_on)
|
||||
icon_state = icon_state_on
|
||||
set_light(brightness_on)
|
||||
set_light(brightness_on, l_color = item_color ? colormap[item_color] : null)
|
||||
else
|
||||
icon_state = "sword[item_color]"
|
||||
set_light(brightness_on, l_color=colormap[item_color])
|
||||
|
||||
@@ -130,16 +130,18 @@
|
||||
release_mob(M)
|
||||
|
||||
/obj/structure/kitchenspike/proc/release_mob(mob/living/M)
|
||||
var/matrix/m180 = matrix(M.transform)
|
||||
m180.Turn(180)
|
||||
animate(M, transform = m180, time = 3)
|
||||
M.pixel_y = M.get_standard_pixel_y_offset(180)
|
||||
M.adjustBruteLoss(30)
|
||||
src.visible_message(text("<span class='danger'>[M] falls free of [src]!</span>"))
|
||||
unbuckle_mob(M, force = TRUE)
|
||||
M.emote("scream")
|
||||
M.AdjustWeakened(10)
|
||||
|
||||
/obj/structure/kitchenspike/post_unbuckle_mob(mob/living/M)
|
||||
M.pixel_y = M.get_standard_pixel_y_offset(0)
|
||||
var/matrix/m180 = matrix(M.transform)
|
||||
m180.Turn(180)
|
||||
animate(M, transform = m180, time = 3)
|
||||
|
||||
/obj/structure/kitchenspike/Destroy()
|
||||
if(has_buckled_mobs())
|
||||
for(var/mob/living/L in buckled_mobs)
|
||||
|
||||
Reference in New Issue
Block a user