/obj/structure icon = 'icons/obj/structures.dmi' var/climbable var/breakable var/parts /obj/structure/proc/destroy() if(parts) new parts(loc) density = 0 del(src) /obj/structure/attack_hand(mob/user) if(breakable) if(HULK in user.mutations) user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) visible_message("[user] smashes the [src] apart!") destroy() else if(istype(user,/mob/living/carbon/human)) var/mob/living/carbon/human/H = user if(H.species.can_shred(user)) visible_message("[H] slices [src] apart!") destroy() /obj/structure/attack_animal(mob/living/user) if(breakable) if(user.wall_smash) visible_message("[user] smashes [src] apart!") destroy() /obj/structure/attack_paw(mob/user) if(breakable) attack_hand(user) /obj/structure/blob_act() if(prob(50)) del(src) /obj/structure/meteorhit(obj/O as obj) destroy(src) /obj/structure/attack_tk() return /obj/structure/ex_act(severity) switch(severity) if(1.0) del(src) return if(2.0) if(prob(50)) del(src) return if(3.0) return /obj/structure/meteorhit(obj/O as obj) del(src) /obj/structure/New() ..() if(climbable) verbs += /obj/structure/proc/climb_on /obj/structure/proc/climb_on() set name = "Climb structure" set desc = "Climbs onto a structure." set category = "Object" set src in oview(1) do_climb(usr) /obj/structure/MouseDrop_T(mob/target, mob/user) var/mob/living/H = user if(!istype(H) || target != user) // No making other people climb onto tables. return do_climb(target) /obj/structure/proc/do_climb(var/mob/living/user) if (!can_touch(user) || !climbable) return var/turf/T = src.loc if(!T || !istype(T)) return for(var/obj/O in T.contents) if(istype(O,/obj/structure)) var/obj/structure/S = O if(S.climbable) continue if(O && O.density) usr << "\red There's \a [O] in the way." return usr.visible_message("[user] starts climbing onto \the [src]!") if(!do_after(user,50)) return if (!can_touch(user) || !climbable) return for(var/obj/O in T.contents) if(istype(O,/obj/structure)) var/obj/structure/S = O if(S.climbable) continue if(O && O.density) usr << "\red There's \a [O] in the way." return usr.loc = get_turf(src) if (get_turf(user) == get_turf(src)) usr.visible_message("[user] climbs onto \the [src]!") /obj/structure/proc/structure_shaken() for(var/mob/living/M in get_turf(src)) if(M.lying) return //No spamming this on people. M.Weaken(5) M << "\red You topple as \the [src] moves under you!" if(prob(25)) var/damage = rand(15,30) var/mob/living/carbon/human/H = M if(!istype(H)) H << "\red You land heavily!" M.adjustBruteLoss(damage) return var/datum/organ/external/affecting switch(pick(list("ankle","wrist","head","knee","elbow"))) if("ankle") affecting = H.get_organ(pick("l_foot", "r_foot")) if("knee") affecting = H.get_organ(pick("l_leg", "r_leg")) if("wrist") affecting = H.get_organ(pick("l_hand", "r_hand")) if("elbow") affecting = H.get_organ(pick("l_arm", "r_arm")) if("head") affecting = H.get_organ("head") if(affecting) M << "\red You land heavily on your [affecting.display_name]!" affecting.take_damage(damage, 0) if(affecting.parent) affecting.parent.add_autopsy_data("Misadventure", damage) else H << "\red You land heavily!" H.adjustBruteLoss(damage) H.UpdateDamageIcon() H.updatehealth() return /obj/structure/proc/can_touch(var/mob/user) if (!user) return 0 if(!Adjacent(user)) return 0 if (user.restrained() || user.buckled) user << "You need your hands and legs free for this." return 0 if (user.stat || user.paralysis || user.sleeping || user.lying || user.weakened) return 0 if (issilicon(user)) user << "You need hands for this." return 0 return 1