Welcome agent, congratulations on your new position as contractor. On top of your already assigned objectives, + this kit will provide you contracts to take on for TC payments.
+Provided within, we give your specialist contractor space suit. It's even more compact, being able to fit into a pocket, and faster than the + Syndicate space suit available to you on the uplink. We also provide your chameleon jumpsuit and mask, both of which can be changed + to any form you need for the moment. The cigarettes are a special blend - it'll heal your injuries slowly overtime.
+The three additional items, apart from the tablet and loadout box, have been randomly selected from what we had available. We hope + they're useful to you for you mission.
+The contractor hub, available at the top right of the uplink, will provide you unique items and abilities. These are bought using Contractor Rep, + with two Rep being provided each time you complete a contract.
+Be careful when accepting a contract. While you'll be able to see the location of the dropoff point, cancelling will make it + unavailable to take on again.
+The tablet can also be recharged at any cell charger.
+We need your target for our own reasons, but we ransom them back to your mission area once their use is served. They will return back + from where you sent them off from in several minutes time. You will be paid in TC for your services.
+ +Good luck agent. You can burn this document with the supplied lighter.
"} + + return ..() + +/obj/item/storage/box/syndicate/contractor_loadout/PopulateContents() + new /obj/item/clothing/head/helmet/space/syndicate/contract(src) + new /obj/item/clothing/suit/space/syndicate/contract(src) + new /obj/item/clothing/under/chameleon(src) + new /obj/item/clothing/mask/chameleon(src) + new /obj/item/card/id/syndicate(src) + new /obj/item/storage/fancy/cigarettes/cigpack_syndicate(src) + new /obj/item/lighter(src) + +/obj/item/storage/box/syndie_kit/contract_kit/PopulateContents() + new /obj/item/modular_computer/tablet/syndicate_contract_uplink/preset/uplink(src) + new /obj/item/storage/box/syndicate/contractor_loadout(src) + new /obj/item/melee/classic_baton/telescopic/contractor_baton(src) + var/list/item_list = list( // All 4 TC or less - some nukeops only items, but fit nicely to the theme. + /obj/item/storage/backpack/duffelbag/syndie/x4, + /obj/item/storage/box/syndie_kit/throwing_weapons, + /obj/item/gun/syringe/syndicate, + /obj/item/pen/edagger, + /obj/item/pen/sleepy, + /obj/item/flashlight/emp, + /obj/item/reagent_containers/syringe/mulligan, + /obj/item/clothing/shoes/chameleon/noslip, + /obj/item/storage/firstaid/tactical, + /obj/item/storage/backpack/duffelbag/syndie/surgery, + /obj/item/encryptionkey/syndicate, + /obj/item/clothing/glasses/thermal/syndi, + /obj/item/slimepotion/slime/sentience/nuclear, + /obj/item/storage/box/syndie_kit/imp_radio, + /obj/item/storage/box/syndie_kit/imp_uplink, + /obj/item/clothing/gloves/krav_maga/combatglovesplus, + /obj/item/gun/ballistic/automatic/c20r/toy/unrestricted/riot, + /obj/item/reagent_containers/syringe/stimulants, + /obj/item/storage/box/syndie_kit/imp_freedom, + /obj/item/toy/eightball/haunted + ) + var/obj/item1 = pick_n_take(item_list) + var/obj/item2 = pick_n_take(item_list) + var/obj/item3 = pick_n_take(item_list) + new item1(src) // Create three, non repeat items from the list. + new item2(src) + new item3(src) + new /obj/item/paper/contractor_guide(src) //Paper guide \ No newline at end of file diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index c48122fb0e..78ba6d4f5f 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -191,7 +191,7 @@ if(!disarming) if(knockdown) - L.Knockdown(50, override_stamdmg = 0) //knockdown + L.DefaultCombatKnockdown(50, override_stamdmg = 0) //knockdown L.adjustStaminaLoss(stunpwr) else L.drop_all_held_items() //no knockdown/stamina damage, instead disarm. @@ -218,7 +218,7 @@ user.visible_message("[user] accidentally hits [user.p_them()]self with [src]!", \ "You accidentally hit yourself with [src]!") SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK) - user.Knockdown(stamforce*6) + user.DefaultCombatKnockdown(stamforce*6) playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1) deductcharge(hitcost) diff --git a/code/game/objects/items/teleprod.dm b/code/game/objects/items/teleprod.dm index bab4d6a488..63bde36976 100644 --- a/code/game/objects/items/teleprod.dm +++ b/code/game/objects/items/teleprod.dm @@ -16,7 +16,7 @@ user.visible_message("[user] accidentally hits [user.p_them()]self with [src]!", \ "You accidentally hit yourself with [src]!") SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK) - user.Knockdown(stamforce * 6) + user.DefaultCombatKnockdown(stamforce * 6) playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1) if(do_teleport(user, get_turf(user), 50, channel = TELEPORT_CHANNEL_BLUESPACE)) deductcharge(hitcost) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 1a5f97c4e0..ba51fa3d65 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -228,26 +228,39 @@ var/hacked = FALSE total_mass = 0.4 var/total_mass_on = TOTAL_MASS_TOY_SWORD + var/activation_sound = 'sound/weapons/saberon.ogg' + var/deactivation_sound = 'sound/weapons/saberoff.ogg' + var/activation_message = "You extend the plastic blade with a quick flick of your wrist." + var/deactivation_message = "You push the plastic blade back down into the handle." + var/transform_volume = 20 /obj/item/toy/sword/attack_self(mob/user) - active = !( active ) + active = !active if (active) - to_chat(user, "You extend the plastic blade with a quick flick of your wrist.") - playsound(user, 'sound/weapons/saberon.ogg', 20, 1) + to_chat(user, "[activation_message]") + playsound(user, activation_sound, transform_volume, 1) + w_class = WEIGHT_CLASS_BULKY + AddElement(/datum/element/sword_point) + else + to_chat(user, "[deactivation_message]") + playsound(user, deactivation_sound, transform_volume, 1) + w_class = WEIGHT_CLASS_SMALL + RemoveElement(/datum/element/sword_point) + + update_icon() + add_fingerprint(user) + +/obj/item/toy/sword/update_icon_state() + if(active) if(hacked) icon_state = "swordrainbow" item_state = "swordrainbow" else icon_state = "swordblue" item_state = "swordblue" - w_class = WEIGHT_CLASS_BULKY else - to_chat(user, "You push the plastic blade back down into the handle.") - playsound(user, 'sound/weapons/saberoff.ogg', 20, 1) icon_state = "sword0" item_state = "sword0" - w_class = WEIGHT_CLASS_SMALL - add_fingerprint(user) // Copied from /obj/item/melee/transforming/energy/sword/attackby /obj/item/toy/sword/attackby(obj/item/W, mob/living/user, params) @@ -270,7 +283,7 @@ to_chat(user, "RNBW_ENGAGE") if(active) - icon_state = "swordrainbow" + update_icon() user.update_inv_hands() else to_chat(user, "It's already fabulous!") @@ -290,38 +303,24 @@ w_class = WEIGHT_CLASS_SMALL attack_verb = list("poked", "jabbed", "hit") light_color = "#37FFF7" + activation_sound = 'sound/weapons/nebon.ogg' + deactivation_sound = 'sound/weapons/neboff.ogg' + transform_volume = 50 + activation_message = "You activate the holographic blade with a press of a button." + deactivation_message = "You deactivate the holographic blade with a press of a button." var/light_brightness = 3 actions_types = list() -/obj/item/toy/sword/cx/alt_pre_attack(atom/A, mob/living/user, params) //checks if it can do right click memes - altafterattack(A, user, TRUE, params) - return TRUE - -/obj/item/toy/sword/cx/altafterattack(atom/target, mob/living/carbon/user, proximity_flag, click_parameters) //does right click memes - if(istype(user)) - user.visible_message("[user] points the tip of [src] at [target].", "You point the tip of [src] at [target].") - return TRUE +/obj/item/toy/sword/cx/ComponentInitialize() + . = ..() + AddElement(/datum/element/update_icon_updates_onmob) /obj/item/toy/sword/cx/attack_self(mob/user) - active = !( active ) + . = ..() + set_light(active ? light_brightness : 0) - if (active) - to_chat(user, "You activate the holographic blade with a press of a button.") - playsound(user, 'sound/weapons/nebon.ogg', 50, 1) - w_class = WEIGHT_CLASS_BULKY - attack_verb = list("slashed", "stabbed", "ravaged") - set_light(light_brightness) - update_icon() - - else - to_chat(user, "You deactivate the holographic blade with a press of a button.") - playsound(user, 'sound/weapons/neboff.ogg', 50, 1) - w_class = WEIGHT_CLASS_SMALL - attack_verb = list("poked", "jabbed", "hit") - set_light(0) - update_icon() - - add_fingerprint(user) +/obj/item/toy/sword/cx/update_icon_state() + return /obj/item/toy/sword/cx/update_overlays() . = ..() @@ -1079,8 +1078,13 @@ else return ..() -/obj/item/toy/cards/singlecard/attack_self(mob/user) - if(usr.stat || !ishuman(usr) || !usr.canmove || usr.restrained()) +/obj/item/toy/cards/singlecard/attack_self(mob/living/user) + . = ..() + if(.) + return + if(!ishuman(user)) + return + if(!CHECK_MOBILITY(user, MOBILITY_USE)) return Flip() diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index 23bd6ed359..11a06e149d 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -396,6 +396,7 @@ hitsound = 'sound/weapons/blade1.ogg' START_PROCESSING(SSobj, src) set_light(brightness_on) + AddElement(/datum/element/sword_point) /obj/item/twohanded/dualsaber/unwield() //Specific unwield () to switch hitsounds. sharpness = initial(sharpness) @@ -405,6 +406,7 @@ hitsound = "swing_hit" STOP_PROCESSING(SSobj, src) set_light(0) + RemoveElement(/datum/element/sword_point) /obj/item/twohanded/dualsaber/process() if(wielded) @@ -493,15 +495,6 @@ . = ..() AddElement(/datum/element/update_icon_updates_onmob) -/obj/item/twohanded/dualsaber/hypereutactic/alt_pre_attack(atom/A, mob/living/user, params) //checks if it can do right click memes - altafterattack(A, user, TRUE, params) - return TRUE - -/obj/item/twohanded/dualsaber/hypereutactic/altafterattack(atom/target, mob/living/user, proximity_flag, click_parameters) //does right click memes - if(istype(user)) - user.visible_message("[user] points the tip of [src] at [target].", "You point the tip of [src] at [target].") - return TRUE - /obj/item/twohanded/dualsaber/hypereutactic/update_icon_state() return @@ -605,6 +598,8 @@ /obj/item/twohanded/spear/Initialize() . = ..() AddComponent(/datum/component/butchering, 100, 70) //decent in a pinch, but pretty bad. + AddComponent(/datum/component/jousting) + AddElement(/datum/element/sword_point) /obj/item/twohanded/spear/attack_self(mob/user) if(explosive) @@ -630,10 +625,6 @@ return BRUTELOSS return BRUTELOSS -/obj/item/twohanded/spear/Initialize() - . = ..() - AddComponent(/datum/component/jousting) - /obj/item/twohanded/spear/examine(mob/user) . = ..() if(explosive) @@ -818,6 +809,9 @@ armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30) resistance_flags = FIRE_PROOF +/obj/item/twohanded/pitchfork/Initialize(mapload) + AddElement(/datum/element/sword_point) + /obj/item/twohanded/pitchfork/demonic name = "demonic pitchfork" desc = "A red pitchfork, it looks like the work of the devil." @@ -901,6 +895,7 @@ /obj/item/twohanded/vibro_weapon/Initialize() . = ..() AddComponent(/datum/component/butchering, 20, 105) + AddElement(/datum/element/sword_point) /obj/item/twohanded/vibro_weapon/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) if(wielded) diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 7499d9de09..bc9c3255a6 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -74,6 +74,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 /obj/item/claymore/Initialize() . = ..() AddComponent(/datum/component/butchering, 40, 105) + AddElement(/datum/element/sword_point) /obj/item/claymore/suicide_act(mob/user) user.visible_message("[user] is falling on [src]! It looks like [user.p_theyre()] trying to commit suicide!") @@ -346,25 +347,6 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 user.visible_message("[user] is slitting [user.p_their()] own throat with [src]! It looks like [user.p_theyre()] trying to commit suicide!") return (BRUTELOSS) -/obj/item/switchblade/crafted - icon_state = "switchblade_ms" - desc = "A concealable spring-loaded knife." - force = 2 - throwforce = 3 - extended_force = 15 - extended_throwforce = 18 - extended_icon_state = "switchblade_ext_ms" - retracted_icon_state = "switchblade_ms" - -/obj/item/switchblade/crafted/attackby(obj/item/I, mob/user, params) - . = ..() - if(istype(I, /obj/item/stack/sheet/mineral/silver)) - icon_state = extended ? "switchblade_ext_msf" : "switchblade_msf" - extended_icon_state = "switchblade_ext_msf" - retracted_icon_state = "switchblade_msf" - icon_state = "switchblade_msf" - to_chat(user, "You use part of the silver to improve your Switchblade. Stylish!") - /obj/item/phone name = "red phone" desc = "Should anything ever go wrong..." diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 1d36b2b41b..e185defc0a 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -33,7 +33,7 @@ if(structureclimber && structureclimber != user) user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src) - structureclimber.Knockdown(40) + structureclimber.DefaultCombatKnockdown(40) structureclimber.visible_message("[structureclimber] has been knocked off [src].", "You're knocked off [src]!", "You see [structureclimber] get knocked off [src].") /obj/structure/ui_act(action, params) @@ -45,7 +45,8 @@ if(!climbable) return if(user == O && iscarbon(O)) - if(user.canmove) + var/mob/living/L = O + if(CHECK_MOBILITY(L, MOBILITY_MOVE)) climb_structure(user) return if(!istype(O, /obj/item) || user.get_active_held_item() != O) diff --git a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm index 0d38f5eca6..e0c2d6e2c7 100644 --- a/code/game/objects/structures/beds_chairs/chair.dm +++ b/code/game/objects/structures/beds_chairs/chair.dm @@ -110,7 +110,7 @@ user.visible_message("[user] pulls [src] out from under [poordude].", "You pull [src] out from under [poordude].") var/C = new item_chair(loc) user.put_in_hands(C) - poordude.Knockdown(20)//rip in peace + poordude.DefaultCombatKnockdown(20)//rip in peace user.adjustStaminaLoss(5) unbuckle_all_mobs(TRUE) qdel(src) @@ -153,7 +153,7 @@ ///Material chair /obj/structure/chair/greyscale icon_state = "chair_greyscale" - material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR + material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS item_chair = /obj/item/chair/greyscale buildstacktype = null //Custom mats handle this @@ -226,9 +226,15 @@ /obj/structure/chair/comfy/black color = rgb(167,164,153) +/obj/structure/chair/comfy/green + color = rgb(81,173,106) + /obj/structure/chair/comfy/lime color = rgb(255,251,0) +/obj/structure/chair/comfy/purple + color = rgb(255,50,230) + /obj/structure/chair/comfy/plywood name = "plywood chair" desc = "A relaxing plywood chair." @@ -371,13 +377,13 @@ if(iscarbon(target)) var/mob/living/carbon/C = target if(C.health < C.maxHealth*0.5) - C.Knockdown(20) + C.DefaultCombatKnockdown(20) smash(user) /obj/item/chair/greyscale icon_state = "chair_greyscale_toppled" item_state = "chair_greyscale" - material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR + material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS origin_type = /obj/structure/chair/greyscale /obj/item/chair/stool @@ -576,40 +582,3 @@ . = ..() if(has_gravity()) playsound(src, 'sound/machines/clockcult/integration_cog_install.ogg', 50, TRUE) - -/obj/structure/chair/sofa - name = "old ratty sofa" - icon_state = "sofamiddle" - icon = 'icons/obj/sofa.dmi' - buildstackamount = 1 - var/mutable_appearance/armrest - -/obj/structure/chair/sofa/Initialize() - armrest = mutable_appearance(icon, "[icon_state]_armrest", ABOVE_MOB_LAYER) - return ..() - -/obj/structure/chair/sofa/post_buckle_mob(mob/living/M) - . = ..() - update_armrest() - -/obj/structure/chair/sofa/proc/update_armrest() - if(has_buckled_mobs()) - add_overlay(armrest) - else - cut_overlay(armrest) - -/obj/structure/chair/sofa/post_unbuckle_mob() - . = ..() - update_armrest() - -/obj/structure/chair/sofa/left - icon_state = "sofaend_left" - -/obj/structure/chair/sofa/right - icon_state = "sofaend_right" - -/obj/structure/chair/sofa/corner - icon_state = "sofacorner" - -/obj/structure/chair/sofa/corner/handle_layer() //only the armrest/back of this chair should cover the mob. - return diff --git a/code/game/objects/structures/beds_chairs/pew.dm b/code/game/objects/structures/beds_chairs/pew.dm index 65440fb5d8..ec257a9898 100644 --- a/code/game/objects/structures/beds_chairs/pew.dm +++ b/code/game/objects/structures/beds_chairs/pew.dm @@ -10,7 +10,7 @@ item_chair = null /obj/structure/chair/pew/left - name = "left wooden pew end" + name = "wooden pew end" icon_state = "pewend_left" var/mutable_appearance/leftpewarmrest @@ -41,7 +41,7 @@ update_leftpewarmrest() /obj/structure/chair/pew/right - name = "left wooden pew end" + name = "wooden pew end" icon_state = "pewend_right" var/mutable_appearance/rightpewarmrest diff --git a/code/game/objects/structures/beds_chairs/sofa.dm b/code/game/objects/structures/beds_chairs/sofa.dm new file mode 100644 index 0000000000..e138e4d314 --- /dev/null +++ b/code/game/objects/structures/beds_chairs/sofa.dm @@ -0,0 +1,52 @@ +/obj/structure/chair/sofa + name = "old ratty sofa" + icon_state = "sofamiddle" + icon = 'icons/obj/sofa.dmi' + buildstackamount = 1 + var/mutable_appearance/armrest + +/obj/structure/chair/sofa/Initialize() + armrest = mutable_appearance(icon, "[icon_state]_armrest", ABOVE_MOB_LAYER) + return ..() + +/obj/structure/chair/sofa/post_buckle_mob(mob/living/M) + . = ..() + update_armrest() + +/obj/structure/chair/sofa/proc/update_armrest() + if(has_buckled_mobs()) + add_overlay(armrest) + else + cut_overlay(armrest) + +/obj/structure/chair/sofa/post_unbuckle_mob() + . = ..() + update_armrest() + +/obj/structure/chair/sofa/left + icon_state = "sofaend_left" + +/obj/structure/chair/sofa/right + icon_state = "sofaend_right" + +/obj/structure/chair/sofa/corner + icon_state = "sofacorner" + +/obj/structure/chair/sofa/corner/handle_layer() //only the armrest/back of this chair should cover the mob. + return + +// Credit for the sprites goes to CEV Eris. The sprites were taken from Hyper Station and modified to fit with armrests which were also added. + +/obj/structure/chair/sofa/corp + name = "sofa" + desc = "Soft, cushy and cozy. These sofas reek of bland faceless corporatism, but they aren't old and ratty at least." + icon_state = "corp_sofamiddle" + +/obj/structure/chair/sofa/corp/left + icon_state = "corp_sofaend_left" + +/obj/structure/chair/sofa/corp/right + icon_state = "corp_sofaend_right" + +/obj/structure/chair/sofa/corp/corner + icon_state = "corp_sofacorner" diff --git a/code/game/objects/structures/chess.dm b/code/game/objects/structures/chess.dm new file mode 100644 index 0000000000..8254405fee --- /dev/null +++ b/code/game/objects/structures/chess.dm @@ -0,0 +1,76 @@ +/obj/structure/chess + anchored = FALSE + density = FALSE + icon = 'icons/obj/chess.dmi' + icon_state = "singularity_s1" + name = "Singularity" + desc = "You've just been pranked by the Syndicate Chess Grandmaster! Report this to CentCom." + max_integrity = 100 + +/obj/structure/chess/wrench_act(mob/user, obj/item/tool) + to_chat(user, "You take apart the chess piece.") + var/obj/item/stack/sheet/metal/M = new (drop_location(), 2) + M.add_fingerprint(user) + tool.play_tool_sound(src) + qdel(src) + return TRUE + +/obj/structure/chess/whitepawn + name = "\improper White Pawn" + desc = "A white pawn chess piece. Get accused of cheating when executing a sick En Passant." + icon_state = "white_pawn" + +/obj/structure/chess/whiterook + name = "\improper White Rook" + desc = "A white rook chess piece. Also known as a castle. Can move any number of tiles in a straight line. It has a special move called castling." + icon_state = "white_rook" + +/obj/structure/chess/whiteknight + name = "\improper White Knight" + desc = "A white knight chess piece. Hah. It can hop over other pieces, moving in L shapes." + icon_state = "white_knight" + +/obj/structure/chess/whitebishop + name = "\improper White Bishop" + desc = "A white bishop chess piece. It can move any number of tiles in a diagonal line." + icon_state = "white_bishop" + +/obj/structure/chess/whitequeen + name = "\improper White Queen" + desc = "A white queen chess piece. It can move any number of tiles in diagonal and straight lines." + icon_state = "white_queen" + +/obj/structure/chess/whiteking + name = "\improper White King" + desc = "A white king chess piece. It can move any tile in one direction." + icon_state = "white_king" + +/obj/structure/chess/blackpawn + name = "\improper Black Pawn" + desc = "A black pawn chess piece. Get accused of cheating when executing a sick En Passant." + icon_state = "black_pawn" + +/obj/structure/chess/blackrook + name = "\improper Black Rook" + desc = "A black rook chess piece. Also known as a castle. Can move any number of tiles in a straight line. It has a special move called castling." + icon_state = "black_rook" + +/obj/structure/chess/blackknight + name = "\improper Black Knight" + desc = "A black knight chess piece. It can hop over other pieces, moving in L shapes." + icon_state = "black_knight" + +/obj/structure/chess/blackbishop + name = "\improper Black Bishop" + desc = "A black bishop chess piece. It can move any number of tiles in a diagonal line." + icon_state = "black_bishop" + +/obj/structure/chess/blackqueen + name = "\improper Black Queen" + desc = "A black queen chess piece. It can move any number of tiles in diagonal and straight lines." + icon_state = "black_queen" + +/obj/structure/chess/blackking + name = "\improper Black King" + desc = "A black king chess piece. It can move one tile in any direction." + icon_state = "black_king" \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index f95f900a48..c932dd96e8 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -431,7 +431,7 @@ "You hear a loud metal bang.") var/mob/living/L = O if(!issilicon(L)) - L.Knockdown(40) + L.DefaultCombatKnockdown(40) O.forceMove(T) close() else @@ -474,8 +474,9 @@ set category = "Object" set name = "Toggle Open" - if(!usr.canmove || usr.stat || usr.restrained()) - return + var/mob/living/L = usr + if(!istype(L) || !CHECK_MOBILITY(L, MOBILITY_USE)) + return FALSE if(iscarbon(usr) || issilicon(usr) || isdrone(usr)) return attack_hand(usr) @@ -510,7 +511,7 @@ user.visible_message("[src] begins to shake violently!", \ "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear banging from [src].") - if(do_after(user,(breakout_time), target = src)) + if(do_after(user,(breakout_time), target = src, required_mobility_flags = MOBILITY_RESIST)) if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded) ) return //we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting @@ -603,12 +604,12 @@ step_towards(user, T2) T1 = get_turf(user) if(T1 == T2) - user.resting = TRUE //so people can jump into crates without slamming the lid on their head + user.set_resting(TRUE, TRUE) if(!close(user)) to_chat(user, "You can't get [src] to close!") - user.resting = FALSE + user.set_resting(FALSE, TRUE) return - user.resting = FALSE + user.set_resting(FALSE, TRUE) togglelock(user) T1.visible_message("[user] dives into [src]!") diff --git a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm index 645d1e5d7a..ae2e1a070a 100644 --- a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm +++ b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm @@ -18,8 +18,8 @@ var/egged = 0 var/use_mob_movespeed = FALSE //Citadel adds snowflake box handling -/obj/structure/closet/cardboard/relaymove(mob/user, direction) - if(opened || move_delay || user.stat || user.IsStun() || user.IsKnockdown() || user.IsUnconscious() || !isturf(loc) || !has_gravity(loc)) +/obj/structure/closet/cardboard/relaymove(mob/living/user, direction) + if(opened || move_delay || !CHECK_MOBILITY(user, MOBILITY_MOVE) || !isturf(loc) || !has_gravity(loc)) return move_delay = TRUE var/oldloc = loc diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index b14303984e..4f6d6729fc 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -83,9 +83,12 @@ desc = "It's a burial receptacle for the dearly departed." icon_state = "coffin" resistance_flags = FLAMMABLE + can_weld_shut = FALSE + breakout_time = 200 max_integrity = 70 material_drop = /obj/item/stack/sheet/mineral/wood material_drop_amount = 5 + var/pryLidTimer = 250 /obj/structure/closet/crate/coffin/examine(mob/user) . = ..() diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index ebac89579b..05a7e1c958 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -139,7 +139,7 @@ src.visible_message(text("[M] falls free of [src]!")) unbuckle_mob(M,force=1) M.emote("scream") - M.AdjustKnockdown(20) + M.DefaultCombatKnockdown(20) /obj/structure/kitchenspike/Destroy() if(has_buckled_mobs()) diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm index df6d033af4..bdc7825feb 100644 --- a/code/game/objects/structures/musician.dm +++ b/code/game/objects/structures/musician.dm @@ -1,7 +1,7 @@ #define MUSICIAN_HEARCHECK_MINDELAY 4 #define MUSIC_MAXLINES 600 -#define MUSIC_MAXLINECHARS 50 +#define MUSIC_MAXLINECHARS 150 /datum/song var/name = "Untitled" @@ -82,7 +82,7 @@ /datum/song/proc/shouldStopPlaying(mob/user) if(instrumentObj) - if(!user.canUseTopic(instrumentObj)) + if(!user.canUseTopic(instrumentObj, TRUE, FALSE, FALSE, FALSE)) return TRUE return !instrumentObj.anchored // add special cases to stop in subclasses else @@ -220,7 +220,7 @@ updateDialog(usr) // make sure updates when complete /datum/song/Topic(href, href_list) - if(!usr.canUseTopic(instrumentObj)) + if(!usr.canUseTopic(instrumentObj, TRUE, FALSE, FALSE, FALSE)) usr << browse(null, "window=instrument") usr.unset_machine() return diff --git a/code/game/objects/structures/petrified_statue.dm b/code/game/objects/structures/petrified_statue.dm index 65ffb7e2e5..a8a5a577c2 100644 --- a/code/game/objects/structures/petrified_statue.dm +++ b/code/game/objects/structures/petrified_statue.dm @@ -49,7 +49,7 @@ if(S.mind) if(petrified_mob) S.mind.transfer_to(petrified_mob) - petrified_mob.Knockdown(100) + petrified_mob.DefaultCombatKnockdown(100) to_chat(petrified_mob, "You slowly come back to your senses. You are in control of yourself again!") qdel(S) diff --git a/code/game/objects/structures/table_frames.dm b/code/game/objects/structures/table_frames.dm index e3cd053d94..7e2922279b 100644 --- a/code/game/objects/structures/table_frames.dm +++ b/code/game/objects/structures/table_frames.dm @@ -41,7 +41,7 @@ make_new_table(material.tableVariant) else if(material.get_amount() < 1) - to_chat(user, "You need one metal sheet to do this!") + to_chat(user, "You need one sheet to do this!") return to_chat(user, "You start adding [material] to [src]...") if(do_after(user, 20, target = src) && material.use(1)) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 4eba21b8f9..550c0216c6 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -109,8 +109,7 @@ /obj/structure/table/proc/tableplace(mob/living/user, mob/living/pushed_mob) pushed_mob.forceMove(src.loc) - pushed_mob.resting = TRUE - pushed_mob.update_canmove() + pushed_mob.set_resting(TRUE, FALSE) pushed_mob.visible_message("[user] places [pushed_mob] onto [src].", \ "[user] places [pushed_mob] onto [src].") log_combat(user, pushed_mob, "placed") @@ -128,7 +127,7 @@ pushed_mob.pass_flags &= ~PASSTABLE if(pushed_mob.loc != loc) //Something prevented the tabling return - pushed_mob.Knockdown(40) + pushed_mob.DefaultCombatKnockdown(40) pushed_mob.visible_message("[user] slams [pushed_mob] onto [src]!", \ "[user] slams you onto [src]!") log_combat(user, pushed_mob, "tabled", null, "onto [src]") @@ -138,11 +137,11 @@ SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table) /obj/structure/table/shove_act(mob/living/target, mob/living/user) - if(!target.resting) - target.Knockdown(SHOVE_KNOCKDOWN_TABLE) + if(CHECK_MOBILITY(target, MOBILITY_STAND)) + target.DefaultCombatKnockdown(SHOVE_KNOCKDOWN_TABLE) user.visible_message("[user.name] shoves [target.name] onto \the [src]!", "You shove [target.name] onto \the [src]!", null, COMBAT_MESSAGE_RANGE) - target.forceMove(src.loc) + target.forceMove(loc) log_combat(user, target, "shoved", "onto [src] (table)") return TRUE @@ -212,7 +211,7 @@ /obj/structure/table/greyscale icon = 'icons/obj/smooth_structures/table_greyscale.dmi' icon_state = "table" - material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR + material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS buildstack = null //No buildstack, so generate from mat datums /* @@ -270,7 +269,7 @@ debris -= AM if(istype(AM, /obj/item/shard)) AM.throw_impact(L) - L.Knockdown(100) + L.DefaultCombatKnockdown(100) qdel(src) /obj/structure/table/glass/deconstruct(disassembled = TRUE, wrench_disassembly = 0) @@ -568,23 +567,20 @@ break /obj/structure/table/optable/tablepush(mob/living/user, mob/living/pushed_mob) - pushed_mob.forceMove(src.loc) - pushed_mob.resting = 1 - pushed_mob.update_canmove() + pushed_mob.forceMove(loc) + pushed_mob.set_resting(TRUE, TRUE) visible_message("[user] has laid [pushed_mob] on [src].") check_patient() /obj/structure/table/optable/proc/check_patient() - var/mob/M = locate(/mob/living/carbon/human, loc) - if(M) - if(M.resting) - patient = M - return 1 + var/mob/living/carbon/human/H = locate() in loc + if(H) + if(!CHECK_MOBILITY(H, MOBILITY_STAND)) + patient = H + return TRUE else patient = null - return 0 - - + return FALSE /* * Racks @@ -644,7 +640,7 @@ . = ..() if(.) return - if(user.IsKnockdown() || user.resting || user.lying || user.get_num_legs() < 2) + if(CHECK_MULTIPLE_BITFIELDS(user.mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) || user.get_num_legs() < 2) return user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src, ATTACK_EFFECT_KICK) diff --git a/code/game/objects/structures/transit_tubes/station.dm b/code/game/objects/structures/transit_tubes/station.dm index c386726f34..17ca178cd9 100644 --- a/code/game/objects/structures/transit_tubes/station.dm +++ b/code/game/objects/structures/transit_tubes/station.dm @@ -43,10 +43,10 @@ //pod insertion -/obj/structure/transit_tube/station/MouseDrop_T(obj/structure/c_transit_tube_pod/R, mob/user) - if(!user.canmove || user.stat || user.restrained()) +/obj/structure/transit_tube/station/MouseDrop_T(obj/structure/c_transit_tube_pod/R, mob/living/user) + if(!istype(user) || !CHECK_MOBILITY(user, MOBILITY_USE)) return - if (!istype(R) || get_dist(user, src) > 1 || get_dist(src,R) > 1) + if(!istype(R) || get_dist(user, src) > 1 || get_dist(src,R) > 1) return for(var/obj/structure/transit_tube_pod/pod in loc) return //no fun allowed @@ -74,7 +74,7 @@ pod.visible_message("[user] starts putting [GM] into the [pod]!") if(do_after(user, 15, target = src)) if(open_status == STATION_TUBE_OPEN && GM && user.grab_state >= GRAB_AGGRESSIVE && user.pulling == GM && !GM.buckled && !GM.has_buckled_mobs()) - GM.Knockdown(100) + GM.DefaultCombatKnockdown(100) src.Bumped(GM) break else diff --git a/code/game/objects/structures/traps.dm b/code/game/objects/structures/traps.dm index 3f559382f0..fa9c052aa3 100644 --- a/code/game/objects/structures/traps.dm +++ b/code/game/objects/structures/traps.dm @@ -83,7 +83,7 @@ /obj/structure/trap/stun/trap_effect(mob/living/L) L.electrocute_act(30, src, safety=1) // electrocute act does a message. - L.Knockdown(100) + L.DefaultCombatKnockdown(100) /obj/structure/trap/fire name = "flame trap" @@ -92,7 +92,7 @@ /obj/structure/trap/fire/trap_effect(mob/living/L) to_chat(L, "Spontaneous combustion!") - L.Knockdown(20) + L.DefaultCombatKnockdown(20) /obj/structure/trap/fire/flare() ..() @@ -106,7 +106,7 @@ /obj/structure/trap/chill/trap_effect(mob/living/L) to_chat(L, "You're frozen solid!") - L.Knockdown(20) + L.DefaultCombatKnockdown(20) L.adjust_bodytemperature(-300) L.apply_status_effect(/datum/status_effect/freon) @@ -119,7 +119,7 @@ /obj/structure/trap/damage/trap_effect(mob/living/L) to_chat(L, "The ground quakes beneath your feet!") - L.Knockdown(100) + L.DefaultCombatKnockdown(100) L.adjustBruteLoss(35) /obj/structure/trap/damage/flare() @@ -147,7 +147,7 @@ /obj/structure/trap/cult/trap_effect(mob/living/L) to_chat(L, "With a crack, the hostile constructs come out of hiding, stunning you!") L.electrocute_act(10, src, safety = TRUE) // electrocute act does a message. - L.Knockdown(20) + L.DefaultCombatKnockdown(20) new /mob/living/simple_animal/hostile/construct/proteon/hostile(loc) new /mob/living/simple_animal/hostile/construct/proteon/hostile(loc) - QDEL_IN(src, 30) \ No newline at end of file + QDEL_IN(src, 30) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 359436dc2e..78df9b5d57 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -444,9 +444,6 @@ C.adjustFireLoss(5) to_chat(C, "The water is searing!") - - - /obj/item/bikehorn/rubberducky name = "rubber ducky" desc = "Rubber ducky you're so fine, you make bathtime lots of fuuun. Rubber ducky I'm awfully fooooond of yooooouuuu~" //thanks doohl @@ -454,8 +451,6 @@ icon_state = "rubberducky" item_state = "rubberducky" - - /obj/structure/sink name = "sink" icon = 'icons/obj/watercloset.dmi' @@ -465,7 +460,6 @@ var/busy = FALSE //Something's being washed at the moment var/dispensedreagent = /datum/reagent/water // for whenever plumbing happens - /obj/structure/sink/attack_hand(mob/living/user) . = ..() if(.) @@ -529,7 +523,7 @@ if(B.cell.charge > 0 && B.status == 1) flick("baton_active", src) var/stunforce = B.stamforce - user.Knockdown(stunforce * 2) + user.DefaultCombatKnockdown(stunforce * 2) user.stuttering = stunforce/20 B.deductcharge(B.hitcost) user.visible_message("[user] shocks [user.p_them()]self while attempting to wash the active [B.name]!", \ @@ -578,12 +572,82 @@ new /obj/item/stack/sheet/metal (loc, 3) qdel(src) - - /obj/structure/sink/kitchen name = "kitchen sink" icon_state = "sink_alt" +/obj/structure/sink/well + name = "well" + desc = "A well, used to get water from an underground reservoir." + icon_state = "well" + +//The making of the well +/obj/structure/well_foundation + name = "well foundation" + desc = "A small patch of dirt, ready for a well to be made over it. Just use a shovel!" + icon = 'icons/obj/watercloset.dmi' + icon_state = "well_1" + density = FALSE + anchored = TRUE + max_integrity = 1000 + var/steps = 0 + +/obj/structure/well_foundation/attackby(obj/item/S, mob/user, params) + if(steps == 0 && S.tool_behaviour == TOOL_SHOVEL) + S.use_tool(src, user, 80, volume=100) + steps = 1 + desc = "A deep patch of dirt, ready for a well to be made over it. Just add some sandstone!" + icon_state = "well_1" + return TRUE + if(steps == 1 && istype(S, /obj/item/stack/sheet/mineral/sandstone)) + if(S.use(15)) + steps = 2 + desc = "A patch of dirt and bricks. Just add some more sandstone!" + icon_state = "well_2" + return TRUE + else + to_chat(user, "You need at least fifteen pieces of sandstone!") + return + if(steps == 2 && istype(S, /obj/item/stack/sheet/mineral/sandstone)) + if(S.use(25)) + steps = 3 + desc = "A large well foundation ready to be dug out. Just use a shovel!" + icon_state = "well_3" + return TRUE + else + to_chat(user, "You need at least tweenty-five pieces of sandstone!") + return + if(steps == 3 && S.tool_behaviour == TOOL_SHOVEL) + S.use_tool(src, user, 80, volume=100) + steps = 4 + desc = "A deep patch of dirt, needs something to hold a bucket and rope. Just add some wood planks!" + icon_state = "well_3" + return TRUE + if(steps == 4 && istype(S, /obj/item/stack/sheet/mineral/wood)) + if(S.use(3)) + steps = 5 + desc = "A dug out well, A dug out well with out rope. Just add some cloth!" + icon_state = "well_4" + return TRUE + else + to_chat(user, "You need at least three planks!") + return + if(steps == 5 && istype(S, /obj/item/stack/sheet/cloth)) + if(S.use(2)) + steps = 6 + desc = "A dug out well with a rope. Just add a wooden bucket!" + icon_state = "well_5" + return TRUE + else + to_chat(user, "You need at least two pieces of cloth!") + return + if(steps == 6 && istype(S, /obj/item/reagent_containers/glass/bucket/wood)) + new /obj/structure/sink/well(loc) + qdel(S) + qdel(src) + return + else + return ..() /obj/structure/sink/puddle //splishy splashy ^_^ name = "puddle" @@ -616,9 +680,10 @@ icon = 'icons/obj/watercloset.dmi' icon_state = "open" color = "#ACD1E9" //Default color, didn't bother hardcoding other colors, mappers can and should easily change it. - alpha = 200 //Mappers can also just set this to 255 if they want curtains that can't be seen through + alpha = 200 //Mappers can also just set this to 255 if they want curtains that can't be seen through <- No longer necessary unless you don't want to see through it no matter what. layer = SIGN_LAYER anchored = TRUE + max_integrity = 25 //This makes cloth shower curtains as durable as a directional glass window. 300 integrity buildable shower curtains as a cover mechanic is a meta I don't want to see. opacity = 0 density = FALSE var/open = TRUE @@ -633,12 +698,14 @@ layer = WALL_OBJ_LAYER density = TRUE open = FALSE + opacity = TRUE else icon_state = "open" layer = SIGN_LAYER density = FALSE open = TRUE + opacity = FALSE /obj/structure/curtain/attackby(obj/item/W, mob/user) if (istype(W, /obj/item/toy/crayon)) diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 7f039598cf..e824567b50 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -343,7 +343,8 @@ set name = "Flip Windoor Assembly" set category = "Object" set src in oview(1) - if(usr.stat || !usr.canmove || usr.restrained()) + var/mob/living/L = usr + if(!CHECK_MOBILITY(L, MOBILITY_PULL)) return if(facing == "l") @@ -354,4 +355,3 @@ to_chat(usr, "The windoor will now slide to the left.") update_icon() - return diff --git a/code/game/sound.dm b/code/game/sound.dm index 11e026109a..c285026d5b 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -1,7 +1,6 @@ /proc/playsound(atom/source, soundin, vol as num, vary, extrarange as num, falloff, frequency = null, channel = 0, pressure_affected = TRUE, ignore_walls = TRUE, soundenvwet = -10000, soundenvdry = 0) if(isarea(source)) - throw EXCEPTION("playsound(): source is an area") - return + CRASH("playsound(): source is an area") var/turf/turf_source = get_turf(source) diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm index c4c7ab2d7b..066249505d 100644 --- a/code/game/turfs/open.dm +++ b/code/game/turfs/open.dm @@ -272,7 +272,7 @@ var/olddir = C.dir if(!(lube & SLIDE_ICE)) - C.Knockdown(knockdown_amount) + C.DefaultCombatKnockdown(knockdown_amount) C.stop_pulling() else C.Stun(20) diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm index b5127929a7..ef4abeb0ad 100644 --- a/code/modules/admin/admin_ranks.dm +++ b/code/modules/admin/admin_ranks.dm @@ -23,8 +23,7 @@ GLOBAL_PROTECT(protected_ranks) name = init_name if(!name) qdel(src) - throw EXCEPTION("Admin rank created without name.") - return + CRASH("Admin rank created without name.") if(init_rights) rights = init_rights include_rights = rights diff --git a/code/modules/admin/holder2.dm b/code/modules/admin/holder2.dm index 37fe2a41fc..1d0b6b2a79 100644 --- a/code/modules/admin/holder2.dm +++ b/code/modules/admin/holder2.dm @@ -39,12 +39,10 @@ GLOBAL_PROTECT(href_token) return if(!ckey) QDEL_IN(src, 0) - throw EXCEPTION("Admin datum created without a ckey") - return + CRASH("Admin datum created without a ckey") if(!istype(R)) QDEL_IN(src, 0) - throw EXCEPTION("Admin datum created without a rank") - return + CRASH("Admin datum created without a rank") target = ckey name = "[ckey]'s admin datum ([R])" rank = R diff --git a/code/modules/admin/verbs/bluespacearty.dm b/code/modules/admin/verbs/bluespacearty.dm index 97248b572b..2910d6dd85 100644 --- a/code/modules/admin/verbs/bluespacearty.dm +++ b/code/modules/admin/verbs/bluespacearty.dm @@ -21,6 +21,6 @@ target.gib(1, 1) else target.adjustBruteLoss(min(99,(target.health - 1))) - target.Knockdown(400) + target.DefaultCombatKnockdown(400) target.stuttering = 20 diff --git a/code/modules/admin/verbs/borgpanel.dm b/code/modules/admin/verbs/borgpanel.dm index c0445d588d..8cfd53b300 100644 --- a/code/modules/admin/verbs/borgpanel.dm +++ b/code/modules/admin/verbs/borgpanel.dm @@ -47,7 +47,7 @@ "emagged" = borg.emagged, "active_module" = "[borg.module.type]", "lawupdate" = borg.lawupdate, - "lockdown" = borg.lockcharge, + "lockdown" = borg.locked_down, "scrambledcodes" = borg.scrambledcodes ) .["upgrades"] = list() @@ -122,8 +122,8 @@ message_admins("[key_name_admin(user)] disabled lawsync on [ADMIN_LOOKUPFLW(borg)].") log_admin("[key_name(user)] disabled lawsync on [key_name(borg)].") if ("toggle_lockdown") - borg.SetLockdown(!borg.lockcharge) - if (borg.lockcharge) + borg.SetLockdown(!borg.locked_down) + if (borg.locked_down) message_admins("[key_name_admin(user)] locked down [ADMIN_LOOKUPFLW(borg)].") log_admin("[key_name(user)] locked down [key_name(borg)].") else diff --git a/code/modules/antagonists/_common/antag_team.dm b/code/modules/antagonists/_common/antag_team.dm index 027abc7c94..653853cfb5 100644 --- a/code/modules/antagonists/_common/antag_team.dm +++ b/code/modules/antagonists/_common/antag_team.dm @@ -4,6 +4,7 @@ var/name = "team" var/member_name = "member" var/list/objectives = list() //common objectives, these won't be added or removed automatically, subtypes handle this, this is here for bookkeeping purposes. + var/show_roundend_report = TRUE /datum/team/New(starting_members) . = ..() @@ -25,6 +26,8 @@ //Display members/victory/failure/objectives for the team /datum/team/proc/roundend_report() + if(!show_roundend_report) + return var/list/report = list() report += "[name]:" diff --git a/code/modules/antagonists/abductor/equipment/abduction_gear.dm b/code/modules/antagonists/abductor/equipment/abduction_gear.dm index 332329a221..c2a3f953f5 100644 --- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm +++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm @@ -116,14 +116,13 @@ var/mob/living/carbon/human/M = loc M.adjustStaminaLoss(-75) M.SetUnconscious(0) - M.SetStun(0) - M.SetKnockdown(0) + M.SetAllImmobility(0) combat_cooldown = 0 START_PROCESSING(SSobj, src) /obj/item/clothing/suit/armor/abductor/vest/process() combat_cooldown++ - if(combat_cooldown==initial(combat_cooldown)) + if(combat_cooldown == initial(combat_cooldown)) STOP_PROCESSING(SSobj, src) /obj/item/clothing/suit/armor/abductor/Destroy() @@ -512,7 +511,7 @@ L.lastattackerckey = user.ckey L.adjustStaminaLoss(35) //because previously it took 5-6 hits to actually "incapacitate" someone for the purposes of the sleep inducement - L.Knockdown(140) + L.DefaultCombatKnockdown(140) L.apply_effect(EFFECT_STUTTER, 7) SEND_SIGNAL(L, COMSIG_LIVING_MINOR_SHOCK) diff --git a/code/modules/antagonists/blob/blob/blobs/blob_mobs.dm b/code/modules/antagonists/blob/blob/blobs/blob_mobs.dm index 182fcea0c2..261677a74b 100644 --- a/code/modules/antagonists/blob/blob/blobs/blob_mobs.dm +++ b/code/modules/antagonists/blob/blob/blobs/blob_mobs.dm @@ -218,11 +218,16 @@ /mob/living/simple_animal/hostile/blob/blobbernaut/Initialize() . = ..() - if(!independent) //no pulling people deep into the blob - verbs -= /mob/living/verb/pulled - else + if(independent) pass_flags &= ~PASSBLOB +/mob/living/simple_animal/hostile/blob/blobbernaut/start_pulling(atom/movable/AM, state, force = pull_force, supress_message = FALSE) + if(!independent && ismob(AM)) + if(!supress_message) + to_chat(src, "You are unable to grasp people in this form.") + return FALSE + return ..() + /mob/living/simple_animal/hostile/blob/blobbernaut/Life() if(..()) var/list/blobs_in_area = range(2, src) diff --git a/code/modules/antagonists/blob/blob/theblob.dm b/code/modules/antagonists/blob/blob/theblob.dm index 953b876b35..fc78f859f2 100644 --- a/code/modules/antagonists/blob/blob/theblob.dm +++ b/code/modules/antagonists/blob/blob/theblob.dm @@ -303,8 +303,7 @@ /obj/structure/blob/proc/change_to(type, controller) if(!ispath(type)) - throw EXCEPTION("change_to(): invalid type for blob") - return + CRASH("change_to(): invalid type for blob") var/obj/structure/blob/B = new type(src.loc, controller) B.creation_action() B.update_icon() diff --git a/code/modules/antagonists/bloodsucker/bloodsucker_powers.dm b/code/modules/antagonists/bloodsucker/bloodsucker_powers.dm index 626ad43b10..507e1f2739 100644 --- a/code/modules/antagonists/bloodsucker/bloodsucker_powers.dm +++ b/code/modules/antagonists/bloodsucker/bloodsucker_powers.dm @@ -96,7 +96,7 @@ // Incap? if(must_be_capacitated) var/mob/living/L = owner - if (L.incapacitated(TRUE, TRUE) || L.resting && !can_be_immobilized) + if (L.incapacitated(TRUE, TRUE) || !CHECK_MOBILITY(L, MOBILITY_STAND) && !can_be_immobilized) if(display_error) to_chat(owner, "Not while you're incapacitated!") return FALSE diff --git a/code/modules/antagonists/bloodsucker/items/bloodsucker_stake.dm b/code/modules/antagonists/bloodsucker/items/bloodsucker_stake.dm index b7c90523b6..b69b851990 100644 --- a/code/modules/antagonists/bloodsucker/items/bloodsucker_stake.dm +++ b/code/modules/antagonists/bloodsucker/items/bloodsucker_stake.dm @@ -1,9 +1,5 @@ - - // organ_internal.dm -- /obj/item/organ - - // Do I have a stake in my heart? /mob/living/AmStaked() var/obj/item/bodypart/BP = get_bodypart("chest") @@ -13,16 +9,14 @@ if (istype(I,/obj/item/stake/)) return TRUE return FALSE + /mob/proc/AmStaked() return FALSE - /mob/living/proc/StakeCanKillMe() return IsSleeping() || stat >= UNCONSCIOUS || blood_volume <= 0 || HAS_TRAIT(src, TRAIT_DEATHCOMA) // NOTE: You can't go to sleep in a coffin with a stake in you. - -///obj/item/weapon/melee/stake -/obj/item/stake/ +/obj/item/stake name = "wooden stake" desc = "A simple wooden stake carved to a sharp point." icon = 'icons/obj/items_and_weapons.dmi' @@ -112,8 +106,7 @@ // Can this target be staked? If someone stands up before this is complete, it fails. Best used on someone stationary. /mob/living/carbon/proc/can_be_staked() - //return resting || IsKnockdown() || IsUnconscious() || (stat && (stat != SOFT_CRIT || pulledby)) || (has_trait(TRAIT_FAKEDEATH)) || resting || IsStun() || IsFrozen() || (pulledby && pulledby.grab_state >= GRAB_NECK) - return (resting || lying || IsUnconscious() || pulledby && pulledby.grab_state >= GRAB_NECK) + return !CHECK_MOBILITY(src, MOBILITY_STAND) // ABOVE: Taken from update_mobility() in living.dm /obj/item/stake/hardened diff --git a/code/modules/antagonists/bloodsucker/objects/bloodsucker_coffin.dm b/code/modules/antagonists/bloodsucker/objects/bloodsucker_coffin.dm index a25244c48d..debeee3775 100644 --- a/code/modules/antagonists/bloodsucker/objects/bloodsucker_coffin.dm +++ b/code/modules/antagonists/bloodsucker/objects/bloodsucker_coffin.dm @@ -42,25 +42,18 @@ /obj/structure/closet/crate var/mob/living/resident // This lets bloodsuckers claim any "closet" as a Coffin, so long as they could get into it and close it. This locks it in place, too. -/obj/structure/closet/crate/coffin - var/pryLidTimer = 250 - can_weld_shut = FALSE - breakout_time = 200 - - /obj/structure/closet/crate/coffin/blackcoffin name = "black coffin" desc = "For those departed who are not so dear." icon_state = "coffin" icon = 'icons/obj/vamp_obj.dmi' - can_weld_shut = FALSE - resistance_flags = 0 // Start off with no bonuses. open_sound = 'sound/bloodsucker/coffin_open.ogg' close_sound = 'sound/bloodsucker/coffin_close.ogg' breakout_time = 600 pryLidTimer = 400 resistance_flags = NONE - integrity_failure = 70 + max_integrity = 100 + integrity_failure = 0.5 armor = list("melee" = 50, "bullet" = 20, "laser" = 30, "energy" = 0, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 60) /obj/structure/closet/crate/coffin/meatcoffin @@ -68,8 +61,6 @@ desc = "When you're ready to meat your maker, the steaks can never be too high." icon_state = "meatcoffin" icon = 'icons/obj/vamp_obj.dmi' - can_weld_shut = FALSE - resistance_flags = 0 // Start off with no bonuses. open_sound = 'sound/effects/footstep/slime1.ogg' close_sound = 'sound/effects/footstep/slime1.ogg' breakout_time = 200 @@ -77,24 +68,23 @@ resistance_flags = NONE material_drop = /obj/item/reagent_containers/food/snacks/meat/slab material_drop_amount = 3 - integrity_failure = 40 + integrity_failure = 0.57 armor = list("melee" = 70, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 70, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 100) - + /obj/structure/closet/crate/coffin/metalcoffin name = "metal coffin" desc = "A big metal sardine can inside of another big metal sardine can, in space." icon_state = "metalcoffin" icon = 'icons/obj/vamp_obj.dmi' - can_weld_shut = FALSE resistance_flags = FIRE_PROOF | LAVA_PROOF open_sound = 'sound/effects/pressureplate.ogg' close_sound = 'sound/effects/pressureplate.ogg' breakout_time = 300 pryLidTimer = 200 - resistance_flags = NONE material_drop = /obj/item/stack/sheet/metal material_drop_amount = 5 - integrity_failure = 60 + max_integrity = 200 + integrity_failure = 0.25 armor = list("melee" = 40, "bullet" = 15, "laser" = 50, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 60) ////////////////////////////////////////////// diff --git a/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm b/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm index 9e46203483..db286dd6fe 100644 --- a/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm +++ b/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm @@ -205,7 +205,7 @@ buckled_mob.pixel_y = buckled_mob.get_standard_pixel_y_offset(180) src.visible_message(text("[buckled_mob][buckled_mob.stat==DEAD?"'s corpse":""] slides off of the rack.")) density = FALSE - buckled_mob.AdjustKnockdown(30) + buckled_mob.DefaultCombatKnockdown(30) update_icon() useLock = FALSE // Failsafe diff --git a/code/modules/antagonists/bloodsucker/powers/brawn.dm b/code/modules/antagonists/bloodsucker/powers/brawn.dm index 712a15dff9..cf0393ff3a 100644 --- a/code/modules/antagonists/bloodsucker/powers/brawn.dm +++ b/code/modules/antagonists/bloodsucker/powers/brawn.dm @@ -72,8 +72,7 @@ if(rand(5 + powerlevel) >= 5) target.visible_message("[user] lands a vicious punch, sending [target] away!", \ "[user] has landed a horrifying punch on you, sending you flying!!", null, COMBAT_MESSAGE_RANGE) - target.Knockdown(min(5, rand(10, 10 * powerlevel)) ) - + target.DefaultCombatKnockdown(min(5, rand(10, 10 * powerlevel)) ) // Attack! playsound(get_turf(target), 'sound/weapons/punch4.ogg', 60, 1, -1) user.do_attack_animation(target, ATTACK_EFFECT_SMASH) @@ -145,7 +144,7 @@ // Knock Down (if Living) if (isliving(M)) var/mob/living/L = M - L.Knockdown(pull_power * 10 + 20) + L.DefaultCombatKnockdown(pull_power * 10 + 20) // Knock Back (before Knockdown, which probably cancels pull) var/send_dir = get_dir(owner, M) var/turf/T = get_ranged_target_turf(M, send_dir, pull_power) diff --git a/code/modules/antagonists/bloodsucker/powers/feed.dm b/code/modules/antagonists/bloodsucker/powers/feed.dm index f9ff31d94a..bbce221d91 100644 --- a/code/modules/antagonists/bloodsucker/powers/feed.dm +++ b/code/modules/antagonists/bloodsucker/powers/feed.dm @@ -306,7 +306,7 @@ // Bloodsuckers not affected by "the Kiss" of another vampire if(!target.mind || !target.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)) target.Unconscious(50,0) - target.Knockdown(40 + 5 * level_current,1) + target.DefaultCombatKnockdown(40 + 5 * level_current,1) // NOTE: THis is based on level of power! if(ishuman(target)) target.adjustStaminaLoss(5, forced = TRUE)// Base Stamina Damage @@ -321,4 +321,4 @@ // My mouth is no longer full REMOVE_TRAIT(owner, TRAIT_MUTE, "bloodsucker_feed") // Let me move immediately - user.update_canmove() + user.update_mobility() diff --git a/code/modules/antagonists/bloodsucker/powers/go_home.dm b/code/modules/antagonists/bloodsucker/powers/go_home.dm index 3fa8a07299..4788d7639e 100644 --- a/code/modules/antagonists/bloodsucker/powers/go_home.dm +++ b/code/modules/antagonists/bloodsucker/powers/go_home.dm @@ -100,8 +100,8 @@ var/mob/living/simple_animal/SA = pick(/mob/living/simple_animal/mouse,/mob/living/simple_animal/mouse,/mob/living/simple_animal/mouse, /mob/living/simple_animal/hostile/retaliate/bat) //prob(300) /mob/living/simple_animal/mouse, new SA (owner.loc) // TELEPORT: Move to Coffin & Close it! + user.set_resting(TRUE, TRUE, FALSE) do_teleport(owner, bloodsuckerdatum.coffin, no_effects = TRUE, forced = TRUE, channel = TELEPORT_CHANNEL_QUANTUM) - user.resting = TRUE user.Stun(30,1) // CLOSE LID: If fail, force me in. if(!bloodsuckerdatum.coffin.close(owner)) diff --git a/code/modules/antagonists/bloodsucker/powers/haste.dm b/code/modules/antagonists/bloodsucker/powers/haste.dm index 47c93b794e..143950b32f 100644 --- a/code/modules/antagonists/bloodsucker/powers/haste.dm +++ b/code/modules/antagonists/bloodsucker/powers/haste.dm @@ -76,16 +76,17 @@ sleep(speed) UnregisterSignal(owner, COMSIG_MOVABLE_MOVED) hit = null - user.update_canmove() + user.update_mobility() /datum/action/bloodsucker/targeted/haste/DeactivatePower(mob/living/user = owner, mob/living/target) ..() // activate = FALSE - user.update_canmove() + user.update_mobility() /datum/action/bloodsucker/targeted/haste/proc/on_move() for(var/mob/living/L in dview(1, get_turf(owner))) if(!hit[L] && (L != owner)) hit[L] = TRUE playsound(L, "sound/weapons/punch[rand(1,4)].ogg", 15, 1, -1) - L.Knockdown(10 + level_current * 5, override_hardstun = 0.1) + L.DefaultCombatKnockdown(10 + level_current * 5) + L.Paralyze(0.1) L.spin(10, 1) diff --git a/code/modules/antagonists/bloodsucker/powers/lunge.dm b/code/modules/antagonists/bloodsucker/powers/lunge.dm index 12fc51d300..cc9363bbaf 100644 --- a/code/modules/antagonists/bloodsucker/powers/lunge.dm +++ b/code/modules/antagonists/bloodsucker/powers/lunge.dm @@ -52,6 +52,7 @@ // set waitfor = FALSE <---- DONT DO THIS!We WANT this power to hold up ClickWithPower(), so that we can unlock the power when it's done. var/mob/living/carbon/target = A var/turf/T = get_turf(target) + var/mob/living/L = owner // Clear Vars owner.pulling = null // Will we Knock them Down? @@ -63,7 +64,7 @@ owner.playsound_local(owner, 'sound/bloodsucker/lunge_warn.ogg', 60, FALSE, pressure_affected = FALSE) // audio feedback to the user if(do_mob(owner, owner, 7, TRUE, TRUE)) walk_towards(owner, T, 0.1, 10) // yes i know i shouldn't use this but i don't know how to work in anything better - if(get_turf(owner) != T && !(isliving(target) && target.Adjacent(owner)) && owner.incapacitated() && owner.resting) + if(get_turf(owner) != T && !(isliving(target) && target.Adjacent(owner)) && owner.incapacitated() && !CHECK_MOBILITY(L, MOBILITY_STAND)) var/send_dir = get_dir(owner, T) new /datum/forced_movement(owner, get_ranged_target_turf(owner, send_dir, 1), 1, FALSE) owner.spin(10) @@ -84,4 +85,4 @@ /datum/action/bloodsucker/targeted/lunge/DeactivatePower(mob/living/user = owner, mob/living/target) ..() // activate = FALSE - user.update_canmove() + user.update_mobility() diff --git a/code/modules/antagonists/bloodsucker/powers/mesmerize.dm b/code/modules/antagonists/bloodsucker/powers/mesmerize.dm index 8699e43854..d5354c1af9 100644 --- a/code/modules/antagonists/bloodsucker/powers/mesmerize.dm +++ b/code/modules/antagonists/bloodsucker/powers/mesmerize.dm @@ -82,7 +82,7 @@ to_chat(owner, "You must be facing your victim.") return FALSE // Check: Target facing me? - if(!target.resting && !is_A_facing_B(target,owner)) + if (CHECK_MOBILITY(target, MOBILITY_STAND) && !is_A_facing_B(target,owner)) if(display_error) to_chat(owner, "Your victim must be facing you to see into your eyes.") return FALSE diff --git a/code/modules/antagonists/changeling/cellular_emporium.dm b/code/modules/antagonists/changeling/cellular_emporium.dm index 3cf0a3ee25..b2c1a52a4a 100644 --- a/code/modules/antagonists/changeling/cellular_emporium.dm +++ b/code/modules/antagonists/changeling/cellular_emporium.dm @@ -81,7 +81,7 @@ if(istype(our_target, /datum/cellular_emporium)) cellular_emporium = our_target else - throw EXCEPTION("cellular_emporium action created with non emporium") + CRASH("cellular_emporium action created with non emporium") /datum/action/innate/cellular_emporium/Activate() cellular_emporium.ui_interact(owner) diff --git a/code/modules/antagonists/changeling/powers/fakedeath.dm b/code/modules/antagonists/changeling/powers/fakedeath.dm index 8ed5b5e39c..da626bcf1c 100644 --- a/code/modules/antagonists/changeling/powers/fakedeath.dm +++ b/code/modules/antagonists/changeling/powers/fakedeath.dm @@ -18,7 +18,6 @@ user.tod = STATION_TIME_TIMESTAMP("hh:mm:ss", world.time) user.fakedeath("changeling") //play dead user.update_stat() - user.update_canmove() addtimer(CALLBACK(src, .proc/ready_to_regenerate, user), LING_FAKEDEATH_TIME, TIMER_UNIQUE) return TRUE diff --git a/code/modules/antagonists/changeling/powers/headcrab.dm b/code/modules/antagonists/changeling/powers/headcrab.dm index 4ef0d2f240..867f160081 100644 --- a/code/modules/antagonists/changeling/powers/headcrab.dm +++ b/code/modules/antagonists/changeling/powers/headcrab.dm @@ -30,7 +30,7 @@ H.confused += 3 for(var/mob/living/silicon/S in range(2,user)) to_chat(S, "Your sensors are disabled by a shower of blood!") - S.Knockdown(60) + S.DefaultCombatKnockdown(60) var/turf = get_turf(user) user.gib() . = TRUE diff --git a/code/modules/antagonists/changeling/powers/shriek.dm b/code/modules/antagonists/changeling/powers/shriek.dm index 65e58ae65b..3de220dbcb 100644 --- a/code/modules/antagonists/changeling/powers/shriek.dm +++ b/code/modules/antagonists/changeling/powers/shriek.dm @@ -24,7 +24,7 @@ if(issilicon(M)) SEND_SOUND(M, sound('sound/weapons/flash.ogg')) - M.Knockdown(rand(100,200)) + M.DefaultCombatKnockdown(rand(100,200)) for(var/obj/machinery/light/L in range(4, user)) L.on = 1 diff --git a/code/modules/antagonists/changeling/powers/strained_muscles.dm b/code/modules/antagonists/changeling/powers/strained_muscles.dm index 1f25e06324..a98700683e 100644 --- a/code/modules/antagonists/changeling/powers/strained_muscles.dm +++ b/code/modules/antagonists/changeling/powers/strained_muscles.dm @@ -26,7 +26,7 @@ changeling.chem_recharge_slowdown -= 0.5 if(stacks >= 20) to_chat(user, "We collapse in exhaustion.") - user.Knockdown(60) + user.DefaultCombatKnockdown(60) user.emote("gasp") INVOKE_ASYNC(src, .proc/muscle_loop, user) @@ -40,7 +40,7 @@ if(user.stat != CONSCIOUS || user.staminaloss >= 90) active = !active to_chat(user, "Our muscles relax without the energy to strengthen them.") - user.Knockdown(40) + user.DefaultCombatKnockdown(40) user.remove_movespeed_modifier(MOVESPEED_ID_CHANGELING_MUSCLES) changeling.chem_recharge_slowdown -= 0.5 break diff --git a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm index eb7f83735d..1b4d26ac86 100644 --- a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm +++ b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm @@ -80,7 +80,7 @@ if(iscultist(L)) //No longer stuns cultists, instead sets them on fire and burns them to_chat(L, "\"Watch your step, wretch.\"") L.adjustFireLoss(10) - L.Knockdown(20, FALSE) + L.DefaultCombatKnockdown(20, FALSE) L.adjust_fire_stacks(5) //Burn! L.IgniteMob() else @@ -155,7 +155,7 @@ if(brutedamage || burndamage) L.adjustBruteLoss(-(brutedamage * 0.25)) L.adjustFireLoss(-(burndamage * 0.25)) - L.Knockdown(50) //Completely defenseless for five seconds - mainly to give them time to read over the information they've just been presented with + L.DefaultCombatKnockdown(50) //Completely defenseless for five seconds - mainly to give them time to read over the information they've just been presented with if(iscarbon(L)) var/mob/living/carbon/C = L C.silent += 5 diff --git a/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm b/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm index ee1a1233d2..c7c9c42ee9 100644 --- a/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm +++ b/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm @@ -196,7 +196,7 @@ if(!iscultist(L)) L.visible_message("[L]'s eyes blaze with brilliant light!", \ "Your vision suddenly screams with white-hot light!") - L.Knockdown(15, TRUE, FALSE, 15) + L.DefaultCombatKnockdown(15, TRUE, FALSE, 15) L.apply_status_effect(STATUS_EFFECT_KINDLE) L.flash_act(1, 1) if(issilicon(target)) diff --git a/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm b/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm index 05516cc6a2..4a10862e28 100644 --- a/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm +++ b/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm @@ -57,15 +57,15 @@ else if(!..()) if(!L.anti_magic_check()) if(issilicon(L)) - L.Knockdown(100) + L.DefaultCombatKnockdown(100) else if(iscultist(L)) L.confused += CLAMP(10 - L.confused, 0, 5) // Spearthrow now confuses enemy cultists + just deals extra damage / sets on fire instead of hardstunning + damage to_chat(L, "[src] crashes into you with burning force, sending you reeling!") L.adjust_fire_stacks(2) - L.Knockdown(1) + L.DefaultCombatKnockdown(1) L.IgniteMob() else - L.Knockdown(40) + L.DefaultCombatKnockdown(40) GLOB.clockwork_vitality += L.adjustFireLoss(bonus_burn * 3) //normally a total of 40 damage, 70 with ratvar break_spear(T) else diff --git a/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm b/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm index 644d9eedd5..6a53097922 100644 --- a/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm +++ b/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm @@ -176,7 +176,7 @@ var/datum/status_effect/belligerent/B = C.apply_status_effect(STATUS_EFFECT_BELLIGERENT) if(!QDELETED(B)) B.duration = world.time + 30 - C.Knockdown(5) //knocks down for half a second if affected + C.DefaultCombatKnockdown(5) //knocks down for half a second if affected sleep(!GLOB.ratvar_approaches ? 16 : 10) name = "judicial blast" layer = ABOVE_ALL_MOB_LAYER @@ -196,7 +196,7 @@ L.visible_message("Strange energy flows into [L]'s [I.name]!", \ "Your [I.name] shields you from [src]!") continue - L.Knockdown(15) //knocks down briefly when exploding + L.DefaultCombatKnockdown(15) //knocks down briefly when exploding if(!iscultist(L)) L.visible_message("[L] is struck by a judicial explosion!", \ "[!issilicon(L) ? "An unseen force slams you into the ground!" : "ERROR: Motor servos disabled by external source!"]") diff --git a/code/modules/antagonists/clockcult/clock_structures/taunting_trail.dm b/code/modules/antagonists/clockcult/clock_structures/taunting_trail.dm index 1158b02a4c..98b3c32b0f 100644 --- a/code/modules/antagonists/clockcult/clock_structures/taunting_trail.dm +++ b/code/modules/antagonists/clockcult/clock_structures/taunting_trail.dm @@ -57,5 +57,5 @@ L.confused = min(L.confused + 15, 50) L.dizziness = min(L.dizziness + 15, 50) if(L.confused >= 25) - L.Knockdown(FLOOR(L.confused * 0.8, 1)) + L.DefaultCombatKnockdown(FLOOR(L.confused * 0.8, 1)) take_damage(max_integrity) diff --git a/code/modules/antagonists/clockcult/clock_structures/traps/brass_skewer.dm b/code/modules/antagonists/clockcult/clock_structures/traps/brass_skewer.dm index 2f0db73bfc..a4b19f2d40 100644 --- a/code/modules/antagonists/clockcult/clock_structures/traps/brass_skewer.dm +++ b/code/modules/antagonists/clockcult/clock_structures/traps/brass_skewer.dm @@ -22,7 +22,7 @@ if(buckled_mobs && LAZYLEN(buckled_mobs)) var/mob/living/L = buckled_mobs[1] if(iscarbon(L)) - L.Knockdown(100) + L.DefaultCombatKnockdown(100) L.visible_message("[L] is maimed as the skewer shatters while still in [L.p_their()] body!") L.adjustBruteLoss(15) unbuckle_mob(L) @@ -117,6 +117,6 @@ return skewee.visible_message("[skewee] comes free of [src] with a squelching pop!", \ "You come free of [src]!") - skewee.Knockdown(30) + skewee.DefaultCombatKnockdown(30) playsound(skewee, 'sound/misc/desceration-03.ogg', 50, TRUE) unbuckle_mob(skewee) diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm index 636061783e..9a086b75a2 100644 --- a/code/modules/antagonists/cult/blood_magic.dm +++ b/code/modules/antagonists/cult/blood_magic.dm @@ -446,7 +446,7 @@ var/atom/throw_target = get_edge_target_turf(L, user.dir) L.throw_at(throw_target, 7, 1, user) else if(!iscultist(L)) - L.Knockdown(160) + L.DefaultCombatKnockdown(160) L.adjustStaminaLoss(140) //Ensures hard stamcrit L.flash_act(1,1) if(issilicon(target)) diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm index f14aeede9a..3dc199b56d 100644 --- a/code/modules/antagonists/cult/cult_items.dm +++ b/code/modules/antagonists/cult/cult_items.dm @@ -46,10 +46,11 @@ /obj/item/melee/cultblade/Initialize() . = ..() AddComponent(/datum/component/butchering, 40, 100) + AddElement(/datum/element/sword_point) /obj/item/melee/cultblade/attack(mob/living/target, mob/living/carbon/human/user) if(!iscultist(user)) - user.Knockdown(100) + user.DefaultCombatKnockdown(100) user.dropItemToGround(src, TRUE) user.visible_message("A powerful force shoves [user] away from [target]!", \ "\"You shouldn't play with sharp things. You'll poke someone's eye out.\"") @@ -148,7 +149,7 @@ user.emote("scream") user.apply_damage(30, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)) user.dropItemToGround(src, TRUE) - user.Knockdown(50) + user.DefaultCombatKnockdown(50) return force = initial(force) jaunt.Grant(user, src) @@ -405,7 +406,7 @@ to_chat(user, "An overwhelming sense of nausea overpowers you!") user.dropItemToGround(src, TRUE) user.Dizzy(30) - user.Knockdown(100) + user.DefaultCombatKnockdown(100) else to_chat(user, "\"Trying to use things you don't own is bad, you know.\"") to_chat(user, "The armor squeezes at your body!") @@ -457,7 +458,7 @@ to_chat(user, "An overwhelming sense of nausea overpowers you!") user.dropItemToGround(src, TRUE) user.Dizzy(30) - user.Knockdown(100) + user.DefaultCombatKnockdown(100) else to_chat(user, "\"Trying to use things you don't own is bad, you know.\"") to_chat(user, "The robes squeeze at your body!") @@ -478,7 +479,7 @@ to_chat(user, "\"You want to be blind, do you?\"") user.dropItemToGround(src, TRUE) user.Dizzy(30) - user.Knockdown(100) + user.DefaultCombatKnockdown(100) user.blind_eyes(30) /obj/item/reagent_containers/glass/beaker/unholywater @@ -499,7 +500,7 @@ /obj/item/shuttle_curse/attack_self(mob/living/user) if(!iscultist(user)) user.dropItemToGround(src, TRUE) - user.Knockdown(100) + user.DefaultCombatKnockdown(100) to_chat(user, "A powerful force shoves you away from [src]!") return if(curselimit > 1) @@ -705,10 +706,10 @@ if(is_servant_of_ratvar(L)) to_chat(L, "\"Kneel for me, scum\"") L.confused += CLAMP(10 - L.confused, 0, 5) //confuses and lightly knockdowns + damages hostile cultists instead of hardstunning like before - L.Knockdown(15) + L.DefaultCombatKnockdown(15) L.adjustBruteLoss(10) else - L.Knockdown(50) + L.DefaultCombatKnockdown(50) break_spear(T) else ..() @@ -843,7 +844,7 @@ INVOKE_ASYNC(src, .proc/pewpew, user, params) var/obj/structure/emergency_shield/invoker/N = new(user.loc) if(do_after(user, 90, target = user)) - user.Knockdown(40) + user.DefaultCombatKnockdown(40) to_chat(user, "You have exhausted the power of this spell!") firing = FALSE if(N) @@ -908,7 +909,7 @@ else var/mob/living/L = target if(L.density) - L.Knockdown(20) + L.DefaultCombatKnockdown(20) L.adjustBruteLoss(45) playsound(L, 'sound/hallucinations/wail.ogg', 50, 1) L.emote("scream") @@ -944,7 +945,7 @@ T.visible_message("The sheer force from [P] shatters the mirror shield!") new /obj/effect/temp_visual/cult/sparks(T) playsound(T, 'sound/effects/glassbr3.ogg', 100) - owner.Knockdown(25) + owner.DefaultCombatKnockdown(25) qdel(src) return FALSE if(P.is_reflectable) @@ -1001,9 +1002,9 @@ else if(!..()) if(!L.anti_magic_check()) if(is_servant_of_ratvar(L)) - L.Knockdown(60) + L.DefaultCombatKnockdown(60) else - L.Knockdown(30) + L.DefaultCombatKnockdown(30) if(D.thrower) for(var/mob/living/Next in orange(2, T)) if(!Next.density || iscultist(Next)) diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm index 0111334748..3d27fa942b 100644 --- a/code/modules/antagonists/cult/runes.dm +++ b/code/modules/antagonists/cult/runes.dm @@ -219,7 +219,7 @@ structure_check() searches for nearby cultist structures required for the invoca L.visible_message("[L]'s eyes glow a defiant yellow!", \ "\"Stop resisting. You will be mi-\"\n\ \"Give up and you will feel pain unlike anything you've ever felt!\"") - L.Knockdown(80) + L.DefaultCombatKnockdown(80) else if(is_convertable) do_convert(L, invokers) else @@ -908,7 +908,7 @@ structure_check() searches for nearby cultist structures required for the invoca if(affecting.key) affecting.visible_message("[affecting] slowly relaxes, the glow around [affecting.p_them()] dimming.", \ "You are re-united with your physical form. [src] releases its hold over you.") - affecting.Knockdown(40) + affecting.DefaultCombatKnockdown(40) break if(affecting.health <= 10) to_chat(G, "Your body can no longer sustain the connection!") @@ -970,7 +970,7 @@ structure_check() searches for nearby cultist structures required for the invoca playsound(T, 'sound/magic/enter_blood.ogg', 100, 1) visible_message("A colossal shockwave of energy bursts from the rune, disintegrating it in the process!") for(var/mob/living/L in range(src, 3)) - L.Knockdown(30) + L.DefaultCombatKnockdown(30) empulse(T, 0.42*(intensity), 1) var/list/images = list() var/zmatch = T.z diff --git a/code/modules/antagonists/devil/devil.dm b/code/modules/antagonists/devil/devil.dm index 951fe4e18a..84920eba00 100644 --- a/code/modules/antagonists/devil/devil.dm +++ b/code/modules/antagonists/devil/devil.dm @@ -477,7 +477,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master", if(SOULVALUE >= ARCH_THRESHOLD && ascendable) A.convert_to_archdevil() else - throw EXCEPTION("Unable to find a blobstart landmark for hellish resurrection") + CRASH("Unable to find a blobstart landmark for hellish resurrection") /datum/antagonist/devil/proc/update_hud() diff --git a/code/modules/antagonists/devil/devil_helpers.dm b/code/modules/antagonists/devil/devil_helpers.dm index 4d0a781570..d3445eac0f 100644 --- a/code/modules/antagonists/devil/devil_helpers.dm +++ b/code/modules/antagonists/devil/devil_helpers.dm @@ -32,7 +32,7 @@ if(BANE_HARVEST) if(istype(weapon, /obj/item/reagent_containers/food/snacks/grown/)) visible_message("The spirits of the harvest aid in the exorcism.", "The harvest spirits are harming you.") - Knockdown(40) + DefaultCombatKnockdown(40) qdel(weapon) return 2 return 1 \ No newline at end of file diff --git a/code/modules/antagonists/ninja/ninja.dm b/code/modules/antagonists/ninja/ninja.dm index 12bdbec77a..133bd5ab6a 100644 --- a/code/modules/antagonists/ninja/ninja.dm +++ b/code/modules/antagonists/ninja/ninja.dm @@ -70,16 +70,10 @@ O.explanation_text = "Protect \the [M.current.real_name], the [M.assigned_role], from harm." objectives += O if(4) //flavor - if(helping_station) - var/datum/objective/flavor/ninja_helping/O = new /datum/objective/flavor/ninja_helping - O.owner = owner - O.forge_objective() - objectives += O - else - var/datum/objective/flavor/ninja_syndie/O = new /datum/objective/flavor/ninja_helping - O.owner = owner - O.forge_objective() - objectives += O + var/datum/objective/flavor/O = helping_station ? new /datum/objective/flavor/ninja_helping : new /datum/objective/flavor/ninja_syndie + O.owner = owner + O.forge_objective() + objectives += O else break var/datum/objective/O = new /datum/objective/survive() diff --git a/code/modules/antagonists/swarmer/swarmer.dm b/code/modules/antagonists/swarmer/swarmer.dm index 99d12972d8..92852c6c7f 100644 --- a/code/modules/antagonists/swarmer/swarmer.dm +++ b/code/modules/antagonists/swarmer/swarmer.dm @@ -191,7 +191,7 @@ return 0 /obj/item/IntegrateAmount() //returns the amount of resources gained when eating this item - if(custom_materials[getmaterialref(/datum/material/iron)] || custom_materials[getmaterialref(/datum/material/glass)]) + if(custom_materials[SSmaterials.GetMaterialRef(/datum/material/iron)] || custom_materials[SSmaterials.GetMaterialRef(/datum/material/glass)]) return 1 return ..() @@ -586,7 +586,7 @@ playsound(loc,'sound/effects/snap.ogg',50, 1, -1) L.electrocute_act(0, src, 1, 1, 1) if(iscyborg(L)) - L.Knockdown(100) + L.DefaultCombatKnockdown(100) qdel(src) ..() diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm index 68963078c5..0352272f70 100644 --- a/code/modules/antagonists/traitor/datum_traitor.dm +++ b/code/modules/antagonists/traitor/datum_traitor.dm @@ -13,6 +13,7 @@ var/should_give_codewords = TRUE var/should_equip = TRUE var/traitor_kind = TRAITOR_HUMAN //Set on initial assignment + var/datum/contractor_hub/contractor_hub hijack_speed = 0.5 //10 seconds per hijack stage by default /datum/antagonist/traitor/on_gain() @@ -413,6 +414,9 @@ var/special_role_text = lowertext(name) + if(contractor_hub) + result += contractor_round_end() + if(traitorwin) result += "The [special_role_text] was successful!" else @@ -421,12 +425,44 @@ return result.Join("