diff --git a/code/datums/components/traits/unlucky.dm b/code/datums/components/traits/unlucky.dm index 1f558b9a66f..a057670d213 100644 --- a/code/datums/components/traits/unlucky.dm +++ b/code/datums/components/traits/unlucky.dm @@ -163,6 +163,8 @@ return if(vorish) + if(living_guy.stat >= DEAD) // Make sure they're alive, else it might end up with insta-digestion + return for(var/mob/living/living_mob in the_turf) if(living_mob == our_guy || (living_mob.vore_selected == living_guy.vore_selected)) continue //Don't do anything to ourselves. @@ -212,18 +214,23 @@ to_chat(living_guy, span_warning("[evil_light] glows ominously...")) // ominously evil_light.visible_message(span_boldwarning("[evil_light] suddenly flares brightly and sparks!")) - //evil_light.broken(skip_sound_and_sparks = FALSE) //Let's not break it actually. + evil_light.broken(skip_sound_and_sparks = FALSE) // LET'S BREAK IT ACTUALLY evil_light.Beam(living_guy, icon_state = "lightning[rand(1,12)]", time = 0.5 SECONDS) - living_guy.electrocute_act(35 * (damage_mod * 0.5), evil_light, stun = TRUE) //Stun is binary and scales on damage..Lame. - living_guy.emote("scream") + if(living_guy.electrocute_act(35 * (damage_mod * 0.5), evil_light, stun = TRUE)) //Stun is binary and scales on damage..Lame.) + living_guy.emote("scream") consume_omen() return for(var/obj/machinery/vending/darth_vendor in the_turf) - if(darth_vendor.stat & (BROKEN|NOPOWER)) - continue - darth_vendor.visible_message(span_warning("[darth_vendor] suddenly clunks and the delivery chute raises up!")) - darth_vendor.throw_item(living_guy) + if(prob(50)) + if(darth_vendor.stat & (BROKEN|NOPOWER)) + continue + darth_vendor.visible_message(span_warning("[darth_vendor] suddenly clunks and the delivery chute raises up!")) + darth_vendor.throw_item(living_guy) + else + if(darth_vendor.tilted || !darth_vendor.density) + continue + darth_vendor.crush_under(living_guy) consume_omen() return @@ -279,7 +286,7 @@ for(var/obj/structure/table/evil_table in the_turf) if(!evil_table.material) //We only want tables, not just table frames. continue - if(!prob(10)) //Reduce the chance further, due to the number of tables that are passed in normal play. + if(prob(90)) //Reduce the chance further, due to the number of tables that are passed in normal play. continue living_guy.visible_message(span_danger("[living_guy] stubs [living_guy.p_their()] toe on [evil_table]!"), span_bolddanger("You stub your toe on [evil_table]!")) living_guy.apply_damage(2 * damage_mod, BRUTE, pick(BP_L_FOOT, BP_R_FOOT), used_weapon = "blunt force trauma") diff --git a/code/datums/elements/lootable/_lootable.dm b/code/datums/elements/lootable/_lootable.dm index 65fd39a6669..ba955ae46c2 100644 --- a/code/datums/elements/lootable/_lootable.dm +++ b/code/datums/elements/lootable/_lootable.dm @@ -54,10 +54,10 @@ var/obj/item/loot = null var/span = "notice" // Blue - if(HAS_TRAIT(L, TRAIT_UNLUCKY) && unlucky_loot.len) // If you're unlucky, you will always find bad stuff. + if(HAS_TRAIT(L, TRAIT_UNLUCKY) && unlucky_loot.len && prob(15)) // If you're unlucky, you will probably find bad stuff. loot = produce_unlucky_item(source) span = "cult" // Purple and bold. - if(prob(1)) + if(prob(6)) to_chat(L, span_danger("You cut your hand on something in the trash!")) L.apply_damage(2, BRUTE, pick(BP_L_HAND, BP_R_HAND), used_weapon = "sharp object") var/datum/disease/advance/random/random_disease = new /datum/disease/advance/random() diff --git a/code/game/gamemodes/events/clang.dm b/code/game/gamemodes/events/clang.dm index 3ac0280a2b9..9c02406c20f 100644 --- a/code/game/gamemodes/events/clang.dm +++ b/code/game/gamemodes/events/clang.dm @@ -114,7 +114,7 @@ qdel(src) return - if(prob(10) && !has_hunted_unlucky) + if(!has_hunted_unlucky) hunt_unlucky() /obj/effect/immovablerod/proc/hunt_unlucky() @@ -122,7 +122,7 @@ if(HAS_TRAIT(unlucky_bugger, TRAIT_UNLUCKY)) has_hunted_unlucky = TRUE walk(src, 0) - //stone_grinding.ogg + playsound(src, 'sound/effects/stone_grind.ogg', 75) addtimer(CALLBACK(src, PROC_REF(fetch_boy), unlucky_bugger), 1 SECOND, TIMER_DELETE_ME) break diff --git a/code/modules/economy/vending.dm b/code/modules/economy/vending.dm index 547de5b0b2c..63b2a6f1594 100644 --- a/code/modules/economy/vending.dm +++ b/code/modules/economy/vending.dm @@ -78,6 +78,7 @@ var/req_log_access = ACCESS_CARGO //default access for checking logs is cargo var/has_logs = 0 //defaults to 0, set to anything else for vendor to have logs var/can_rotate = 1 //Defaults to yes, can be set to 0 for vendors without or with unwanted directionals. + var/tilted = FALSE /obj/machinery/vending/Initialize(mapload) @@ -358,6 +359,16 @@ GLOBAL_LIST_EMPTY(vending_products) if(shock(user, 100)) return + if(tilted) + balloon_alert(user, "setting upright") + if(do_after(user, 2 SECONDS, src)) + tilt(TRUE) + return + + if(user.a_intent == I_HURT && density) + punch_machine(user) + return + wires.Interact(user) tgui_interact(user) @@ -744,4 +755,50 @@ GLOBAL_LIST_EMPTY(vending_products) visible_message(span_warning("\The [src] launches \a [throw_item] at \the [target]!")) return 1 +/obj/machinery/vending/proc/crush_under(mob/living/unlucky) + if(!unlucky) + return + visible_message(span_warning("\The [src] tilts over, falling on [unlucky]!")) + forceMove(get_turf(unlucky)) + for(var/mob/living/mob in get_turf(unlucky)) + mob.take_overall_damage(30) + mob.Stun(2) + mob.Weaken(5) + tilt() + +/obj/machinery/vending/proc/tilt(upright = FALSE) + if(!upright) + var/matrix/M = matrix() + M.Turn(90) + animate(src, transform = M, time = 0.25 SECOND) + playsound(src, 'sound/effects/meteorimpact.ogg', 50, 1) + tilted = TRUE + anchored = FALSE + plane = ABOVE_MOB_PLANE + else + animate(src, transform = matrix(), time = 0.4 SECOND) + tilted = FALSE + plane = initial(plane) + +/obj/machinery/vending/proc/punch_machine(mob/living/stupid_person) + stupid_person.visible_message(span_danger("[stupid_person] kicks \the [src]!"), span_danger("You kick \the [src]")) + playsound(src, 'sound/effects/clang2.ogg', 25, TRUE) + animate_shake() + + if(prob(10)) + crush_under(stupid_person) + return + + if(prob(5)) + var/obj/item/throw_item = null + for(var/datum/stored_item/vending_product/R in shuffle(product_records)) + throw_item = R.get_product(loc) + if(!throw_item) + continue + break + if(!throw_item) + return FALSE + throw_item.vendor_action(src) + playsound(src, vending_sound, 50, TRUE) + //Actual machines are in vending_machines.dm diff --git a/sound/effects/stone_grind.ogg b/sound/effects/stone_grind.ogg new file mode 100644 index 00000000000..8ce424fea81 Binary files /dev/null and b/sound/effects/stone_grind.ogg differ