mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 22:42:26 +01:00
Death to earmuff duping (and other fixes/tweaks) (#7216)
* earmuff *scream * don't limit limb breaking that hard
This commit is contained in:
@@ -51,16 +51,40 @@
|
||||
if (( usr.restrained() ) || ( usr.stat ))
|
||||
return
|
||||
|
||||
if (!usr.unEquip(src))
|
||||
if (!usr.canUnEquip(src))
|
||||
return
|
||||
|
||||
var/obj/item/clothing/C = src
|
||||
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
usr.put_in_r_hand(src)
|
||||
if(istype(src, /obj/item/clothing/ears))
|
||||
C = check_two_ears(usr)
|
||||
usr.put_in_r_hand(C)
|
||||
if("l_hand")
|
||||
usr.put_in_l_hand(src)
|
||||
if(istype(src, /obj/item/clothing/ears))
|
||||
C = check_two_ears(usr)
|
||||
usr.put_in_l_hand(C)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
/obj/item/clothing/proc/check_two_ears(var/mob/user)
|
||||
// if you have to ask, it's earcode
|
||||
// var/obj/item/clothing/ears/E
|
||||
var/obj/item/clothing/ears/main_ear
|
||||
if(!ishuman(user))
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
for(var/obj/item/clothing/ears/E in H.contents)
|
||||
H.u_equip(E)
|
||||
if(istype(E, /obj/item/clothing/ears/offear))
|
||||
qdel(E)
|
||||
else
|
||||
main_ear = E
|
||||
|
||||
return main_ear
|
||||
|
||||
|
||||
/obj/item/clothing/examine(var/mob/user)
|
||||
..(user)
|
||||
if(LAZYLEN(accessories))
|
||||
|
||||
@@ -1262,6 +1262,7 @@ var/list/total_extraction_beacons = list()
|
||||
target = get_atom_on_turf(src)
|
||||
if(!target)
|
||||
target = src
|
||||
target.cut_overlay(image_overlay, TRUE)
|
||||
if(location)
|
||||
new /obj/effect/overlay/temp/explosion(location)
|
||||
playsound(location, 'sound/effects/Explosion1.ogg', 100, 1)
|
||||
@@ -1285,11 +1286,11 @@ var/list/total_extraction_beacons = list()
|
||||
if(!isipc(L))
|
||||
addtimer(CALLBACK(L, /mob/living/carbon/.proc/vomit), 20)
|
||||
|
||||
spawn(2)
|
||||
for(var/turf/simulated/mineral/M in range(7,location))
|
||||
if(prob(75))
|
||||
M.GetDrilled(1)
|
||||
addtimer(CALLBACK(src, .proc/drill, location), 2)
|
||||
|
||||
if(target)
|
||||
target.overlays -= image_overlay
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/plastique/seismic/proc/drill(var/turf/drill_loc)
|
||||
for(var/turf/simulated/mineral/M in range(7,drill_loc))
|
||||
if(prob(75))
|
||||
M.GetDrilled(1)
|
||||
|
||||
@@ -470,6 +470,9 @@
|
||||
//Used to attack a joint through grabbing
|
||||
/mob/living/carbon/human/proc/grab_joint(var/mob/living/user, var/def_zone)
|
||||
var/has_grab = 0
|
||||
|
||||
if(user.limb_breaking)
|
||||
return 0
|
||||
for(var/obj/item/weapon/grab/G in list(user.l_hand, user.r_hand))
|
||||
if(G.affecting == src && G.state == GRAB_NECK)
|
||||
has_grab = 1
|
||||
@@ -487,12 +490,15 @@
|
||||
return 0
|
||||
|
||||
user.visible_message("<span class='warning'>[user] begins to dislocate [src]'s [organ.joint]!</span>")
|
||||
user.limb_breaking = TRUE
|
||||
if(do_after(user, 100))
|
||||
organ.dislocate(1)
|
||||
admin_attack_log(user, src, "dislocated [organ.joint].", "had his [organ.joint] dislocated.", "dislocated [organ.joint] of")
|
||||
src.visible_message("<span class='danger'>[src]'s [organ.joint] [pick("gives way","caves in","crumbles","collapses")]!</span>")
|
||||
user.limb_breaking = FALSE
|
||||
return 1
|
||||
user.visible_message("<span class='warning'>[user] fails to dislocate [src]'s [organ.joint]!</span>")
|
||||
user.limb_breaking = FALSE
|
||||
return 0
|
||||
|
||||
//Breaks all grips and pulls that the mob currently has.
|
||||
|
||||
@@ -332,6 +332,9 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
check_flags = EYES
|
||||
if(slot_gloves, slot_w_uniform)
|
||||
covering = src.wear_suit
|
||||
if(slot_l_ear, slot_r_ear)
|
||||
covering = src.head
|
||||
check_flags = HEAD
|
||||
|
||||
if(covering && (covering.body_parts_covered & (I.body_parts_covered|check_flags)))
|
||||
to_chat(user, "<span class='warning'>\The [covering] is in the way.</span>")
|
||||
|
||||
@@ -77,4 +77,6 @@
|
||||
var/stop_sight_update = 0 //If true, it won't reset the mob vision flags
|
||||
|
||||
var/burn_mod = 1
|
||||
var/brute_mod = 1
|
||||
var/brute_mod = 1
|
||||
|
||||
var/limb_breaking = FALSE // used to limit people from queuing up limb-breaks
|
||||
@@ -332,6 +332,8 @@ obj/machinery/lapvend/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
S.worth -= total_price
|
||||
if(S.worth <= 0)
|
||||
qdel(S)
|
||||
else
|
||||
S.update_icon()
|
||||
return 1
|
||||
|
||||
else // just incase
|
||||
|
||||
@@ -642,11 +642,12 @@
|
||||
update_icon()
|
||||
update_held_icon()
|
||||
|
||||
/obj/item/weapon/gun/mob_can_equip(M as mob, slot)
|
||||
/obj/item/weapon/gun/mob_can_equip(M as mob, slot, disable_warning, ignore_blocked)
|
||||
//Cannot equip wielded items.
|
||||
if(is_wieldable)
|
||||
if(wielded)
|
||||
to_chat(M, "<span class='warning'>Lower the [initial(name)] first!</span>")
|
||||
if(!disable_warning) // unfortunately not sure there's a way to get this to only fire once when it's looped
|
||||
to_chat(M, "<span class='warning'>Lower the [initial(name)] first!</span>")
|
||||
return 0
|
||||
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user