diff --git a/baystation12.dme b/baystation12.dme index d13c553649..2af4e4e2cd 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -981,7 +981,6 @@ #include "code\modules\mob\living\carbon\human\examine.dm" #include "code\modules\mob\living\carbon\human\human.dm" #include "code\modules\mob\living\carbon\human\human_attackhand.dm" -#include "code\modules\mob\living\carbon\human\human_attackpaw.dm" #include "code\modules\mob\living\carbon\human\human_damage.dm" #include "code\modules\mob\living\carbon\human\human_defense.dm" #include "code\modules\mob\living\carbon\human\human_defines.dm" diff --git a/code/ATMOSPHERICS/components/tvalve.dm b/code/ATMOSPHERICS/components/tvalve.dm index a3555f5322..39ca1e25fd 100644 --- a/code/ATMOSPHERICS/components/tvalve.dm +++ b/code/ATMOSPHERICS/components/tvalve.dm @@ -172,9 +172,6 @@ /obj/machinery/atmospherics/tvalve/attack_ai(mob/user as mob) return -/obj/machinery/atmospherics/tvalve/attack_paw(mob/user as mob) - return attack_hand(user) - /obj/machinery/atmospherics/tvalve/attack_hand(mob/user as mob) src.add_fingerprint(usr) update_icon(1) diff --git a/code/ATMOSPHERICS/components/unary/cold_sink.dm b/code/ATMOSPHERICS/components/unary/cold_sink.dm index b48e1c5cbe..a567cf5cd6 100644 --- a/code/ATMOSPHERICS/components/unary/cold_sink.dm +++ b/code/ATMOSPHERICS/components/unary/cold_sink.dm @@ -65,9 +65,6 @@ /obj/machinery/atmospherics/unary/freezer/attack_ai(mob/user as mob) src.ui_interact(user) -/obj/machinery/atmospherics/unary/freezer/attack_paw(mob/user as mob) - src.ui_interact(user) - /obj/machinery/atmospherics/unary/freezer/attack_hand(mob/user as mob) src.ui_interact(user) diff --git a/code/ATMOSPHERICS/components/unary/heat_source.dm b/code/ATMOSPHERICS/components/unary/heat_source.dm index db193cc2dd..6b25753ec8 100644 --- a/code/ATMOSPHERICS/components/unary/heat_source.dm +++ b/code/ATMOSPHERICS/components/unary/heat_source.dm @@ -18,7 +18,7 @@ use_power = 0 idle_power_usage = 5 //5 Watts for thermostat related circuitry active_power_usage //50 kW. The power rating of the heater - + var/max_power_usage = 20000 //power rating when the usage is turned up to 100 var/power_setting = 100 @@ -35,7 +35,7 @@ component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/capacitor(src) component_parts += new /obj/item/weapon/stock_parts/capacitor(src) - + active_power_usage = max_power_usage * (power_setting/100) /obj/machinery/atmospherics/unary/heater/initialize() @@ -86,9 +86,6 @@ /obj/machinery/atmospherics/unary/heater/attack_ai(mob/user as mob) src.ui_interact(user) -/obj/machinery/atmospherics/unary/heater/attack_paw(mob/user as mob) - src.ui_interact(user) - /obj/machinery/atmospherics/unary/heater/attack_hand(mob/user as mob) src.ui_interact(user) @@ -164,10 +161,10 @@ /obj/machinery/atmospherics/unary/heater/proc/set_power_level(var/new_power_setting) power_setting = new_power_setting - + var/old_power_usage = active_power_usage active_power_usage = max_power_usage * (power_setting/100) - + if (use_power >= 2 && old_power_usage != active_power_usage) force_power_update() diff --git a/code/ATMOSPHERICS/components/valve.dm b/code/ATMOSPHERICS/components/valve.dm index a57458d2e0..bce38d0654 100644 --- a/code/ATMOSPHERICS/components/valve.dm +++ b/code/ATMOSPHERICS/components/valve.dm @@ -130,9 +130,6 @@ /obj/machinery/atmospherics/valve/attack_ai(mob/user as mob) return -/obj/machinery/atmospherics/valve/attack_paw(mob/user as mob) - return attack_hand(user) - /obj/machinery/atmospherics/valve/attack_hand(mob/user as mob) src.add_fingerprint(usr) update_icon(1) diff --git a/code/TriDimension/Structures.dm b/code/TriDimension/Structures.dm index dd97676115..fa91ccd5bb 100644 --- a/code/TriDimension/Structures.dm +++ b/code/TriDimension/Structures.dm @@ -55,9 +55,6 @@ del target return ..() - attack_paw(var/mob/M) - return attack_hand(M) - attackby(obj/item/C as obj, mob/user as mob) (..) diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_animals.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_animals.dm index a2e1f1c4b9..4c95b5be1c 100644 --- a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_animals.dm +++ b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_animals.dm @@ -68,7 +68,7 @@ harm_intent_damage = 8 melee_damage_lower = 15 melee_damage_upper = 15 - attacktext = "slashes" + attacktext = "slashed" attack_sound = 'sound/weapons/bite.ogg' layer = 3.1 //so they can stay hidde under the /obj/structure/bush @@ -126,7 +126,7 @@ harm_intent_damage = 2 melee_damage_lower = 3 melee_damage_upper = 10 - attacktext = "bites" + attacktext = "bitten" attack_sound = 'sound/weapons/bite.ogg' layer = 3.1 //so they can stay hidde under the /obj/structure/bush diff --git a/code/WorkInProgress/Chinsky/guestpass.dm b/code/WorkInProgress/Chinsky/guestpass.dm index 2fc9c700bc..7b524fe989 100644 --- a/code/WorkInProgress/Chinsky/guestpass.dm +++ b/code/WorkInProgress/Chinsky/guestpass.dm @@ -71,9 +71,6 @@ /obj/machinery/computer/guestpass/attack_ai(var/mob/user as mob) return attack_hand(user) -/obj/machinery/computer/guestpass/attack_paw(var/mob/user as mob) - return attack_hand(user) - /obj/machinery/computer/guestpass/attack_hand(var/mob/user as mob) if(..()) return diff --git a/code/WorkInProgress/Mini/atmos_control.dm b/code/WorkInProgress/Mini/atmos_control.dm index 2c83a77fd3..38dee770cd 100644 --- a/code/WorkInProgress/Mini/atmos_control.dm +++ b/code/WorkInProgress/Mini/atmos_control.dm @@ -34,9 +34,6 @@ /obj/machinery/computer/atmoscontrol/attack_ai(var/mob/user as mob) return interact(user) -/obj/machinery/computer/atmoscontrol/attack_paw(var/mob/user as mob) - return interact(user) - /obj/machinery/computer/atmoscontrol/attack_hand(mob/user) if(..()) return diff --git a/code/WorkInProgress/Ported/policetape.dm b/code/WorkInProgress/Ported/policetape.dm index f331f8401b..a4d2c31bdc 100644 --- a/code/WorkInProgress/Ported/policetape.dm +++ b/code/WorkInProgress/Ported/policetape.dm @@ -135,8 +135,7 @@ else breaktape(null, user) -/obj/item/tape/attack_paw(mob/user as mob) - breaktape(/obj/item/weapon/wirecutters,user) + /obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob) if(user.a_intent == "help" && ((!can_puncture(W) && src.allowed(user)))) diff --git a/code/WorkInProgress/kilakk/fax.dm b/code/WorkInProgress/kilakk/fax.dm index 2c34229620..8be1e9679d 100644 --- a/code/WorkInProgress/kilakk/fax.dm +++ b/code/WorkInProgress/kilakk/fax.dm @@ -38,9 +38,6 @@ var/list/alldepartments = list("Central Command") /obj/machinery/faxmachine/attack_ai(mob/user as mob) return attack_hand(user) -/obj/machinery/faxmachine/attack_paw(mob/user as mob) - return attack_hand(user) - /obj/machinery/faxmachine/attack_hand(mob/user as mob) user.set_machine(src) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 586b262259..a50bdce685 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -154,7 +154,6 @@ /mob/proc/DblClickOn(var/atom/A, var/params) ClickOn(A,params) - /* Translates into attack_hand, etc. @@ -168,6 +167,21 @@ /mob/proc/UnarmedAttack(var/atom/A, var/proximity_flag) return +/mob/living/UnarmedAttack(var/atom/A, var/proximity_flag) + + if(!ticker) + src << "You cannot attack people before the game has started." + return 0 + + if (istype(get_area(src), /area/start)) + src << "No attacking people at spawn, you jackass." + return 0 + + if(stat) + return 0 + + return 1 + /* Ranged unarmed attack: diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 3c1cb43727..4f4224b04b 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -1,3 +1,7 @@ +// Generic damage proc (slimes and monkeys). +/atom/proc/attack_generic(mob/user as mob) + return 0 + /* Humans: Adds an exception for gloves, to allow special glove types like the ninja ones. @@ -5,15 +9,19 @@ Otherwise pretty standard. */ /mob/living/carbon/human/UnarmedAttack(var/atom/A, var/proximity) - var/obj/item/clothing/gloves/G = gloves // not typecast specifically enough in defines + + if(!..()) + return // Special glove functions: // If the gloves do anything, have them return 1 to stop // normal attack_hand() here. - if(proximity && istype(G) && G.Touch(A,1)) + var/obj/item/clothing/gloves/G = gloves // not typecast specifically enough in defines + if(istype(G) && G.Touch(A,1)) return A.attack_hand(src) + /atom/proc/attack_hand(mob/user as mob) return @@ -41,23 +49,20 @@ return A.attack_tk(src) -/* - Animals & All Unspecified -*/ -/mob/living/UnarmedAttack(var/atom/A) - A.attack_animal(src) -/atom/proc/attack_animal(mob/user as mob) - return /mob/living/RestrainedClickOn(var/atom/A) return /* Monkeys */ -/mob/living/carbon/monkey/UnarmedAttack(var/atom/A) - A.attack_paw(src) -/atom/proc/attack_paw(mob/user as mob) - return + + +/mob/living/carbon/monkey/UnarmedAttack(var/atom/A, var/proximity) + + if(!..()) + return + + A.attack_hand(src) /* Monkey RestrainedClickOn() was apparently the @@ -88,26 +93,91 @@ /* Aliens - Defaults to same as monkey in most places */ /mob/living/carbon/alien/RestrainedClickOn(var/atom/A) return +/mob/living/carbon/alien/UnarmedAttack(var/atom/A, var/proximity) + + if(!..()) + return 0 + + A.attack_generic(src,rand(5,6),"bitten") + /* Slimes Nothing happening here */ -/mob/living/carbon/slime/UnarmedAttack(var/atom/A) - A.attack_slime(src) -/atom/proc/attack_slime(mob/user as mob) - return + /mob/living/carbon/slime/RestrainedClickOn(var/atom/A) return +/mob/living/carbon/slime/UnarmedAttack(var/atom/A, var/proximity) + + if(!..()) + return + + // Eating + if(Victim) + return + + // Basic attack. + A.attack_generic(src, (is_adult ? rand(20,40) : rand(5,25)), "glomped") + + // Handle mob shocks. + var/mob/living/M = A + if(istype(M) && powerlevel > 0 && !istype(A,/mob/living/carbon/slime)) + + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.species.flags & IS_SYNTHETIC || H.species.insulated) + return + + var/power = max(0,min(10,(powerlevel+rand(0,3)))) + + var/stunprob = 10 + switch(power*10) + if(1 to 2) stunprob = 20 + if(3 to 4) stunprob = 30 + if(5 to 6) stunprob = 40 + if(7 to 8) stunprob = 60 + if(9) stunprob = 70 + if(10) stunprob = 95 + + if(prob(stunprob)) + powerlevel = max(0,powerlevel-3) + src.visible_message("\red The [name] has shocked [M]!") + M.Weaken(power) + M.Stun(power) + if (M.stuttering < power) M.stuttering = power + + var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + s.set_up(5, 1, M) + s.start() + + if(prob(stunprob) && powerlevel >= 8) + M.adjustFireLoss(powerlevel * rand(6,10)) + M.updatehealth() /* New Players: Have no reason to click on anything at all. */ /mob/new_player/ClickOn() return + +/* + Animals +*/ +/mob/living/simple_animal/UnarmedAttack(var/atom/A, var/proximity) + + if(!..()) + return + + if(melee_damage_upper == 0 && istype(A,/mob/living)) + custom_emote(1,"[friendly] [src]!") + return + + var/damage = rand(melee_damage_lower, melee_damage_upper) + if(A.attack_generic(src,damage,attacktext,wall_smash) && loc && attack_sound) + playsound(loc, attack_sound, 50, 1, 1) \ No newline at end of file diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index de6b84d655..82c7eb3016 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -193,11 +193,6 @@ return src.master.attackby(a, b) return -/atom/movable/overlay/attack_paw(a, b, c) - if (src.master) - return src.master.attack_paw(a, b, c) - return - /atom/movable/overlay/attack_hand(a, b, c) if (src.master) return src.master.attack_hand(a, b, c) diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index d1398402fc..01ef334ce7 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -324,8 +324,6 @@ return return */ -/obj/machinery/computer/scan_consolenew/attack_paw(user as mob) - ui_interact(user) /obj/machinery/computer/scan_consolenew/attack_ai(user as mob) src.add_hiddenprint(user) @@ -424,15 +422,15 @@ if (connected.beaker.reagents && connected.beaker.reagents.reagent_list.len) for(var/datum/reagent/R in connected.beaker.reagents.reagent_list) data["beakerVolume"] += R.volume - + // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm ui = new(user, src, ui_key, "dna_modifier.tmpl", "DNA Modifier Console", 660, 700) // when the ui is first opened this is the data it will use - ui.set_initial_data(data) + ui.set_initial_data(data) // open the new ui window ui.open() // auto update every Master Controller tick diff --git a/code/game/gamemodes/blob/blobs/factory.dm b/code/game/gamemodes/blob/blobs/factory.dm index b388396639..bb8de8184e 100644 --- a/code/game/gamemodes/blob/blobs/factory.dm +++ b/code/game/gamemodes/blob/blobs/factory.dm @@ -34,7 +34,7 @@ maxHealth = 20 melee_damage_lower = 4 melee_damage_upper = 8 - attacktext = "hits" + attacktext = "hit" attack_sound = 'sound/weapons/genhit1.ogg' var/obj/effect/blob/factory/factory = null faction = "blob" diff --git a/code/game/gamemodes/events/ninja_equipment.dm b/code/game/gamemodes/events/ninja_equipment.dm index 99b127ec1b..bb62f3c8e0 100644 --- a/code/game/gamemodes/events/ninja_equipment.dm +++ b/code/game/gamemodes/events/ninja_equipment.dm @@ -1473,9 +1473,6 @@ It is possible to destroy the net by the occupant or someone else. healthcheck() return - attack_paw() - return attack_hand() - attackby(obj/item/weapon/W as obj, mob/user as mob) var/aforce = W.force health = max(0, health - aforce) diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index 4ab5961323..cc57ccd855 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -165,9 +165,6 @@ var/bomb_set return ..() -/obj/machinery/nuclearbomb/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/machinery/nuclearbomb/attack_hand(mob/user as mob) if (src.extended) if (!ishuman(user)) diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index 641e9473ad..b01b0bbda6 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -45,19 +45,6 @@ if(prob(75)) del(src) -/obj/machinery/optable/attack_paw(mob/user as mob) - if ((HULK in usr.mutations)) - usr << text("\blue You destroy the operating table.") - visible_message("\red [usr] destroys the operating table!") - src.density = 0 - del(src) - if (!( locate(/obj/machinery/optable, user.loc) )) - step(user, get_dir(user, src)) - if (user.loc == src.loc) - user.layer = TURF_LAYER - visible_message("The monkey hides under the table!") - return - /obj/machinery/optable/attack_hand(mob/user as mob) if (HULK in usr.mutations) usr << text("\blue You destroy the table.") diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 047012edcb..026195252e 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -10,7 +10,7 @@ anchored = 1 //About time someone fixed this. density = 1 var/orient = "LEFT" // "RIGHT" changes the dir suffix to "-r" - + use_power = 1 idle_power_usage = 40 @@ -50,9 +50,6 @@ /obj/machinery/sleep_console/attack_ai(mob/user as mob) return src.attack_hand(user) -/obj/machinery/sleep_console/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/machinery/sleep_console/attack_hand(mob/user as mob) if(..()) return @@ -166,7 +163,7 @@ var/amounts = list(5, 10) var/obj/item/weapon/reagent_containers/glass/beaker = null var/filtering = 0 - + use_power = 1 idle_power_usage = 15 active_power_usage = 200 //builtin health analyzer, dialysis machine, injectors. @@ -188,7 +185,7 @@ process() if (stat & (NOPOWER|BROKEN)) return - + if(filtering > 0) if(beaker) if(beaker.reagents.total_volume < beaker.reagents.maximum_volume) @@ -338,7 +335,7 @@ proc/inject_chemical(mob/living/user as mob, chemical, amount) if (stat & (BROKEN|NOPOWER)) return - + if(src.occupant && src.occupant.reagents) if(src.occupant.reagents.get_reagent_amount(chemical) + amount <= 20) use_power(amount * CHEM_SYNTH_ENERGY) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 963b07df0f..97e61e5707 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -211,10 +211,6 @@ */ - -/obj/machinery/body_scanconsole/attack_paw(user as mob) - return src.attack_hand(user) - /obj/machinery/body_scanconsole/attack_ai(user as mob) return src.attack_hand(user) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 49a13e87b7..cf329992c6 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -1094,9 +1094,6 @@ FIRE ALARM /obj/machinery/firealarm/bullet_act(BLAH) return src.alarm() -/obj/machinery/firealarm/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/machinery/firealarm/emp_act(severity) if(prob(50/severity)) alarm() ..() @@ -1379,9 +1376,6 @@ Code shamelessly copied from apc_frame idle_power_usage = 2 active_power_usage = 6 -/obj/machinery/partyalarm/attack_paw(mob/user as mob) - return attack_hand(user) - /obj/machinery/partyalarm/attack_hand(mob/user as mob) if(user.stat || stat & (NOPOWER|BROKEN)) return diff --git a/code/game/machinery/atmoalter/area_atmos_computer.dm b/code/game/machinery/atmoalter/area_atmos_computer.dm index 20347eefe6..935feae3e2 100644 --- a/code/game/machinery/atmoalter/area_atmos_computer.dm +++ b/code/game/machinery/atmoalter/area_atmos_computer.dm @@ -21,9 +21,6 @@ attack_ai(var/mob/user as mob) return src.attack_hand(user) - attack_paw(var/mob/user as mob) - return - attack_hand(var/mob/user as mob) if(..(user)) return diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index 40e04f0928..11fba261ee 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -243,9 +243,6 @@ update_flag /obj/machinery/portable_atmospherics/canister/attack_ai(var/mob/user as mob) return src.attack_hand(user) -/obj/machinery/portable_atmospherics/canister/attack_paw(var/mob/user as mob) - return src.attack_hand(user) - /obj/machinery/portable_atmospherics/canister/attack_hand(var/mob/user as mob) return src.ui_interact(user) diff --git a/code/game/machinery/atmoalter/pump.dm b/code/game/machinery/atmoalter/pump.dm index 718ffcb6b3..cfdcd380da 100644 --- a/code/game/machinery/atmoalter/pump.dm +++ b/code/game/machinery/atmoalter/pump.dm @@ -10,7 +10,7 @@ var/target_pressure = 100 volume = 1000 - + power_rating = 7500 //7500 W ~ 10 HP power_losses = 150 @@ -53,16 +53,16 @@ /obj/machinery/portable_atmospherics/powered/pump/process() ..() var/power_draw = -1 - + if(on && cell && cell.charge) var/datum/gas_mixture/environment if(holding) environment = holding.air_contents else environment = loc.return_air() - + var/pressure_delta - var/output_volume + var/output_volume var/air_temperature if(direction_out) pressure_delta = target_pressure - environment.return_pressure() @@ -72,15 +72,15 @@ pressure_delta = target_pressure - air_contents.return_pressure() output_volume = air_contents.volume * air_contents.group_multiplier air_temperature = air_contents.temperature? air_contents.temperature : environment.temperature - + var/transfer_moles = pressure_delta*output_volume/(air_temperature * R_IDEAL_GAS_EQUATION) - + if (pressure_delta > 0.01) if (direction_out) power_draw = pump_gas(src, air_contents, environment, transfer_moles, power_rating) else power_draw = pump_gas(src, environment, air_contents, transfer_moles, power_rating) - + if (power_draw < 0) last_flow_rate = 0 last_power_draw = 0 @@ -88,13 +88,13 @@ power_draw = max(power_draw, power_losses) cell.use(power_draw * CELLRATE) last_power_draw = power_draw - + update_connected_network() - + //ran out of charge if (!cell.charge) update_icon() - + src.updateDialog() /obj/machinery/portable_atmospherics/powered/pump/return_air() @@ -103,9 +103,6 @@ /obj/machinery/portable_atmospherics/powered/pump/attack_ai(var/mob/user as mob) return src.attack_hand(user) -/obj/machinery/portable_atmospherics/powered/pump/attack_paw(var/mob/user as mob) - return src.attack_hand(user) - /obj/machinery/portable_atmospherics/powered/pump/attack_hand(var/mob/user as mob) user.set_machine(src) diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm index af0a452efe..9e8c508148 100644 --- a/code/game/machinery/atmoalter/scrubber.dm +++ b/code/game/machinery/atmoalter/scrubber.dm @@ -9,7 +9,7 @@ var/volume_rate = 800 volume = 750 - + power_rating = 7500 //7500 W ~ 10 HP power_losses = 150 @@ -48,7 +48,7 @@ /obj/machinery/portable_atmospherics/powered/scrubber/process() ..() - + var/power_draw = -1 if(on && cell && cell.charge) @@ -57,11 +57,11 @@ environment = holding.air_contents else environment = loc.return_air() - + var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles - + power_draw = scrub_gas(src, scrubbing_gas, environment, air_contents, transfer_moles, power_rating) - + if (power_draw < 0) last_flow_rate = 0 last_power_draw = 0 @@ -69,13 +69,13 @@ power_draw = max(power_draw, power_losses) cell.use(power_draw * CELLRATE) last_power_draw = power_draw - + update_connected_network() - + //ran out of charge if (!cell.charge) update_icon() - + //src.update_icon() src.updateDialog() @@ -85,9 +85,6 @@ /obj/machinery/portable_atmospherics/powered/scrubber/attack_ai(var/mob/user as mob) return src.attack_hand(user) -/obj/machinery/portable_atmospherics/powered/scrubber/attack_paw(var/mob/user as mob) - return src.attack_hand(user) - /obj/machinery/portable_atmospherics/powered/scrubber/attack_hand(var/mob/user as mob) user.set_machine(src) @@ -156,14 +153,14 @@ Flow Rate Regulator: - - - S.perunit) S.amount = round(stored_material[mat] / S.perunit) - S.loc = loc + S.loc = loc diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm index d41405aed3..9f98f89dee 100644 --- a/code/game/machinery/bots/bots.dm +++ b/code/game/machinery/bots/bots.dm @@ -52,18 +52,6 @@ user << "[src]'s parts look very loose!" return -/obj/machinery/bot/attack_animal(var/mob/living/simple_animal/M as mob) - if(M.melee_damage_upper == 0) return - src.health -= M.melee_damage_upper - src.visible_message("\red [M] has [M.attacktext] [src]!") - M.attack_log += text("\[[time_stamp()]\] attacked [src.name]") - if(prob(10)) - new /obj/effect/decal/cleanable/blood/oil(src.loc) - healthcheck() - - - - /obj/machinery/bot/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/screwdriver)) if(!locked) diff --git a/code/game/machinery/bots/medbot.dm b/code/game/machinery/bots/medbot.dm index 5a0e424e15..c7381a5cd1 100644 --- a/code/game/machinery/bots/medbot.dm +++ b/code/game/machinery/bots/medbot.dm @@ -96,9 +96,6 @@ src.icon_state = "medibot[src.on]" src.updateUsrDialog() -/obj/machinery/bot/medbot/attack_paw(mob/user as mob) - return attack_hand(user) - /obj/machinery/bot/medbot/attack_hand(mob/user as mob) . = ..() if (.) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index dc1ee050aa..aa5d7a02f1 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -121,8 +121,7 @@ /obj/machinery/clonepod/attack_ai(mob/user as mob) src.add_hiddenprint(user) return attack_hand(user) -/obj/machinery/clonepod/attack_paw(mob/user as mob) - return attack_hand(user) + /obj/machinery/clonepod/attack_hand(mob/user as mob) if ((isnull(src.occupant)) || (stat & NOPOWER)) return diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index 3c153b58d1..9ebc550119 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -43,9 +43,6 @@ var/global/list/holodeck_programs = list( attack_ai(var/mob/user as mob) return src.attack_hand(user) - attack_paw(var/mob/user as mob) - return - attack_hand(var/mob/user as mob) if(..()) @@ -316,15 +313,6 @@ var/global/list/holodeck_programs = list( return // HOLOFLOOR DOES NOT GIVE A FUCK - - - - - - - - - /obj/structure/table/holotable name = "table" desc = "A square piece of metal standing on four metal legs. It can not move." @@ -335,13 +323,6 @@ var/global/list/holodeck_programs = list( layer = 2.8 throwpass = 1 //You can throw objects over this, despite it's density. - -/obj/structure/table/holotable/attack_paw(mob/user as mob) - return attack_hand(user) - -/obj/structure/table/holotable/attack_animal(mob/living/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N - return attack_hand(user) - /obj/structure/table/holotable/attack_hand(mob/user as mob) return // HOLOTABLE DOES NOT GIVE A FUCK @@ -529,10 +510,6 @@ var/global/list/holodeck_programs = list( user << "The station AI is not to interact with these devices!" return -/obj/machinery/readybutton/attack_paw(mob/user as mob) - user << "You are too primitive to use this device." - return - /obj/machinery/readybutton/New() ..() @@ -541,10 +518,14 @@ var/global/list/holodeck_programs = list( user << "The device is a solid button, there's nothing you can do with it!" /obj/machinery/readybutton/attack_hand(mob/user as mob) + if(user.stat || stat & (NOPOWER|BROKEN)) user << "This device is not powered." return + if(!user.IsAdvancedToolUser()) + return 0 + currentarea = get_area(src.loc) if(!currentarea) del(src) diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 5c628354d1..77e5dc977c 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -24,9 +24,6 @@ /obj/machinery/computer/aifixer/attack_ai(var/mob/user as mob) return attack_hand(user) -/obj/machinery/computer/aifixer/attack_paw(var/mob/user as mob) - return attack_hand(user) - /obj/machinery/computer/aifixer/attack_hand(var/mob/user as mob) if(..()) return diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 11bebd70b6..2915bf0761 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -56,9 +56,6 @@ /obj/machinery/computer/arcade/attack_ai(mob/user as mob) return src.attack_hand(user) -/obj/machinery/computer/arcade/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/machinery/computer/arcade/attack_hand(mob/user as mob) if(..()) return diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index c57ab0de54..14c7847c6a 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -15,11 +15,6 @@ attack_ai(var/mob/user as mob) return attack_hand(user) - - attack_paw(var/mob/user as mob) - return attack_hand(user) - - check_eye(var/mob/user as mob) if (user.stat || ((get_dist(user, src) > 1 || !( user.canmove ) || user.blinded) && !istype(user, /mob/living/silicon))) //user can't see - not sure why canmove is here. return null diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 9341aca674..4342778f9a 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -72,9 +72,6 @@ /obj/machinery/computer/card/attack_ai(var/mob/user as mob) return attack_hand(user) -/obj/machinery/computer/card/attack_paw(var/mob/user as mob) - return attack_hand(user) - /obj/machinery/computer/card/attack_hand(mob/user as mob) if(..()) return if(stat & (NOPOWER|BROKEN)) return diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index d8ea79da1d..dadda5cfd7 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -69,9 +69,6 @@ ..() return -/obj/machinery/computer/cloning/attack_paw(mob/user as mob) - return attack_hand(user) - /obj/machinery/computer/cloning/attack_ai(mob/user as mob) return attack_hand(user) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index a6047cf534..0af60a14c7 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -276,11 +276,6 @@ /obj/machinery/computer/communications/attack_ai(var/mob/user as mob) return src.attack_hand(user) - -/obj/machinery/computer/communications/attack_paw(var/mob/user as mob) - return src.attack_hand(user) - - /obj/machinery/computer/communications/attack_hand(var/mob/user as mob) if(..()) return diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index a23c717a7b..f21322a3e2 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -44,9 +44,6 @@ /obj/machinery/computer/med_data/attack_ai(user as mob) return src.attack_hand(user) -/obj/machinery/computer/med_data/attack_paw(user as mob) - return src.attack_hand(user) - /obj/machinery/computer/med_data/attack_hand(mob/user as mob) if(..()) return diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index 5a33b62cb8..042555fe00 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -110,11 +110,6 @@ /obj/machinery/computer/pod/attack_ai(var/mob/user as mob) return attack_hand(user) - -/obj/machinery/computer/pod/attack_paw(var/mob/user as mob) - return attack_hand(user) - - /obj/machinery/computer/pod/attack_hand(var/mob/user as mob) if(..()) return diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index 3bd94c747a..56f093276a 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -17,11 +17,6 @@ attack_ai(var/mob/user as mob) return src.attack_hand(user) - - attack_paw(var/mob/user as mob) - return - - attack_hand(var/mob/user as mob) if(..()) return diff --git a/code/game/machinery/computer/prisonshuttle.dm b/code/game/machinery/computer/prisonshuttle.dm index 25607ab66f..f1c57104cc 100644 --- a/code/game/machinery/computer/prisonshuttle.dm +++ b/code/game/machinery/computer/prisonshuttle.dm @@ -21,19 +21,9 @@ var/prison_shuttle_timeleft = 0 var/allowedtocall = 0 var/prison_break = 0 - - attackby(I as obj, user as mob) - return src.attack_hand(user) - - attack_ai(var/mob/user as mob) return src.attack_hand(user) - - attack_paw(var/mob/user as mob) - return src.attack_hand(user) - - attackby(I as obj, user as mob) if(istype(I, /obj/item/weapon/screwdriver)) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index f8029b0e96..43e65b1273 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -20,11 +20,6 @@ /obj/machinery/computer/robotics/attack_ai(var/mob/user as mob) return src.attack_hand(user) -/obj/machinery/computer/robotics/attack_paw(var/mob/user as mob) - - return src.attack_hand(user) - return - /obj/machinery/computer/robotics/attack_hand(var/mob/user as mob) if(..()) return @@ -197,10 +192,10 @@ else if (href_list["magbot"]) if(src.allowed(usr)) var/mob/living/silicon/robot/R = locate(href_list["magbot"]) - + // whatever weirdness this is supposed to be, but that is how the href gets added, so here it is again if(istype(R) && istype(usr, /mob/living/silicon) && usr.mind.special_role && (usr.mind.original == usr) && !R.emagged) - + var/choice = input("Are you certain you wish to hack [R.name]?") in list("Confirm", "Abort") if(choice == "Confirm") if(R && istype(R)) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index fde49fb7e3..f1f866864a 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -50,9 +50,6 @@ /obj/machinery/computer/secure_data/attack_ai(mob/user as mob) return attack_hand(user) -/obj/machinery/computer/secure_data/attack_paw(mob/user as mob) - return attack_hand(user) - //Someone needs to break down the dat += into chunks instead of long ass lines. /obj/machinery/computer/secure_data/attack_hand(mob/user as mob) if(..()) diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index 6d2a4857c5..21d584fe8b 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -33,9 +33,6 @@ /obj/machinery/computer/skills/attack_ai(mob/user as mob) return attack_hand(user) -/obj/machinery/computer/skills/attack_paw(mob/user as mob) - return attack_hand(user) - //Someone needs to break down the dat += into chunks instead of long ass lines. /obj/machinery/computer/skills/attack_hand(mob/user as mob) if(..()) diff --git a/code/game/machinery/computer/specops_shuttle.dm b/code/game/machinery/computer/specops_shuttle.dm index bc050c6d1d..ba44553b16 100644 --- a/code/game/machinery/computer/specops_shuttle.dm +++ b/code/game/machinery/computer/specops_shuttle.dm @@ -248,9 +248,6 @@ var/specops_shuttle_timeleft = 0 /obj/machinery/computer/specops_shuttle/attack_ai(var/mob/user as mob) return attack_hand(user) -/obj/machinery/computer/specops_shuttle/attack_paw(var/mob/user as mob) - return attack_hand(user) - /obj/machinery/computer/specops_shuttle/attackby(I as obj, user as mob) if(istype(I,/obj/item/weapon/card/emag)) user << "\blue The electronic systems in this console are far too advanced for your primitive hacking peripherals." diff --git a/code/game/machinery/computer/syndicate_specops_shuttle.dm b/code/game/machinery/computer/syndicate_specops_shuttle.dm index 7ba21efbcf..970a68b64a 100644 --- a/code/game/machinery/computer/syndicate_specops_shuttle.dm +++ b/code/game/machinery/computer/syndicate_specops_shuttle.dm @@ -184,9 +184,6 @@ var/syndicate_elite_shuttle_timeleft = 0 /obj/machinery/computer/syndicate_elite_shuttle/attack_ai(var/mob/user as mob) return attack_hand(user) -/obj/machinery/computer/syndicate_elite_shuttle/attack_paw(var/mob/user as mob) - return attack_hand(user) - /obj/machinery/computer/syndicate_elite_shuttle/attackby(I as obj, user as mob) if(istype(I,/obj/item/weapon/card/emag)) user << "\blue The electronic systems in this console are far too advanced for your primitive hacking peripherals." diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 48321f9fc8..dd94a88bc6 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -20,9 +20,6 @@ var/global/list/frozen_items = list() circuit = "/obj/item/weapon/circuitboard/cryopodcontrol" var/mode = null -/obj/machinery/computer/cryopod/attack_paw() - src.attack_hand() - /obj/machinery/computer/cryopod/attack_ai() src.attack_hand() diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm index 496c55ecb6..05b8cb7f8c 100644 --- a/code/game/machinery/door_control.dm +++ b/code/game/machinery/door_control.dm @@ -41,9 +41,6 @@ else user << "Error, no route to host." -/obj/machinery/door_control/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/machinery/door_control/attackby(obj/item/weapon/W, mob/user as mob) /* For later implementation if (istype(W, /obj/item/weapon/screwdriver)) @@ -155,9 +152,6 @@ /obj/machinery/driver_button/attack_ai(mob/user as mob) return src.attack_hand(user) -/obj/machinery/driver_button/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/machinery/driver_button/attackby(obj/item/weapon/W, mob/user as mob) if(istype(W, /obj/item/device/detective_scanner)) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 65a1010089..4f015975fe 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -606,8 +606,6 @@ About the new airlock wires panel: s.set_up(5, 1, src) s.start() return ..() -/obj/machinery/door/airlock/attack_paw(mob/user as mob) - return src.attack_hand(user) /obj/machinery/door/airlock/attack_hand(mob/user as mob) if(!istype(usr, /mob/living/silicon)) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 0290d49ace..540d3facbf 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -152,11 +152,6 @@ /obj/machinery/door/attack_ai(mob/user as mob) return src.attack_hand(user) - -/obj/machinery/door/attack_paw(mob/user as mob) - return src.attack_hand(user) - - /obj/machinery/door/attack_hand(mob/user as mob) return src.attackby(user, user) diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index ec41175380..84fa419265 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -3,7 +3,7 @@ name = "Embedded Controller" anchored = 1 - + use_power = 1 idle_power_usage = 10 @@ -29,11 +29,11 @@ /obj/machinery/embedded_controller/attack_ai(mob/user as mob) src.ui_interact(user) -/obj/machinery/embedded_controller/attack_paw(mob/user as mob) - user << "You do not have the dexterity to use this." - return - /obj/machinery/embedded_controller/attack_hand(mob/user as mob) + + if(!user.IsAdvancedToolUser()) + return 0 + src.ui_interact(user) /obj/machinery/embedded_controller/ui_interact() @@ -44,7 +44,7 @@ icon_state = "airlock_control_standby" power_channel = ENVIRON density = 0 - + var/id_tag //var/radio_power_use = 50 //power used to xmit signals diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 345d9f44d5..632fee8215 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -122,9 +122,6 @@ /obj/machinery/flasher_button/attack_ai(mob/user as mob) return src.attack_hand(user) -/obj/machinery/flasher_button/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/machinery/flasher_button/attackby(obj/item/weapon/W, mob/user as mob) return src.attack_hand(user) diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm index 073973cdee..a4bd1456cf 100644 --- a/code/game/machinery/holosign.dm +++ b/code/game/machinery/holosign.dm @@ -47,8 +47,6 @@ /obj/machinery/holosign_switch/attack_ai(mob/user as mob) return src.attack_hand(user) / -obj/machinery/holosign_switch/attack_paw(mob/user as mob) - return src.attack_hand(user) /obj/machinery/holosign_switch/attackby(obj/item/weapon/W, mob/user as mob) if(istype(W, /obj/item/device/detective_scanner)) diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index dcc67a5af2..500c2cf061 100755 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -13,9 +13,6 @@ /obj/machinery/igniter/attack_ai(mob/user as mob) return src.attack_hand(user) -/obj/machinery/igniter/attack_paw(mob/user as mob) - return - /obj/machinery/igniter/attack_hand(mob/user as mob) if(..()) return @@ -63,7 +60,7 @@ /obj/machinery/sparker/power_change() ..() if ( !(stat & NOPOWER) && disable == 0 ) - + icon_state = "[base_state]" // src.sd_SetLuminosity(2) else @@ -121,9 +118,6 @@ /obj/machinery/ignition_switch/attack_ai(mob/user as mob) return src.attack_hand(user) -/obj/machinery/ignition_switch/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/machinery/ignition_switch/attackby(obj/item/weapon/W, mob/user as mob) return src.attack_hand(user) diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index b74d3a587a..a005d0e9d4 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -62,9 +62,6 @@ else src.overlays += image('icons/obj/kitchen.dmi', "gridle") -/obj/machinery/gibber/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/machinery/gibber/relaymove(mob/user as mob) src.go_out() return diff --git a/code/game/machinery/kitchen/juicer.dm b/code/game/machinery/kitchen/juicer.dm index dc62b875ee..a5a15fb876 100644 --- a/code/game/machinery/kitchen/juicer.dm +++ b/code/game/machinery/kitchen/juicer.dm @@ -53,9 +53,6 @@ src.updateUsrDialog() return 0 -/obj/machinery/juicer/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/machinery/juicer/attack_ai(mob/user as mob) return 0 diff --git a/code/game/machinery/kitchen/microwave.dm b/code/game/machinery/kitchen/microwave.dm index 0ade94a93f..4af48a539b 100644 --- a/code/game/machinery/kitchen/microwave.dm +++ b/code/game/machinery/kitchen/microwave.dm @@ -138,9 +138,6 @@ return 1 src.updateUsrDialog() -/obj/machinery/microwave/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/machinery/microwave/attack_ai(mob/user as mob) return 0 diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm index 2350b8120c..52ca3debd9 100644 --- a/code/game/machinery/kitchen/smartfridge.dm +++ b/code/game/machinery/kitchen/smartfridge.dm @@ -218,9 +218,6 @@ ..() -/obj/machinery/smartfridge/attack_paw(mob/user as mob) - return attack_hand(user) - /obj/machinery/smartfridge/attack_ai(mob/user as mob) return 0 diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index f7c1bcfa8f..1c9a9bd21d 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -41,10 +41,6 @@ if(..(user, 1)) user << "A light switch. It is [on? "on" : "off"]." - -/obj/machinery/light_switch/attack_paw(mob/user) - src.attack_hand(user) - /obj/machinery/light_switch/attack_hand(mob/user) on = !on diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 3f08862d9a..32c1071cd2 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -232,9 +232,6 @@ Class Procs: else return src.attack_hand(user) -/obj/machinery/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/machinery/attack_hand(mob/user as mob) if(inoperable(MAINT)) return 1 diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 71f450e70f..16e1cc032d 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -126,10 +126,11 @@ attack_ai(var/mob/user) interact(user, 1) - attack_paw() - return - attack_hand(var/mob/user) + + if(!user.IsAdvancedToolUser()) + return 0 + interact(user, 0) interact(var/mob/user, var/ai = 0) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index c9a1ddb657..5e278bf2f5 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -243,8 +243,13 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co return src.attack_hand(user) /obj/machinery/newscaster/attack_hand(mob/user as mob) //########### THE MAIN BEEF IS HERE! And in the proc below this...############ + if(!src.ispowered || src.isbroken) return + + if(!user.IsAdvancedToolUser()) + return 0 + if(istype(user, /mob/living/carbon/human) || istype(user,/mob/living/silicon) ) var/mob/living/human_or_robot_user = user var/dat @@ -773,11 +778,6 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co /obj/machinery/newscaster/attack_ai(mob/user as mob) return src.attack_hand(user) //or maybe it'll have some special functions? No idea. - -/obj/machinery/newscaster/attack_paw(mob/user as mob) - user << "The newscaster controls are far too complicated for your tiny brain!" - return - /datum/news_photo var/is_synth = 0 var/obj/item/weapon/photo/photo = null diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm index e57ccfe1ed..49f566af57 100644 --- a/code/game/machinery/pipe/pipe_dispenser.dm +++ b/code/game/machinery/pipe/pipe_dispenser.dm @@ -7,9 +7,6 @@ var/unwrenched = 0 var/wait = 0 -/obj/machinery/pipedispenser/attack_paw(user as mob) - return src.attack_hand(user) - /obj/machinery/pipedispenser/attack_hand(user as mob) if(..()) return diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 6cdedefe7f..8a949f7272 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -65,9 +65,6 @@ obj/machinery/recharger/attack_hand(mob/user as mob) charging = null update_icon() -obj/machinery/recharger/attack_paw(mob/user as mob) - return attack_hand(user) - obj/machinery/recharger/process() if(stat & (NOPOWER|BROKEN) || !anchored) update_use_power(0) diff --git a/code/game/machinery/robot_fabricator.dm b/code/game/machinery/robot_fabricator.dm index 085f455deb..0c3ae56115 100644 --- a/code/game/machinery/robot_fabricator.dm +++ b/code/game/machinery/robot_fabricator.dm @@ -32,9 +32,6 @@ else user << "The robot part maker is full. Please remove metal from the robot part maker in order to insert more." -/obj/machinery/robotic_fabricator/attack_paw(user as mob) - return src.attack_hand(user) - /obj/machinery/robotic_fabricator/attack_hand(user as mob) var/dat if (..()) diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index bee250fd29..68da5f0ef1 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -94,6 +94,8 @@ return if(stat & NOPOWER) return + if(!user.IsAdvancedToolUser()) + return 0 if(src.panelopen) //The maintenance panel is open. Time for some shady stuff dat+= "Suit storage unit: Maintenance panel" dat+= "Maintenance panel controls
" @@ -559,12 +561,6 @@ /obj/machinery/suit_storage_unit/attack_ai(mob/user as mob) return src.attack_hand(user) - -/obj/machinery/suit_storage_unit/attack_paw(mob/user as mob) - user << "The console controls are far too complicated for your tiny brain!" - return - - //////////////////////////////REMINDER: Make it lock once you place some fucker inside. //God this entire file is fucking awful @@ -657,10 +653,6 @@ /obj/machinery/suit_cycler/attack_ai(mob/user as mob) return src.attack_hand(user) -/obj/machinery/suit_cycler/attack_paw(mob/user as mob) - user << "\blue The console controls are far too complicated for your tiny brain!" - return - /obj/machinery/suit_cycler/attackby(obj/item/I as obj, mob/user as mob) if(electrified != 0) @@ -786,6 +778,9 @@ if(..() || stat & (BROKEN|NOPOWER)) return + if(!user.IsAdvancedToolUser()) + return 0 + if(electrified != 0) if(src.shock(user, 100)) return diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index b247f17919..acd89ee17c 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -77,9 +77,6 @@ return -/obj/machinery/computer/teleporter/attack_paw() - src.attack_hand() - /obj/machinery/teleport/station/attack_ai() src.attack_hand() @@ -311,9 +308,6 @@ /obj/machinery/teleport/station/attackby(var/obj/item/weapon/W) src.attack_hand() -/obj/machinery/teleport/station/attack_paw() - src.attack_hand() - /obj/machinery/teleport/station/attack_ai() src.attack_hand() diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm index f9e8a94747..567afc0d6d 100644 --- a/code/game/machinery/turrets.dm +++ b/code/game/machinery/turrets.dm @@ -338,18 +338,18 @@ spawn(13) del(src) -/obj/machinery/turret/attack_animal(mob/living/M as mob) - if(M.melee_damage_upper == 0) return - if(!(stat & BROKEN)) - visible_message("\red [M] [M.attacktext] [src]!") - M.attack_log += text("\[[time_stamp()]\] attacked [src.name]") - //src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") - src.health -= M.melee_damage_upper - if (src.health <= 0) - src.die() - else - M << "\red That object is useless to you." - return +/obj/machinery/turret/attack_generic(var/mob/user, var/damage, var/attack_message) + if(!damage) + return 0 + if(stat & BROKEN) + user << "That object is useless to you." + return 0 + visible_message("[user] [attack_message] the [src]!") + user.attack_log += text("\[[time_stamp()]\] attacked [src.name]") + src.health -= damage + if (src.health <= 0) + src.die() + return 1 /obj/structure/turret/gun_turret name = "Gun Turret" diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index aaf8283a00..d94b483c4c 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -274,10 +274,6 @@ else usr << "\icon[src]Error: Unable to access your account. Please contact technical support if problem persists." - -/obj/machinery/vending/attack_paw(mob/user as mob) - return attack_hand(user) - /obj/machinery/vending/attack_ai(mob/user as mob) return attack_hand(user) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 2a33539bc8..558d1d6076 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -444,28 +444,6 @@ src.log_append_to_last("Armor saved.") return -/obj/mecha/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/mecha/attack_animal(mob/living/user as mob) - src.log_message("Attack by simple animal. Attacker - [user].",1) - if(user.melee_damage_upper == 0) - user.emote("[user.friendly] [src]") - else - if(!prob(src.deflect_chance)) - var/damage = rand(user.melee_damage_lower, user.melee_damage_upper) - src.take_damage(damage) - src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) - visible_message("\red [user] [user.attacktext] [src]!") - user.attack_log += text("\[[time_stamp()]\] attacked [src.name]") - else - src.log_append_to_last("Armor saved.") - playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1) - src.occupant_message("\blue The [user]'s attack is stopped by the armor.") - visible_message("\blue The [user] rebounds off [src.name]'s armor!") - user.attack_log += text("\[[time_stamp()]\] attacked [src.name]") - return - /obj/mecha/hitby(atom/movable/A as mob|obj) //wrapper ..() src.log_message("Hit by [A].",1) @@ -1725,6 +1703,27 @@ icon_state = initial(icon_state) return icon_state +/obj/mecha/attack_generic(var/mob/user, var/damage, var/attack_message) + + if(!damage) + return 0 + + src.log_message("Attack by an animal. Attacker - [user].",1) + + if(!prob(src.deflect_chance)) + src.take_damage(damage) + src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) + visible_message("\red [user] [attack_message] [src]!") + user.attack_log += text("\[[time_stamp()]\] attacked [src.name]") + else + src.log_append_to_last("Armor saved.") + playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1) + src.occupant_message("\blue The [user]'s attack is stopped by the armor.") + visible_message("\blue The [user] rebounds off [src.name]'s armor!") + user.attack_log += text("\[[time_stamp()]\] attacked [src.name]") + return 1 + + ////////////////////////////////////////// //////// Mecha global iterators //////// ////////////////////////////////////////// diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm index da461662f8..051f2e8129 100644 --- a/code/game/mecha/mecha_control_console.dm +++ b/code/game/mecha/mecha_control_console.dm @@ -11,9 +11,6 @@ attack_ai(var/mob/user as mob) return src.attack_hand(user) - attack_paw(var/mob/user as mob) - return src.attack_hand(user) - attack_hand(var/mob/user as mob) if(..()) return diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm index 0ee04f0230..56e5327079 100644 --- a/code/game/objects/effects/aliens.dm +++ b/code/game/objects/effects/aliens.dm @@ -127,9 +127,6 @@ healthcheck() return -/obj/effect/alien/resin/attack_paw() - return attack_hand() - /obj/effect/alien/resin/attackby(obj/item/weapon/W as obj, mob/user as mob) var/aforce = W.force diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index ee82396788..e67288a52b 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -653,10 +653,6 @@ steam.start() -- spawns the effect if(metal==1 || prob(50)) del(src) - attack_paw(var/mob/user) - attack_hand(user) - return - attack_hand(var/mob/user) if ((HULK in user.mutations) || (prob(75 - metal*25))) user << "\blue You smash through the metal foam wall." diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 33b6159a8c..4544156923 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -152,30 +152,6 @@ user.put_in_active_hand(src) return - -/obj/item/attack_paw(mob/user as mob) - - if (istype(src.loc, /obj/item/weapon/storage)) - for(var/mob/M in range(1, src.loc)) - if (M.s_active == src.loc) - if (M.client) - M.client.screen -= src - src.throwing = 0 - if (src.loc == user) - //canremove==0 means that object may not be removed. You can still wear it. This only applies to clothing. /N - if(istype(src, /obj/item/clothing) && !src:canremove) - return - else - user.u_equip(src) - else - if(istype(src.loc, /mob/living)) - return - src.pickup(user) - user.next_move = max(user.next_move+2,world.time + 2) - - user.put_in_active_hand(src) - return - // Due to storage type consolidation this should get used more now. // I have cleaned it up a little, but it could probably use more. -Sayu /obj/item/attackby(obj/item/weapon/W as obj, mob/user as mob) diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index 72e39b7063..106316dc87 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -58,11 +58,6 @@ else ..() - - - attack_paw() - return - attack_ai() return diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 28646e2105..22976e9cb5 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -24,10 +24,6 @@ spawn (0) attack_self(user) -/obj/item/device/radio/intercom/attack_paw(mob/user as mob) - return src.attack_hand(user) - - /obj/item/device/radio/intercom/attack_hand(mob/user as mob) src.add_fingerprint(user) spawn (0) diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index c1126464f5..f65442e462 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -64,7 +64,6 @@ if(!user || !src) return 0 if(!istype(user.loc,/turf)) return 0 if(!user.IsAdvancedToolUser()) - user << "\red You don't have the dexterity to do this!" return 0 var/title = "Sheet-Glass" title += " ([src.amount] sheet\s left)" @@ -145,7 +144,6 @@ if(!user || !src) return 0 if(!istype(user.loc,/turf)) return 0 if(!user.IsAdvancedToolUser()) - user << "\red You don't have the dexterity to do this!" return 0 var/title = "Sheet Reinf. Glass" title += " ([src.amount] sheet\s left)" diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 95cf77dd21..e41b29364e 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -28,9 +28,6 @@ SetValue(src.value) //testing("[name]: DNA2 SE blocks after SetValue: [english_list(buf.dna.SE)]") -/obj/item/weapon/dnainjector/attack_paw(mob/user as mob) - return attack_hand(user) - /obj/item/weapon/dnainjector/proc/GetRealBlock(var/selblock) if(selblock==0) return block diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index c7df55f3e0..2ff3114423 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -108,7 +108,4 @@ /obj/item/weapon/grenade/attack_hand() walk(src, null, null) ..() - return - -/obj/item/weapon/grenade/attack_paw(mob/user as mob) - return attack_hand(user) + return \ No newline at end of file diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index 079b0c9fb2..b3e94bf4d9 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -31,9 +31,6 @@ if(..(user, 1)) user << text("The service panel is [src.open ? "open" : "closed"].") - attack_paw(mob/user as mob) - return attack_hand(user) - attackby(obj/item/weapon/W as obj, mob/user as mob) if(locked) if ( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && (!src.emagged)) diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index bed3cb9de0..a4c9a2bc85 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -1,5 +1,6 @@ /obj/structure icon = 'icons/obj/structures.dmi' + var/climbable var/breakable var/parts @@ -14,22 +15,12 @@ if(breakable) if(HULK in user.mutations) user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) - visible_message("[user] smashes the [src] apart!") - destroy() + attack_generic(user,1,"smashes") 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) + attack_generic(user,1,"slices") + return /obj/structure/blob_act() if(prob(50)) @@ -175,4 +166,11 @@ if (issilicon(user)) user << "You need hands for this." return 0 + return 1 + +/obj/structure/attack_generic(var/mob/user, var/damage, var/attack_verb, var/wallbreaker) + if(!breakable || !damage || !wallbreaker) + return 0 + visible_message("[user] [attack_verb] the [src] apart!") + spawn(1) destroy() return 1 \ No newline at end of file diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 3e6348d5ec..8a3cccae46 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -108,7 +108,7 @@ LINEN BINS /obj/structure/bedsheetbin/examine(mob/user) ..(user) - + if(amount < 1) user << "There are no bed sheets in the bin." return @@ -138,12 +138,6 @@ LINEN BINS hidden = I user << "You hide [I] among the sheets." - - -/obj/structure/bedsheetbin/attack_paw(mob/user as mob) - return attack_hand(user) - - /obj/structure/bedsheetbin/attack_hand(mob/user as mob) if(amount >= 1) amount-- diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index ce8f8523d9..44c2c3b900 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -174,13 +174,6 @@ return -/obj/structure/closet/attack_animal(mob/living/user as mob) - if(user.wall_smash) - visible_message("\red [user] destroys the [src]. ") - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - del(src) - // this should probably use dump_contents() /obj/structure/closet/blob_act() if(prob(75)) @@ -267,10 +260,6 @@ spawn(30) lastbang = 0 - -/obj/structure/closet/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/structure/closet/attack_hand(mob/user as mob) src.add_fingerprint(user) src.toggle(user) @@ -308,4 +297,12 @@ for (var/atom/A in src) if(istype(A,/obj/)) var/obj/O = A - O.hear_talk(M, text) \ No newline at end of file + O.hear_talk(M, text) + +/obj/structure/closet/attack_generic(var/mob/user, var/damage, var/attack_message = "destroys", var/wallbreaker) + if(!damage || !wallbreaker) + return + visible_message("[user] [attack_message] the [src]!") + dump_contents() + spawn(1) del(src) + return 1 \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm index 87eb2cb811..5ce93c76a4 100644 --- a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm +++ b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm @@ -181,10 +181,6 @@ usr << "\blue The [src.name] is closed." update_icon() - attack_paw(mob/user as mob) - attack_hand(user) - return - attack_ai(mob/user as mob) if(src.smashed) user << "\red The security of the cabinet is compromised." diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index f6ce5d6d81..479fdcb262 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -104,9 +104,6 @@ else src.toggle(user) -/obj/structure/closet/secure_closet/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/structure/closet/secure_closet/verb/verb_togglelock() set src in oview(1) // One square distance set category = "Object" diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index c6cf316b2b..f30e0e2545 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -76,9 +76,6 @@ ..() return -/obj/structure/displaycase/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/structure/displaycase/attack_hand(mob/user as mob) if (src.destroyed && src.occupied) new /obj/item/weapon/gun/energy/laser/captain( src.loc ) diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index 3ba3c79a37..cf61e68b50 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -54,11 +54,6 @@ opened = !opened update_icon() -/obj/structure/extinguisher_cabinet/attack_paw(mob/user) - attack_hand(user) - return - - /obj/structure/extinguisher_cabinet/update_icon() if(!opened) icon_state = "extinguisher_closed" diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 93f4777adb..e3ae4353dd 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -6,200 +6,199 @@ var/state = 0 var/health = 200 +/obj/structure/girder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker) + if(!damage || !wallbreaker) + return 0 + visible_message("[user] [attack_message] the [src]!") + spawn(1) dismantle() + return 1 - bullet_act(var/obj/item/projectile/Proj) - if(istype(Proj, /obj/item/projectile/beam)) - health -= Proj.damage - ..() - if(health <= 0) - new /obj/item/stack/sheet/metal(get_turf(src)) - del(src) +/obj/structure/girder/bullet_act(var/obj/item/projectile/Proj) + if(istype(Proj, /obj/item/projectile/beam)) + health -= Proj.damage + ..() + if(health <= 0) + new /obj/item/stack/sheet/metal(get_turf(src)) + del(src) - return + return - attackby(obj/item/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench) && state == 0) - if(anchored && !istype(src,/obj/structure/girder/displaced)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) - user << "\blue Now disassembling the girder" - if(do_after(user,40)) - if(!src) return - user << "\blue You dissasembled the girder!" - dismantle() - else if(!anchored) - playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) - user << "\blue Now securing the girder" - if(get_turf(user, 40)) - user << "\blue You secured the girder!" - new/obj/structure/girder( src.loc ) - del(src) - - else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter)) - user << "\blue Now slicing apart the girder" - if(do_after(user,30)) +/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/wrench) && state == 0) + if(anchored && !istype(src,/obj/structure/girder/displaced)) + playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) + user << "\blue Now disassembling the girder" + if(do_after(user,40)) if(!src) return - user << "\blue You slice apart the girder!" + user << "\blue You dissasembled the girder!" dismantle() - - else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill)) - user << "\blue You drill through the girder!" - dismantle() - - else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 && istype(src,/obj/structure/girder/reinforced)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1) - user << "\blue Now unsecuring support struts" - if(do_after(user,40)) - if(!src) return - user << "\blue You unsecured the support struts!" - state = 1 - - else if(istype(W, /obj/item/weapon/wirecutters) && istype(src,/obj/structure/girder/reinforced) && state == 1) - playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) - user << "\blue Now removing support struts" - if(do_after(user,40)) - if(!src) return - user << "\blue You removed the support struts!" + else if(!anchored) + playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) + user << "\blue Now securing the girder" + if(get_turf(user, 40)) + user << "\blue You secured the girder!" new/obj/structure/girder( src.loc ) del(src) - else if(istype(W, /obj/item/weapon/crowbar) && state == 0 && anchored ) - playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) - user << "\blue Now dislodging the girder" - if(do_after(user, 40)) - if(!src) return - user << "\blue You dislodged the girder!" - new/obj/structure/girder/displaced( src.loc ) - del(src) + else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter)) + user << "\blue Now slicing apart the girder" + if(do_after(user,30)) + if(!src) return + user << "\blue You slice apart the girder!" + dismantle() - else if(istype(W, /obj/item/stack/sheet)) + else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill)) + user << "\blue You drill through the girder!" + dismantle() - var/obj/item/stack/sheet/S = W - switch(S.type) + else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 && istype(src,/obj/structure/girder/reinforced)) + playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1) + user << "\blue Now unsecuring support struts" + if(do_after(user,40)) + if(!src) return + user << "\blue You unsecured the support struts!" + state = 1 - if(/obj/item/stack/sheet/metal, /obj/item/stack/sheet/metal/cyborg) - if(!anchored) - if(S.use(2)) - user << "You create a false wall! Push on it to open or close the passage." - new /obj/structure/falsewall (src.loc) + else if(istype(W, /obj/item/weapon/wirecutters) && istype(src,/obj/structure/girder/reinforced) && state == 1) + playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) + user << "\blue Now removing support struts" + if(do_after(user,40)) + if(!src) return + user << "\blue You removed the support struts!" + new/obj/structure/girder( src.loc ) + del(src) + + else if(istype(W, /obj/item/weapon/crowbar) && state == 0 && anchored ) + playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) + user << "\blue Now dislodging the girder" + if(do_after(user, 40)) + if(!src) return + user << "\blue You dislodged the girder!" + new/obj/structure/girder/displaced( src.loc ) + del(src) + + else if(istype(W, /obj/item/stack/sheet)) + + var/obj/item/stack/sheet/S = W + switch(S.type) + + if(/obj/item/stack/sheet/metal, /obj/item/stack/sheet/metal/cyborg) + if(!anchored) + if(S.use(2)) + user << "You create a false wall! Push on it to open or close the passage." + new /obj/structure/falsewall (src.loc) + del(src) + else + if(S.get_amount() < 2) return ..() + user << "Now adding plating..." + if (do_after(user,40)) + if (S.use(2)) + user << "You added the plating!" + var/turf/Tsrc = get_turf(src) + Tsrc.ChangeTurf(/turf/simulated/wall) + for(var/turf/simulated/wall/X in Tsrc.loc) + if(X) X.add_hiddenprint(usr) del(src) - else - if(S.get_amount() < 2) return ..() - user << "Now adding plating..." - if (do_after(user,40)) - if (S.use(2)) - user << "You added the plating!" + return + + if(/obj/item/stack/sheet/plasteel) + if(!anchored) + if(S.use(2)) + user << "\blue You create a false wall! Push on it to open or close the passage." + new /obj/structure/falserwall (src.loc) + del(src) + else + if (src.icon_state == "reinforced") //I cant believe someone would actually write this line of code... + if(S.get_amount() < 1) return ..() + user << "Now finalising reinforced wall." + if(do_after(user, 50)) + if (S.use(1)) + user << "Wall fully reinforced!" var/turf/Tsrc = get_turf(src) - Tsrc.ChangeTurf(/turf/simulated/wall) - for(var/turf/simulated/wall/X in Tsrc.loc) + Tsrc.ChangeTurf(/turf/simulated/wall/r_wall) + for(var/turf/simulated/wall/r_wall/X in Tsrc.loc) if(X) X.add_hiddenprint(usr) del(src) return - - if(/obj/item/stack/sheet/plasteel) - if(!anchored) - if(S.use(2)) - user << "\blue You create a false wall! Push on it to open or close the passage." - new /obj/structure/falserwall (src.loc) - del(src) else - if (src.icon_state == "reinforced") //I cant believe someone would actually write this line of code... - if(S.get_amount() < 1) return ..() - user << "Now finalising reinforced wall." - if(do_after(user, 50)) - if (S.use(1)) - user << "Wall fully reinforced!" - var/turf/Tsrc = get_turf(src) - Tsrc.ChangeTurf(/turf/simulated/wall/r_wall) - for(var/turf/simulated/wall/r_wall/X in Tsrc.loc) - if(X) X.add_hiddenprint(usr) - del(src) - return - else - if(S.get_amount() < 1) return ..() - user << "Now reinforcing girders..." - if (do_after(user,60)) - if(S.use(1)) - user << "Girders reinforced!" - new/obj/structure/girder/reinforced( src.loc ) - del(src) - return + if(S.get_amount() < 1) return ..() + user << "Now reinforcing girders..." + if (do_after(user,60)) + if(S.use(1)) + user << "Girders reinforced!" + new/obj/structure/girder/reinforced( src.loc ) + del(src) + return - if(S.sheettype) - var/M = S.sheettype - if(!anchored) - if(S.amount < 2) return + if(S.sheettype) + var/M = S.sheettype + if(!anchored) + if(S.amount < 2) return + S.use(2) + user << "\blue You create a false wall! Push on it to open or close the passage." + var/F = text2path("/obj/structure/falsewall/[M]") + new F (src.loc) + del(src) + else + if(S.amount < 2) return ..() + user << "\blue Now adding plating..." + if (do_after(user,40)) + if(!src || !S || S.amount < 2) return S.use(2) - user << "\blue You create a false wall! Push on it to open or close the passage." - var/F = text2path("/obj/structure/falsewall/[M]") - new F (src.loc) + user << "\blue You added the plating!" + var/turf/Tsrc = get_turf(src) + Tsrc.ChangeTurf(text2path("/turf/simulated/wall/mineral/[M]")) + for(var/turf/simulated/wall/mineral/X in Tsrc.loc) + if(X) X.add_hiddenprint(usr) del(src) - else - if(S.amount < 2) return ..() - user << "\blue Now adding plating..." - if (do_after(user,40)) - if(!src || !S || S.amount < 2) return - S.use(2) - user << "\blue You added the plating!" - var/turf/Tsrc = get_turf(src) - Tsrc.ChangeTurf(text2path("/turf/simulated/wall/mineral/[M]")) - for(var/turf/simulated/wall/mineral/X in Tsrc.loc) - if(X) X.add_hiddenprint(usr) - del(src) - return + return - add_hiddenprint(usr) + add_hiddenprint(usr) - else if(istype(W, /obj/item/pipe)) - var/obj/item/pipe/P = W - if (P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds. - user.drop_item() - P.loc = src.loc - user << "\blue You fit the pipe into the [src]!" - else - ..() + else if(istype(W, /obj/item/pipe)) + var/obj/item/pipe/P = W + if (P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds. + user.drop_item() + P.loc = src.loc + user << "\blue You fit the pipe into the [src]!" + else + ..() - proc/dismantle() - new /obj/item/stack/sheet/metal(get_turf(src)) +/obj/structure/girder/proc/dismantle() + new /obj/item/stack/sheet/metal(get_turf(src)) + del(src) + +/obj/structure/girder/attack_hand(mob/user as mob) + if (HULK in user.mutations) + visible_message("[user] smashes [src] apart!") + dismantle() + return + return ..() + +/obj/structure/girder/blob_act() + if(prob(40)) del(src) - attack_hand(mob/user as mob) - if (HULK in user.mutations) - visible_message("[user] smashes [src] apart!") - dismantle() - return - return ..() - attack_animal(mob/living/simple_animal/user) - if(user.wall_smash) - visible_message("[user] smashes [src] apart!") - dismantle() - return - return ..() - - blob_act() - if(prob(40)) +/obj/structure/girder/ex_act(severity) + switch(severity) + if(1.0) del(src) - - - ex_act(severity) - switch(severity) - if(1.0) + return + if(2.0) + if (prob(30)) + var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal) + new remains(loc) del(src) - return - if(2.0) - if (prob(30)) - var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal) - new remains(loc) - del(src) - return - if(3.0) - if (prob(5)) - var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal) - new remains(loc) - del(src) - return - else - return + return + if(3.0) + if (prob(5)) + var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal) + new remains(loc) + del(src) + return + else + return /obj/structure/girder/displaced icon_state = "displaced" @@ -219,54 +218,54 @@ layer = 2 var/health = 250 - attackby(obj/item/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) - user << "\blue Now disassembling the girder" - if(do_after(user,40)) - user << "\blue You dissasembled the girder!" - new /obj/effect/decal/remains/human(get_turf(src)) - del(src) - - else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter)) - user << "\blue Now slicing apart the girder" - if(do_after(user,30)) - user << "\blue You slice apart the girder!" +/obj/structure/cultgirder/attackby(obj/item/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/wrench)) + playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) + user << "\blue Now disassembling the girder" + if(do_after(user,40)) + user << "\blue You dissasembled the girder!" new /obj/effect/decal/remains/human(get_turf(src)) del(src) - else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill)) - user << "\blue You drill through the girder!" - new /obj/effect/decal/remains/human(get_turf(src)) + else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter)) + user << "\blue Now slicing apart the girder" + if(do_after(user,30)) + user << "\blue You slice apart the girder!" + new /obj/effect/decal/remains/human(get_turf(src)) + del(src) + + else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill)) + user << "\blue You drill through the girder!" + new /obj/effect/decal/remains/human(get_turf(src)) + del(src) + +/obj/structure/cultgirder/blob_act() + if(prob(40)) + del(src) + +/obj/structure/cultgirder/bullet_act(var/obj/item/projectile/Proj) //No beam check- How else will you destroy the cult girder with silver bullets????? + health -= Proj.damage + ..() + if(health <= 0) + new /obj/item/stack/sheet/metal(get_turf(src)) + del(src) + + return + +/obj/structure/cultgirder/ex_act(severity) + switch(severity) + if(1.0) del(src) - - blob_act() - if(prob(40)) - del(src) - - bullet_act(var/obj/item/projectile/Proj) //No beam check- How else will you destroy the cult girder with silver bullets????? - health -= Proj.damage - ..() - if(health <= 0) - new /obj/item/stack/sheet/metal(get_turf(src)) - del(src) - - return - - ex_act(severity) - switch(severity) - if(1.0) + return + if(2.0) + if (prob(30)) + new /obj/effect/decal/remains/human(loc) del(src) - return - if(2.0) - if (prob(30)) - new /obj/effect/decal/remains/human(loc) - del(src) - return - if(3.0) - if (prob(5)) - new /obj/effect/decal/remains/human(loc) - del(src) - return - else - return \ No newline at end of file + return + if(3.0) + if (prob(5)) + new /obj/effect/decal/remains/human(loc) + del(src) + return + else + return \ No newline at end of file diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index e1f0804c0e..716fca4503 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -26,27 +26,17 @@ /obj/structure/grille/Bumped(atom/user) if(ismob(user)) shock(user, 70) - -/obj/structure/grille/attack_paw(mob/user as mob) - attack_hand(user) - /obj/structure/grille/attack_hand(mob/user as mob) playsound(loc, 'sound/effects/grillehit.ogg', 80, 1) - var/damage_dealt + var/damage_dealt = 1 + var/attack_message = "kicks" if(istype(user,/mob/living/carbon/human)) var/mob/living/carbon/human/H = user if(H.species.can_shred(H)) + attack_message = "mangles" damage_dealt = 5 - user.visible_message("[user] mangles [src].", \ - "You mangle [src].", \ - "You hear twisting metal.") - - if(!damage_dealt) - user.visible_message("[user] kicks [src].", \ - "You kick [src].", \ - "You hear twisting metal.") if(shock(user, 70)) return @@ -56,35 +46,7 @@ else damage_dealt += 1 - health -= damage_dealt - healthcheck() - -/obj/structure/grille/attack_slime(mob/user as mob) - var/mob/living/carbon/slime/S = user - if (!S.is_adult) - return - - playsound(loc, 'sound/effects/grillehit.ogg', 80, 1) - user.visible_message("[user] smashes against [src].", \ - "You smash against [src].", \ - "You hear twisting metal.") - - health -= rand(2,3) - healthcheck() - return - -/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M as mob) - if(M.melee_damage_upper == 0) return - - playsound(loc, 'sound/effects/grillehit.ogg', 80, 1) - M.visible_message("[M] smashes against [src].", \ - "You smash against [src].", \ - "You hear twisting metal.") - - health -= M.melee_damage_upper - healthcheck() - return - + attack_generic(user,damage_dealt,attack_message) /obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) if(air_group || (height==0)) return 1 @@ -226,3 +188,9 @@ health -= 1 healthcheck() ..() + +/obj/structure/grille/attack_generic(var/mob/user, var/damage, var/attack_verb) + visible_message("[user] [attack_verb] the [src]!") + health -= damage + spawn(1) healthcheck() + return 1 \ No newline at end of file diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index 8b586c9461..7d4700abb9 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -26,128 +26,104 @@ var/health = 50.0 - New(location) - ..() - update_nearby_tiles(need_rebuild=1) +/obj/structure/inflatable/New(location) + ..() + update_nearby_tiles(need_rebuild=1) - Del() - update_nearby_tiles() - ..() +/obj/structure/inflatable/Del() + update_nearby_tiles() + ..() - proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code - if(!air_master) - return 0 - air_master.mark_for_update(get_turf(src)) - return 1 - - - - CanPass(atom/movable/mover, turf/target, height=0, air_group=0) +/obj/structure/inflatable/proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code + if(!air_master) return 0 + air_master.mark_for_update(get_turf(src)) + return 1 - bullet_act(var/obj/item/projectile/Proj) - health -= Proj.damage - ..() - if(health <= 0) +/obj/structure/inflatable/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) + return 0 + +/obj/structure/inflatable/bullet_act(var/obj/item/projectile/Proj) + health -= Proj.damage + ..() + if(health <= 0) + deflate(1) + return + +/obj/structure/inflatable/ex_act(severity) + switch(severity) + if(1.0) + del(src) + return + if(2.0) deflate(1) - return - - - ex_act(severity) - switch(severity) - if(1.0) - del(src) - return - if(2.0) + return + if(3.0) + if(prob(50)) deflate(1) return - if(3.0) - if(prob(50)) - deflate(1) - return +/obj/structure/inflatable/blob_act() + deflate(1) - blob_act() - deflate(1) +/obj/structure/inflatable/meteorhit() + deflate(1) - - meteorhit() - //world << "glass at [x],[y],[z] Mhit" - deflate(1) - - attack_paw(mob/user as mob) - return attack_generic(user, 15) - - attack_hand(mob/user as mob) +/obj/structure/inflatable/attack_hand(mob/user as mob) add_fingerprint(user) return +/obj/structure/inflatable/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(!istype(W)) return - proc/attack_generic(mob/user as mob, damage = 0) //used by attack_animal and attack_slime - health -= damage - if(health <= 0) - user.visible_message("[user] tears open [src]!") - deflate(1) - else //for nicer text~ - user.visible_message("[user] tears at [src]!") + if (can_puncture(W)) + visible_message("\red [user] pierces [src] with [W]!") + deflate(1) + if(W.damtype == BRUTE || W.damtype == BURN) + hit(W.force) + ..() + return - attack_animal(mob/user as mob) - if(!isanimal(user)) return - var/mob/living/simple_animal/M = user - if(M.melee_damage_upper <= 0) return - attack_generic(M, M.melee_damage_upper) +/obj/structure/inflatable/proc/hit(var/damage, var/sound_effect = 1) + health = max(0, health - damage) + if(sound_effect) + playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1) + if(health <= 0) + deflate(1) - - attack_slime(mob/user as mob) - var/mob/living/carbon/slime/S = user - if (!S.is_adult) - return - attack_generic(user, rand(10, 15)) - - - attackby(obj/item/weapon/W as obj, mob/user as mob) - if(!istype(W)) return - - if (can_puncture(W)) - visible_message("\red [user] pierces [src] with [W]!") - deflate(1) - if(W.damtype == BRUTE || W.damtype == BURN) - hit(W.force) - ..() - return - - proc/hit(var/damage, var/sound_effect = 1) - health = max(0, health - damage) - if(sound_effect) - playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1) - if(health <= 0) - deflate(1) - - - proc/deflate(var/violent=0) - playsound(loc, 'sound/machines/hiss.ogg', 75, 1) - if(violent) - visible_message("[src] rapidly deflates!") - var/obj/item/inflatable/torn/R = new /obj/item/inflatable/torn(loc) +/obj/structure/inflatable/proc/deflate(var/violent=0) + playsound(loc, 'sound/machines/hiss.ogg', 75, 1) + if(violent) + visible_message("[src] rapidly deflates!") + var/obj/item/inflatable/torn/R = new /obj/item/inflatable/torn(loc) + src.transfer_fingerprints_to(R) + del(src) + else + //user << "\blue You slowly deflate the inflatable wall." + visible_message("[src] slowly deflates.") + spawn(50) + var/obj/item/inflatable/R = new /obj/item/inflatable(loc) src.transfer_fingerprints_to(R) del(src) - else - //user << "\blue You slowly deflate the inflatable wall." - visible_message("[src] slowly deflates.") - spawn(50) - var/obj/item/inflatable/R = new /obj/item/inflatable(loc) - src.transfer_fingerprints_to(R) - del(src) - verb/hand_deflate() - set name = "Deflate" - set category = "Object" - set src in oview(1) +/obj/structure/inflatable/verb/hand_deflate() + set name = "Deflate" + set category = "Object" + set src in oview(1) - if(isobserver(usr)) //to stop ghosts from deflating - return + if(isobserver(usr)) //to stop ghosts from deflating + return - deflate() + deflate() + +/obj/structure/inflatable/attack_generic(var/mob/user, var/damage, var/attack_verb) + health -= damage + if(health <= 0) + user.visible_message("[user] [attack_verb] open the [src]!") + spawn(1) deflate(1) + else + user.visible_message("[user] [attack_verb] at [src]!") + return 1 /obj/item/inflatable/door/ name = "inflatable door" @@ -175,97 +151,84 @@ var/state = 0 //closed, 1 == open var/isSwitchingStates = 0 - //Bumped(atom/user) - // ..() - // if(!state) - // return TryToSwitchState(user) - // return +/obj/structure/inflatable/door/attack_ai(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral + if(isAI(user)) //so the AI can't open it + return + else if(isrobot(user)) //but cyborgs can + if(get_dist(user,src) <= 1) //not remotely though + return TryToSwitchState(user) - attack_ai(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral - if(isAI(user)) //so the AI can't open it - return - else if(isrobot(user)) //but cyborgs can - if(get_dist(user,src) <= 1) //not remotely though - return TryToSwitchState(user) +/obj/structure/inflatable/door/attack_hand(mob/user as mob) + return TryToSwitchState(user) - attack_paw(mob/user as mob) - return TryToSwitchState(user) +/obj/structure/inflatable/door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) + if(air_group) + return state + if(istype(mover, /obj/effect/beam)) + return !opacity + return !density - attack_hand(mob/user as mob) - return TryToSwitchState(user) - - CanPass(atom/movable/mover, turf/target, height=0, air_group=0) - if(air_group) - return state - if(istype(mover, /obj/effect/beam)) - return !opacity - return !density - - proc/TryToSwitchState(atom/user) - if(isSwitchingStates) return - if(ismob(user)) - var/mob/M = user - if(world.time - user.last_bumped <= 60) return //NOTE do we really need that? - if(M.client) - if(iscarbon(M)) - var/mob/living/carbon/C = M - if(!C.handcuffed) - SwitchState() - else +/obj/structure/inflatable/door/proc/TryToSwitchState(atom/user) + if(isSwitchingStates) return + if(ismob(user)) + var/mob/M = user + if(world.time - user.last_bumped <= 60) return //NOTE do we really need that? + if(M.client) + if(iscarbon(M)) + var/mob/living/carbon/C = M + if(!C.handcuffed) SwitchState() - else if(istype(user, /obj/mecha)) - SwitchState() + else + SwitchState() + else if(istype(user, /obj/mecha)) + SwitchState() - proc/SwitchState() - if(state) - Close() - else - Open() - update_nearby_tiles() - - proc/Open() - isSwitchingStates = 1 - //playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1) - flick("door_opening",src) - sleep(10) - density = 0 - opacity = 0 - state = 1 - update_icon() - isSwitchingStates = 0 - - proc/Close() - isSwitchingStates = 1 - //playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1) - flick("door_closing",src) - sleep(10) - density = 1 - opacity = 0 - state = 0 - update_icon() - isSwitchingStates = 0 +/obj/structure/inflatable/door/proc/SwitchState() + if(state) + Close() + else + Open() + update_nearby_tiles() +/obj/structure/inflatable/door/proc/Open() + isSwitchingStates = 1 + flick("door_opening",src) + sleep(10) + density = 0 + opacity = 0 + state = 1 update_icon() - if(state) - icon_state = "door_open" - else - icon_state = "door_closed" + isSwitchingStates = 0 - deflate(var/violent=0) - playsound(loc, 'sound/machines/hiss.ogg', 75, 1) - if(violent) - visible_message("[src] rapidly deflates!") - var/obj/item/inflatable/door/torn/R = new /obj/item/inflatable/door/torn(loc) +/obj/structure/inflatable/door/proc/Close() + isSwitchingStates = 1 + flick("door_closing",src) + sleep(10) + density = 1 + opacity = 0 + state = 0 + update_icon() + isSwitchingStates = 0 + +/obj/structure/inflatable/door/update_icon() + if(state) + icon_state = "door_open" + else + icon_state = "door_closed" + +/obj/structure/inflatable/door/deflate(var/violent=0) + playsound(loc, 'sound/machines/hiss.ogg', 75, 1) + if(violent) + visible_message("[src] rapidly deflates!") + var/obj/item/inflatable/door/torn/R = new /obj/item/inflatable/door/torn(loc) + src.transfer_fingerprints_to(R) + del(src) + else + visible_message("[src] slowly deflates.") + spawn(50) + var/obj/item/inflatable/door/R = new /obj/item/inflatable/door(loc) src.transfer_fingerprints_to(R) del(src) - else - //user << "\blue You slowly deflate the inflatable wall." - visible_message("[src] slowly deflates.") - spawn(50) - var/obj/item/inflatable/door/R = new /obj/item/inflatable/door(loc) - src.transfer_fingerprints_to(R) - del(src) - /obj/item/inflatable/torn name = "torn inflatable wall" diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index f0060dfe93..40becb871f 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -12,8 +12,6 @@ var/meattype = 0 // 0 - Nothing, 1 - Monkey, 2 - Xeno /obj/structure/kitchenspike - attack_paw(mob/user as mob) - return src.attack_hand(usr) attackby(obj/item/weapon/grab/G as obj, mob/user as mob) if(!istype(G, /obj/item/weapon/grab)) diff --git a/code/game/objects/structures/ladders.dm b/code/game/objects/structures/ladders.dm index a10448cfcc..cce8a064c0 100644 --- a/code/game/objects/structures/ladders.dm +++ b/code/game/objects/structures/ladders.dm @@ -66,8 +66,5 @@ add_fingerprint(user) -/obj/structure/ladder/attack_paw(mob/user as mob) - return attack_hand(user) - /obj/structure/ladder/attackby(obj/item/weapon/W, mob/user as mob) return attack_hand(user) \ No newline at end of file diff --git a/code/game/objects/structures/lamarr_cage.dm b/code/game/objects/structures/lamarr_cage.dm index 83df96a728..14377992bb 100644 --- a/code/game/objects/structures/lamarr_cage.dm +++ b/code/game/objects/structures/lamarr_cage.dm @@ -72,9 +72,6 @@ ..() return -/obj/structure/lamarr/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/structure/lamarr/attack_hand(mob/user as mob) if (src.destroyed) return diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index aa07d1621a..5db0947e9b 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -39,9 +39,6 @@ if(get_dist(user,src) <= 1) //not remotely though return TryToSwitchState(user) - attack_paw(mob/user as mob) - return TryToSwitchState(user) - attack_hand(mob/user as mob) return TryToSwitchState(user) diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 99df613ace..b82a3495df 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -8,7 +8,6 @@ anchored = 1 var/shattered = 0 - /obj/structure/mirror/attack_hand(mob/user as mob) if(shattered) return @@ -17,14 +16,10 @@ var/mob/living/carbon/human/H = user if(H.a_intent == "hurt") - if(shattered) - playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) - return if(prob(30) || H.species.can_shred(H)) - user.visible_message("[user] smashes [src]!") - shatter() + attack_generic(user,1) else - user.visible_message("[user] hits [src] and bounces off!") + attack_generic(user) return var/userloc = H.loc @@ -82,7 +77,6 @@ playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) ..() - /obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob) if(shattered) playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) @@ -95,23 +89,15 @@ visible_message("[user] hits [src] with [I]!") playsound(src.loc, 'sound/effects/Glasshit.ogg', 70, 1) -/obj/structure/mirror/attack_animal(mob/user as mob) - if(!isanimal(user)) return - var/mob/living/simple_animal/M = user - if(M.melee_damage_upper <= 0) return +/obj/structure/mirror/attack_generic(var/mob/user, var/damage) + if(shattered) playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) - return - user.visible_message("[user] smashes [src]!") - shatter() + return 0 - -/obj/structure/mirror/attack_slime(mob/user as mob) - var/mob/living/carbon/slime/S = user - if (!S.is_adult) - return - if(shattered) - playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) - return - user.visible_message("[user] smashes [src]!") - shatter() \ No newline at end of file + if(damage) + user.visible_message("[user] smashes [src]!") + shatter() + else + user.visible_message("[user] hits [src] and bounces off!") + return 1 \ No newline at end of file diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index eea0358763..538149688c 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -57,9 +57,6 @@ /obj/structure/morgue/alter_health() return src.loc -/obj/structure/morgue/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/structure/morgue/attack_hand(mob/user as mob) if (src.connected) for(var/atom/movable/A as mob|obj in src.connected.loc) @@ -137,9 +134,6 @@ anchored = 1 throwpass = 1 -/obj/structure/m_tray/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/structure/m_tray/attack_hand(mob/user as mob) if (src.connected) for(var/atom/movable/A as mob|obj in src.loc) @@ -222,9 +216,6 @@ /obj/structure/crematorium/alter_health() return src.loc -/obj/structure/crematorium/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/structure/crematorium/attack_hand(mob/user as mob) // if (cremating) AWW MAN! THIS WOULD BE SO MUCH MORE FUN ... TO WATCH // user.show_message("\red Uh-oh, that was a bad idea.", 1) @@ -353,9 +344,6 @@ anchored = 1 throwpass = 1 -/obj/structure/c_tray/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/structure/c_tray/attack_hand(mob/user as mob) if (src.connected) for(var/atom/movable/A as mob|obj in src.loc) diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index d4f9356c56..a3f99324b7 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -29,9 +29,6 @@ ..() return -/obj/structure/stool/bed/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/structure/stool/bed/attack_hand(mob/user as mob) manual_unbuckle(user) return diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 4db3ed1078..4df313fe91 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -150,28 +150,12 @@ "You hear a knocking sound.") return - -/obj/structure/window/attack_paw(mob/user as mob) - return attack_hand(user) - - -/obj/structure/window/proc/attack_generic(mob/user as mob, damage = 0) //used by attack_animal and attack_slime +/obj/structure/window/attack_generic(var/mob/user, var/damage) + if(!damage) + return user.visible_message("[user] smashes into [src]!") take_damage(damage) - -/obj/structure/window/attack_animal(mob/user as mob) - if(!isanimal(user)) return - var/mob/living/simple_animal/M = user - if(M.melee_damage_upper <= 0) return - attack_generic(M, M.melee_damage_upper) - - -/obj/structure/window/attack_slime(mob/user as mob) - var/mob/living/carbon/slime/S = user - if (!S.is_adult) - return - attack_generic(user, rand(10, 15)) - + return 1 /obj/structure/window/attackby(obj/item/W as obj, mob/user as mob) if(!istype(W)) return//I really wish I did not need this diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index 80850522f4..349be88f5d 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -294,19 +294,12 @@ var/list/mechtoys = list( /obj/item/weapon/paper/manifest name = "Supply Manifest" - /obj/machinery/computer/ordercomp/attack_ai(var/mob/user as mob) return attack_hand(user) -/obj/machinery/computer/ordercomp/attack_paw(var/mob/user as mob) - return attack_hand(user) - /obj/machinery/computer/supplycomp/attack_ai(var/mob/user as mob) return attack_hand(user) -/obj/machinery/computer/supplycomp/attack_paw(var/mob/user as mob) - return attack_hand(user) - /obj/machinery/computer/ordercomp/attack_hand(var/mob/user as mob) if(..()) return diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 5a74c80b6f..f3dc6f5eb1 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -192,10 +192,6 @@ turf/simulated/floor/proc/update_icon() else return 0 - -/turf/simulated/floor/attack_paw(mob/user as mob) - return src.attack_hand(user) - /turf/simulated/floor/attack_hand(mob/user as mob) if (is_light_floor()) var/obj/item/stack/tile/light/T = floor_tile diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 91f96113cb..b1a0966dad 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -226,40 +226,6 @@ return 0 //Interactions - -/turf/simulated/wall/attack_paw(mob/user as mob) - if ((HULK in user.mutations)) - if (prob(40)) - usr << text("\blue You smash through the wall.") - usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) - dismantle_wall(1) - return - else - usr << text("\blue You punch the wall.") - take_damage(rand(25, 75)) - return - - return src.attack_hand(user) - - -/turf/simulated/wall/attack_animal(mob/living/M as mob) - if(M.wall_smash) - if (istype(src, /turf/simulated/wall/r_wall) && !rotting) - M << text("\blue This wall is far too strong for you to destroy.") - return - else - if (prob(40) || rotting) - M << text("\blue You smash through the wall.") - dismantle_wall(1) - return - else - M << text("\blue You smash against the wall.") - take_damage(rand(25, 75)) - return - - M << "\blue You push the wall but nothing happens!" - return - /turf/simulated/wall/attack_hand(mob/user as mob) if (HULK in user.mutations) if (prob(40) || rotting) @@ -282,6 +248,23 @@ src.add_fingerprint(user) return +/turf/simulated/wall/attack_generic(var/mob/user, var/damage, var/attack_message, var/wallbreaker) + + if(!damage || !wallbreaker) + user << "You push the wall but nothing happens." + return + + if(istype(src,/turf/simulated/wall/r_wall) && !rotting) + user << "This wall is far too strong for you to destroy." + + if(rotting || prob(40)) + user << "You smash through the wall!" + spawn(1) dismantle_wall(1) + else + user << "You smash against the wall." + take_damage(rand(25,75)) + return 1 + /turf/simulated/wall/attackby(obj/item/weapon/W as obj, mob/user as mob) if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index 7b1a17abac..0dcd0dd8a7 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -11,9 +11,6 @@ if(!istype(src, /turf/space/transit)) icon_state = "[((x + y) ^ ~(x * y) + z) % 25]" -/turf/space/attack_paw(mob/user as mob) - return src.attack_hand(user) - /turf/space/attack_hand(mob/user as mob) if ((user.restrained() || !( user.pulling ))) return diff --git a/code/game/turfs/unsimulated/floor.dm b/code/game/turfs/unsimulated/floor.dm index 1d391eee1c..68ac083f15 100644 --- a/code/game/turfs/unsimulated/floor.dm +++ b/code/game/turfs/unsimulated/floor.dm @@ -3,9 +3,6 @@ icon = 'icons/turf/floors.dmi' icon_state = "Floor3" -/turf/unsimulated/floor/attack_paw(user as mob) - return src.attack_hand(user) - /turf/unsimulated/floor/attack_hand(var/mob/user as mob) if ((!( user.canmove ) || user.restrained() || !( user.pulling ))) return diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index 8cc12fb172..3f3094c794 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -8,14 +8,11 @@ w_class = 2 gas_transfer_coefficient = 0.90 -//Monkeys can not take the muzzle off of themself! Call PETA! -/obj/item/clothing/mask/muzzle/attack_paw(mob/user as mob) - if (src == user.wear_mask) - return - else - ..() - return - +// Clumsy folks can't take the mask off themselves. +/obj/item/clothing/mask/muzzle/attack_hand(mob/user as mob) + if(user.wear_mask == src && !user.IsAdvancedToolUser()) + return 0 + ..() /obj/item/clothing/mask/surgical name = "sterile mask" diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index 0ca5fe74b6..8b4295d72b 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -58,9 +58,6 @@ if(world.time > last_action + action_time) finished_task() -/obj/machinery/botany/attack_paw(mob/user as mob) - return attack_hand(user) - /obj/machinery/botany/attack_ai(mob/user as mob) return attack_hand(user) diff --git a/code/modules/hydroponics/vines.dm b/code/modules/hydroponics/vines.dm index ed8f5c338e..b25c03080e 100644 --- a/code/modules/hydroponics/vines.dm +++ b/code/modules/hydroponics/vines.dm @@ -73,10 +73,6 @@ manual_unbuckle(user) - -/obj/effect/plantsegment/attack_paw(mob/user as mob) - manual_unbuckle(user) - /obj/effect/plantsegment/proc/unbuckle() if(buckled_mob) if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index 5d48ec1f3c..1e1748e1cc 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -5,12 +5,6 @@ icon = 'icons/mob/alien.dmi' icon_state = "alien" pass_flags = PASSTABLE - melee_damage_lower = 1 - melee_damage_upper = 3 - attacktext = "bites" - attack_sound = null - friendly = "nuzzles" - wall_smash = 0 health = 100 maxHealth = 100 diff --git a/code/modules/mob/living/carbon/alien/alien_attacks.dm b/code/modules/mob/living/carbon/alien/alien_attacks.dm index 45a486adf7..4957a2d95f 100644 --- a/code/modules/mob/living/carbon/alien/alien_attacks.dm +++ b/code/modules/mob/living/carbon/alien/alien_attacks.dm @@ -14,128 +14,14 @@ updatehealth() return -/mob/living/carbon/alien/attack_animal(mob/living/M as mob) +/mob/living/carbon/alien/attack_hand(mob/living/carbon/M as mob) - if(istype(M,/mob/living/simple_animal)) - var/mob/living/simple_animal/S = M - if(S.melee_damage_upper == 0) - S.emote("[S.friendly] [src]") - else - for(var/mob/O in viewers(src, null)) - O.show_message("\red [S] [S.attacktext] [src]!", 1) - var/damage = rand(S.melee_damage_lower, S.melee_damage_upper) - adjustBruteLoss(damage) - S.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [S.name] ([S.ckey])") - updatehealth() - -/mob/living/carbon/alien/attack_paw(mob/living/carbon/monkey/M as mob) - if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens. - - if (!ticker) - M << "You cannot attack people before the game has started." - return - - if (istype(loc, /turf) && istype(loc.loc, /area/start)) - M << "No attacking people at spawn, you jackass." - return ..() switch(M.a_intent) if ("help") help_shake_act(M) - else - if (istype(wear_mask, /obj/item/clothing/mask/muzzle)) - return - if (health > 0) - playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red [M.name] has bit [src]!"), 1) - adjustBruteLoss(rand(1, 3)) - updatehealth() - return - - -/mob/living/carbon/alien/attack_slime(mob/living/carbon/slime/M as mob) - if (!ticker) - M << "You cannot attack people before the game has started." - return - - if(M.Victim) return // can't attack while eating! - - if (health > -100) - - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red The [M.name] glomps []!", src), 1) - - var/damage = rand(1, 3) - - if(M.is_adult) - damage = rand(20, 40) - else - damage = rand(5, 35) - - adjustBruteLoss(damage) - - - updatehealth() - - return - -/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M as mob) - if (!ticker) - M << "You cannot attack people before the game has started." - return - - if (istype(loc, /turf) && istype(loc.loc, /area/start)) - M << "No attacking people at spawn, you jackass." - return - - ..() - - if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves)) - var/obj/item/clothing/gloves/G = M.gloves - if(G.cell) - if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien. - if(G.cell.charge >= 2500) - G.cell.use(2500) - - Weaken(5) - if (stuttering < 5) - stuttering = 5 - Stun(5) - - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message("\red [src] has been touched with the stun gloves by [M]!", 1, "\red You hear someone fall.", 2) - return - else - M << "\red Not enough charge! " - return - - switch(M.a_intent) - - if ("help") - if (health > 0) - help_shake_act(M) - else - if (M.health >= -75.0) - if ((M.head && M.head.flags & 4) || (M.wear_mask && !( M.wear_mask.flags & 32 )) ) - M << "\blue Remove that mask!" - return - var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( ) - O.source = M - O.target = src - O.s_loc = M.loc - O.t_loc = loc - O.place = "CPR" - requests += O - spawn( 0 ) - O.process() - return if ("grab") if (M == src) diff --git a/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm b/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm index 108333bf86..82f7a78902 100644 --- a/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm +++ b/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm @@ -1,14 +1,15 @@ /mob/living/carbon/alien/diona/attack_hand(mob/living/carbon/human/M as mob) - //Let people pick the little buggers up. - if(M.a_intent == "help") - if(M.species && M.species.name == "Diona") - M << "You feel your being twine with that of [src] as it merges with your biomass." - src << "You feel your being twine with that of [M] as you merge with its biomass." - src.verbs += /mob/living/carbon/alien/diona/proc/split - src.verbs -= /mob/living/carbon/alien/diona/proc/merge - src.loc = M - else - get_scooped(M) + if(istype(M)) + //Let people pick the little buggers up. + if(M.a_intent == "help") + if(M.species && M.species.name == "Diona") + M << "You feel your being twine with that of [src] as it merges with your biomass." + src << "You feel your being twine with that of [M] as you merge with its biomass." + src.verbs += /mob/living/carbon/alien/diona/proc/split + src.verbs -= /mob/living/carbon/alien/diona/proc/merge + src.loc = M + else + get_scooped(M) ..() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 4e71095ca0..8dd64654b7 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -5,8 +5,6 @@ speak_emote = list("hisses") icon_state = "larva" language = "Hivemind" - melee_damage_lower = 3 - melee_damage_upper = 6 amount_grown = 0 max_grown = 200 diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index c529cc9154..c915b6f7b5 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -83,22 +83,6 @@ return - -/mob/living/carbon/attack_paw(mob/M as mob) - if(!istype(M, /mob/living/carbon)) return - - for(var/datum/disease/D in viruses) - - if(D.spread_by_touch()) - M.contract_disease(D, 0, 1, CONTACT_HANDS) - - for(var/datum/disease/D in M.viruses) - - if(D.spread_by_touch()) - contract_disease(D, 0, 1, CONTACT_HANDS) - - return - /mob/living/carbon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/def_zone = null) if(status_flags & GODMODE) return 0 //godmode shock_damage *= siemens_coeff diff --git a/code/modules/mob/living/carbon/human/alien/alien_facehugger.dm b/code/modules/mob/living/carbon/human/alien/alien_facehugger.dm index 58831c870e..b3c855f290 100644 --- a/code/modules/mob/living/carbon/human/alien/alien_facehugger.dm +++ b/code/modules/mob/living/carbon/human/alien/alien_facehugger.dm @@ -24,10 +24,6 @@ var/const/MAX_ACTIVE_TIME = 400 var/strength = 5 var/attached = 0 -/obj/item/clothing/mask/facehugger/attack_paw(user as mob) //can be picked up by aliens - attack_hand(user) - return - /obj/item/clothing/mask/facehugger/attack_hand(user as mob) if((stat == CONSCIOUS && !sterile)) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index abc5c9b683..2b6ec75ac0 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -186,25 +186,6 @@ updatehealth() return - -/mob/living/carbon/human/attack_animal(mob/living/M as mob) - if(M.melee_damage_upper == 0) - M.emote("[M.friendly] [src]") - else - if(M.attack_sound) - playsound(loc, M.attack_sound, 50, 1, 1) - for(var/mob/O in viewers(src, null)) - O.show_message("\red [M] [M.attacktext] [src]!", 1) - M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") - var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg") - var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone)) - var/armor = run_armor_check(affecting, "melee") - apply_damage(damage, BRUTE, affecting, armor) - if(armor >= 2) return - - /mob/living/carbon/human/proc/implant_loyalty(mob/living/carbon/human/M, override = FALSE) // Won't override by default. if(!config.use_loyalty_implants && !override) return // Nuh-uh. @@ -223,69 +204,6 @@ return 1 return 0 -/mob/living/carbon/human/attack_slime(mob/living/carbon/slime/M as mob) - if(M.Victim) return // can't attack while eating! - - if (health > -100) - - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red The [M.name] glomps []!", src), 1) - - var/damage = rand(1, 3) - - if(M.is_adult) - damage = rand(10, 35) - else - damage = rand(5, 25) - - - var/dam_zone = pick("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg", "groin") - - var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone)) - var/armor_block = run_armor_check(affecting, "melee") - apply_damage(damage, BRUTE, affecting, armor_block) - - - if(M.powerlevel > 0) - var/stunprob = 10 - var/power = M.powerlevel + rand(0,3) - - switch(M.powerlevel) - if(1 to 2) stunprob = 20 - if(3 to 4) stunprob = 30 - if(5 to 6) stunprob = 40 - if(7 to 8) stunprob = 60 - if(9) stunprob = 70 - if(10) stunprob = 95 - - if(prob(stunprob)) - M.powerlevel -= 3 - if(M.powerlevel < 0) - M.powerlevel = 0 - - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red The [M.name] has shocked []!", src), 1) - - Weaken(power) - if (stuttering < power) - stuttering = power - Stun(power) - - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread - s.set_up(5, 1, src) - s.start() - - if (prob(stunprob) && M.powerlevel >= 8) - adjustFireLoss(M.powerlevel * rand(6,10)) - - - updatehealth() - - return - - /mob/living/carbon/human/restrained() if (handcuffed) return 1 @@ -293,8 +211,6 @@ return 1 return 0 - - /mob/living/carbon/human/var/co2overloadtime = null /mob/living/carbon/human/var/temperature_resistance = T0C+75 @@ -775,9 +691,12 @@ return number -/mob/living/carbon/human/IsAdvancedToolUser() - return species.has_fine_manipulation - +/mob/living/carbon/human/IsAdvancedToolUser(var/silent) + if(species.has_fine_manipulation) + return 1 + if(!silent) + src << "You don't have the dexterity to use [src]!" + return 0 /mob/living/carbon/human/abiotic(var/full_body = 0) if(full_body && ((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )) || (src.back || src.wear_mask || src.head || src.shoes || src.w_uniform || src.wear_suit || src.glasses || src.l_ear || src.r_ear || src.gloves))) diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index b8030886c3..f7dd2cefac 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -1,93 +1,72 @@ -/mob/living/carbon/human/attack_hand(mob/living/carbon/human/M as mob) - if (istype(loc, /turf) && istype(loc.loc, /area/start)) - M << "No attacking people at spawn, you jackass." - return +/mob/living/carbon/human/attack_hand(mob/living/carbon/M as mob) - var/datum/organ/external/temp = M:organs_by_name["r_hand"] - if (M.hand) - temp = M:organs_by_name["l_hand"] - if(temp && !temp.is_usable()) - M << "\red You can't use your [temp.display_name]." - return + var/mob/living/carbon/human/H = M + if(istype(H)) + var/datum/organ/external/temp = H.organs_by_name["r_hand"] + if(H.hand) + temp = H.organs_by_name["l_hand"] + if(temp && !temp.is_usable()) + H << "\red You can't use your [temp.display_name]." + return ..() - if((M != src) && check_shields(0, M.name)) - visible_message("\red [M] attempted to touch [src]!") - return 0 + // Should this all be in Touch()? + if(istype(H)) + if((H != src) && check_shields(0, H.name)) + visible_message("\red [H] attempted to touch [src]!") + return 0 - - if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves)) - var/obj/item/clothing/gloves/G = M.gloves - if(G.cell) - if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien. - if(G.cell.charge >= 2500) - G.cell.use(2500) - visible_message("\red [src] has been touched with the stun gloves by [M]!") - M.attack_log += text("\[[time_stamp()]\] Stungloved [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] Has been stungloved by [M.name] ([M.ckey])") - - msg_admin_attack("[M.name] ([M.ckey]) stungloved [src.name] ([src.ckey]) (
JMP)") - - var/armorblock = run_armor_check(M.zone_sel.selecting, "energy") - apply_effects(5,5,0,0,5,0,0,armorblock) - return 1 - else - M << "\red Not enough charge! " - visible_message("\red [src] has been touched with the stun gloves by [M]!") - return - - if(istype(M.gloves , /obj/item/clothing/gloves/boxing/hologlove)) + if(istype(H.gloves, /obj/item/clothing/gloves/boxing/hologlove)) var/damage = rand(0, 9) if(!damage) playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) - visible_message("\red [M] has attempted to punch [src]!") + visible_message("\red [H] has attempted to punch [src]!") return 0 - var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting)) + var/datum/organ/external/affecting = get_organ(ran_zone(H.zone_sel.selecting)) var/armor_block = run_armor_check(affecting, "melee") - if(HULK in M.mutations) damage += 5 + if(HULK in H.mutations) + damage += 5 playsound(loc, "punch", 25, 1, -1) - visible_message("\red [M] has punched [src]!") + visible_message("\red [H] has punched [src]!") apply_damage(damage, HALLOSS, affecting, armor_block) if(damage >= 9) - visible_message("\red [M] has weakened [src]!") + visible_message("\red [H] has weakened [src]!") apply_effect(4, WEAKEN, armor_block) return - else - if(istype(M,/mob/living/carbon)) -// log_debug("No gloves, [M] is truing to infect [src]") - M.spread_disease_to(src, "Contact") + if(istype(M,/mob/living/carbon)) + M.spread_disease_to(src, "Contact") switch(M.a_intent) if("help") - if(health >= config.health_threshold_crit) + + if(istype(H) && health < config.health_threshold_crit) + + if((H.head && (H.head.flags & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags & MASKCOVERSMOUTH))) + H << "\blue Remove your mask!" + return 0 + if((head && (head.flags & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags & MASKCOVERSMOUTH))) + H << "\blue Remove [src]'s mask!" + return 0 + + var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human() + O.source = M + O.target = src + O.s_loc = M.loc + O.t_loc = loc + O.place = "CPR" + requests += O + spawn(0) + O.process() + else help_shake_act(M) - return 1 -// if(M.health < -75) return 0 - - if((M.head && (M.head.flags & HEADCOVERSMOUTH)) || (M.wear_mask && (M.wear_mask.flags & MASKCOVERSMOUTH))) - M << "\blue Remove your mask!" - return 0 - if((head && (head.flags & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags & MASKCOVERSMOUTH))) - M << "\blue Remove his mask!" - return 0 - - var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human() - O.source = M - O.target = src - O.s_loc = M.loc - O.t_loc = loc - O.place = "CPR" - requests += O - spawn(0) - O.process() return 1 if("grab") @@ -111,42 +90,43 @@ if("hurt") + if(!istype(H)) + attack_generic(H,rand(1,3),"punched") + return + // See if they can attack, and which attacks to use. - var/datum/unarmed_attack/attack = M.species.unarmed - if(!attack.is_usable(M)) - attack = M.species.secondary_unarmed - if(!attack.is_usable(M)) + var/datum/unarmed_attack/attack = H.species.unarmed + if(!attack.is_usable(H)) + attack = H.species.secondary_unarmed + if(!attack.is_usable(H)) return 0 - M.attack_log += text("\[[time_stamp()]\] [pick(attack.attack_verb)]ed [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] Has been [pick(attack.attack_verb)]ed by [M.name] ([M.ckey])") - msg_admin_attack("[key_name(M)] [pick(attack.attack_verb)]ed [key_name(src)]") + H.attack_log += text("\[[time_stamp()]\] [pick(attack.attack_verb)]ed [src.name] ([src.ckey])") + src.attack_log += text("\[[time_stamp()]\] Has been [pick(attack.attack_verb)]ed by [H.name] ([M.ckey])") + msg_admin_attack("[key_name(H)] [pick(attack.attack_verb)]ed [key_name(src)]") var/damage = rand(0, 5)//BS12 EDIT if(!damage) playsound(loc, attack.miss_sound, 25, 1, -1) - visible_message("\red [M] tried to [pick(attack.attack_verb)] [src]!") + visible_message("\red [H] tried to [pick(attack.attack_verb)] [src]!") return 0 - - var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting)) + var/datum/organ/external/affecting = get_organ(ran_zone(H.zone_sel.selecting)) var/armor_block = run_armor_check(affecting, "melee") - if(HULK in M.mutations) damage += 5 - + if(HULK in H.mutations) damage += 5 playsound(loc, attack.attack_sound, 25, 1, -1) - visible_message("\red [M] [pick(attack.attack_verb)]ed [src]!") + visible_message("\red [H] [pick(attack.attack_verb)]ed [src]!") //Rearranged, so claws don't increase weaken chance. if(damage >= 5 && prob(50)) - visible_message("\red [M] has weakened [src]!") + visible_message("\red [H] has weakened [src]!") apply_effect(3, WEAKEN, armor_block) damage += attack.damage apply_damage(damage, BRUTE, affecting, armor_block, sharp=attack.sharp, edge=attack.edge) - if("disarm") M.attack_log += text("\[[time_stamp()]\] Disarmed [src.name] ([src.ckey])") src.attack_log += text("\[[time_stamp()]\] Has been disarmed by [M.name] ([M.ckey])") @@ -222,4 +202,20 @@ return /mob/living/carbon/human/proc/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params) - return \ No newline at end of file + return + +/mob/living/carbon/human/attack_generic(var/mob/user, var/damage, var/attack_message) + + if(!damage) + return + + user.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") + src.attack_log += text("\[[time_stamp()]\] was attacked by [user.name] ([user.ckey])") + src.visible_message("[user] has [attack_message] [src]!") + + var/dam_zone = pick("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg", "groin") + var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone)) + var/armor_block = run_armor_check(affecting, "melee") + apply_damage(damage, BRUTE, affecting, armor_block) + updatehealth() + return 1 \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_attackpaw.dm b/code/modules/mob/living/carbon/human/human_attackpaw.dm deleted file mode 100644 index 8d01ca3e8f..0000000000 --- a/code/modules/mob/living/carbon/human/human_attackpaw.dm +++ /dev/null @@ -1,23 +0,0 @@ -/mob/living/carbon/human/attack_paw(mob/M as mob) - ..() - if (M.a_intent == "help") - help_shake_act(M) - else - if (istype(wear_mask, /obj/item/clothing/mask/muzzle)) - return - - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [M.name] has bit []!", src), 1) - - var/damage = rand(1, 3) - var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg") - var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone)) - apply_damage(damage, BRUTE, affecting, run_armor_check(affecting, "melee")) - - for(var/datum/disease/D in M.viruses) - if(istype(D, /datum/disease/jungle_fever)) - var/mob/living/carbon/human/H = src - src = null - src = H.monkeyize() - contract_disease(D,1,0) - return diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm index 7820e2a416..0552892025 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/metroid/life.dm @@ -83,7 +83,7 @@ Atkcool = 0 if(Target.Adjacent(src)) - Target.attack_slime(src) + UnarmedAttack(Target) return if(!Target.lying && prob(80)) @@ -94,7 +94,7 @@ Atkcool = 0 if(Target.Adjacent(src)) - Target.attack_slime(src) + UnarmedAttack(Target) else if(!Atkcool && Target.Adjacent(src)) diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index df9d22c5dc..b5f9cf970f 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -119,7 +119,7 @@ if(istype(AM, /obj/structure/window) || istype(AM, /obj/structure/grille)) if(nutrition <= get_hunger_nutrition() && !Atkcool) if (is_adult || prob(5)) - AM.attack_slime(src) + UnarmedAttack(AM) spawn() Atkcool = 1 sleep(45) @@ -253,84 +253,7 @@ updatehealth() return -/mob/living/carbon/slime/attack_slime(mob/living/carbon/slime/M as mob) - if (!ticker) - M << "You cannot attack people before the game has started." - return - - if (Victim) return // can't attack while eating! - - if (health > -100) - - visible_message(" The [M.name] has glomped [src]!", \ - " The [M.name] has glomped [src]!") - var/damage = rand(1, 3) - attacked += 5 - - if(M.is_adult) - damage = rand(1, 6) - else - damage = rand(1, 3) - - adjustBruteLoss(damage) - - updatehealth() - return - -/mob/living/carbon/slime/attack_animal(mob/living/M as mob) - if(M.melee_damage_upper == 0) - M.emote("[M.friendly] [src]") - else - if(M.attack_sound) - playsound(loc, M.attack_sound, 50, 1, 1) - visible_message("[M] [M.attacktext] [src]!", \ - "[M] [M.attacktext] [src]!") - M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") - var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - attacked += 10 - adjustBruteLoss(damage) - updatehealth() - -/mob/living/carbon/slime/attack_paw(mob/living/carbon/monkey/M as mob) - if(!(istype(M, /mob/living/carbon/monkey))) - return // Fix for aliens receiving double messages when attacking other aliens. - - if (!ticker) - M << "You cannot attack people before the game has started." - return - - if (istype(loc, /turf) && istype(loc.loc, /area/start)) - M << "No attacking people at spawn, you jackass." - return - - ..() - - switch(M.a_intent) - - if ("help") - help_shake_act(M) - else - if (istype(wear_mask, /obj/item/clothing/mask/muzzle)) - return - if (health > 0) - attacked += 10 - //playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1) - visible_message("[M.name] has attacked [src]!", \ - "[M.name] has attacked [src]!") - adjustBruteLoss(rand(1, 3)) - updatehealth() - return - - /mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M as mob) - if (!ticker) - M << "You cannot attack people before the game has started." - return - - if (istype(loc, /turf) && istype(loc.loc, /area/start)) - M << "No attacking people at spawn, you jackass." - return ..() @@ -387,18 +310,6 @@ return - if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves)) - var/obj/item/clothing/gloves/G = M.gloves - if(G.cell) - if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien. - if(G.cell.charge >= 2500) - G.cell.use(2500) - visible_message("[src] has been touched with the stun gloves by [M]!") - return - else - M << "\red Not enough charge! " - return - switch(M.a_intent) if ("help") diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 4371c68f8f..9e337e5f80 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -143,58 +143,7 @@ health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() return -//mob/living/carbon/monkey/bullet_act(var/obj/item/projectile/Proj)taken care of in living - - -/mob/living/carbon/monkey/attack_paw(mob/M as mob) - ..() - - if (M.a_intent == "help") - help_shake_act(M) - else - if ((M.a_intent == "hurt" && !( istype(wear_mask, /obj/item/clothing/mask/muzzle) ))) - if ((prob(75) && health > 0)) - playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message("\red [M.name] has bit [name]!", 1) - var/damage = rand(1, 5) - adjustBruteLoss(damage) - health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - for(var/datum/disease/D in M.viruses) - if(istype(D, /datum/disease/jungle_fever)) - contract_disease(D,1,0) - else - for(var/mob/O in viewers(src, null)) - O.show_message("\red [M.name] has attempted to bite [name]!", 1) - return - /mob/living/carbon/monkey/attack_hand(mob/living/carbon/human/M as mob) - if (!ticker) - M << "You cannot attack people before the game has started." - return - - if (istype(loc, /turf) && istype(loc.loc, /area/start)) - M << "No attacking people at spawn, you jackass." - return - - if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves)) - var/obj/item/clothing/gloves/G = M.gloves - if(G.cell) - if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien. - if(G.cell.charge >= 2500) - G.cell.use(2500) - Weaken(5) - if (stuttering < 5) - stuttering = 5 - Stun(5) - - for(var/mob/O in viewers(src, null)) - if (O.client) - O.show_message("\red [src] has been touched with the stun gloves by [M]!", 1, "\red You hear someone fall", 2) - return - else - M << "\red Not enough charge! " - return if (M.a_intent == "help") help_shake_act(M) @@ -254,82 +203,6 @@ O.show_message(text("\red [] has disarmed [name]!", M), 1) return -/mob/living/carbon/monkey/attack_animal(mob/living/M as mob) - - if(M.melee_damage_upper == 0) - M.emote("[M.friendly] [src]") - else - if(M.attack_sound) - playsound(loc, M.attack_sound, 50, 1, 1) - for(var/mob/O in viewers(src, null)) - O.show_message("\red [M] [M.attacktext] [src]!", 1) - M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") - var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - adjustBruteLoss(damage) - updatehealth() - - -/mob/living/carbon/monkey/attack_slime(mob/living/carbon/slime/M as mob) - if (!ticker) - M << "You cannot attack people before the game has started." - return - - if(M.Victim) return // can't attack while eating! - - if (health > -100) - - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red The [M.name] glomps []!", src), 1) - - var/damage = rand(1, 3) - - if(M.is_adult) - damage = rand(20, 40) - else - damage = rand(5, 35) - - adjustBruteLoss(damage) - - if(M.powerlevel > 0) - var/stunprob = 10 - var/power = M.powerlevel + rand(0,3) - - switch(M.powerlevel) - if(1 to 2) stunprob = 20 - if(3 to 4) stunprob = 30 - if(5 to 6) stunprob = 40 - if(7 to 8) stunprob = 60 - if(9) stunprob = 70 - if(10) stunprob = 95 - - if(prob(stunprob)) - M.powerlevel -= 3 - if(M.powerlevel < 0) - M.powerlevel = 0 - - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red The [M.name] has shocked []!", src), 1) - - Weaken(power) - if (stuttering < power) - stuttering = power - Stun(power) - - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread - s.set_up(5, 1, src) - s.start() - - if (prob(stunprob) && M.powerlevel >= 8) - adjustFireLoss(M.powerlevel * rand(6,10)) - - - updatehealth() - - return - /mob/living/carbon/monkey/Stat() ..() statpanel("Status") @@ -393,8 +266,10 @@ del(src) return - -/mob/living/carbon/monkey/IsAdvancedToolUser()//Unless its monkey mode monkeys cant use advanced tools +//Unless its monkey mode monkeys cant use advanced tools +/mob/living/carbon/monkey/IsAdvancedToolUser(var/silent) + if(!silent) + src << "You don't have the dexterity to use [src]!" return 0 /mob/living/carbon/monkey/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="", var/italics=0, var/message_range = world.view, var/list/used_radios = list()) @@ -412,4 +287,4 @@ message = capitalize(trim_left(message)) - ..(message, speaking, verb, alt_name, italics, message_range, used_radios) + ..(message, speaking, verb, alt_name, italics, message_range, used_radios) \ No newline at end of file diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 3e895c73c2..4ac03cdf5f 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -179,3 +179,15 @@ return 0 // End BS12 momentum-transfer code. + +/mob/living/attack_generic(var/mob/user, var/damage, var/attack_message) + + if(!damage) + return + + adjustBruteLoss(damage) + user.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") + src.attack_log += text("\[[time_stamp()]\] was attacked by [user.name] ([user.ckey])") + src.visible_message("[user] has [attack_message] [src]!") + spawn(1) updatehealth() + return 1 diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 1ac5faa11f..3c1c8a935c 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -37,12 +37,4 @@ var/tod = null // Time of death var/update_slimes = 1 - var/silent = null //Can't talk. Value goes down every life proc. - - // Putting these here for attack_animal(). - var/melee_damage_lower = 0 - var/melee_damage_upper = 0 - var/attacktext = "attacks" - var/attack_sound = null - var/friendly = "nuzzles" - var/wall_smash = 0 \ No newline at end of file + var/silent = null //Can't talk. Value goes down every life proc. \ No newline at end of file diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 5f815a3451..ded0990e20 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -542,20 +542,6 @@ var/list/ai_verbs_default = list( updatehealth() return 2 -/mob/living/silicon/ai/attack_animal(mob/living/M as mob) - if(M.melee_damage_upper == 0) - M.emote("[M.friendly] [src]") - else - if(M.attack_sound) - playsound(loc, M.attack_sound, 50, 1, 1) - for(var/mob/O in viewers(src, null)) - O.show_message("\red [M] [M.attacktext] [src]!", 1) - M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") - var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - adjustBruteLoss(damage) - updatehealth() - /mob/living/silicon/ai/reset_view(atom/A) if(camera) camera.SetLuminosity(0) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_console.dm b/code/modules/mob/living/silicon/robot/drone/drone_console.dm index 82ee8c50a2..749d9fea05 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_console.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_console.dm @@ -14,11 +14,6 @@ /obj/machinery/computer/drone_control/attack_ai(var/mob/user as mob) return src.attack_hand(user) -/obj/machinery/computer/drone_control/attack_paw(var/mob/user as mob) - - return src.attack_hand(user) - return - /obj/machinery/computer/drone_control/attack_hand(var/mob/user as mob) if(..()) return diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index caf76cbf0b..c7abbb3d5a 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -871,81 +871,6 @@ var/list/robot_verbs_default = list( spark_system.start() return ..() - - -/mob/living/silicon/robot/attack_slime(mob/living/carbon/slime/M as mob) - if (!ticker) - M << "You cannot attack people before the game has started." - return - - if(M.Victim) return // can't attack while eating! - - if (health > -100) - - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red The [M.name] glomps []!", src), 1) - - var/damage = rand(1, 3) - - if(M.is_adult) - damage = rand(20, 40) - else - damage = rand(5, 35) - - damage = round(damage / 2) // borgs recieve half damage - adjustBruteLoss(damage) - - - if(M.powerlevel > 0) - var/stunprob = 10 - - switch(M.powerlevel) - if(1 to 2) stunprob = 20 - if(3 to 4) stunprob = 30 - if(5 to 6) stunprob = 40 - if(7 to 8) stunprob = 60 - if(9) stunprob = 70 - if(10) stunprob = 95 - - if(prob(stunprob)) - M.powerlevel -= 3 - if(M.powerlevel < 0) - M.powerlevel = 0 - - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red The [M.name] has electrified []!", src), 1) - - flick("noise", flash) - - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread - s.set_up(5, 1, src) - s.start() - - if (prob(stunprob) && M.powerlevel >= 8) - adjustBruteLoss(M.powerlevel * rand(6,10)) - - - updatehealth() - - return - -/mob/living/silicon/robot/attack_animal(mob/living/M as mob) - if(M.melee_damage_upper == 0) - M.emote("[M.friendly] [src]") - else - if(M.attack_sound) - playsound(loc, M.attack_sound, 50, 1, 1) - for(var/mob/O in viewers(src, null)) - O.show_message("\red [M] [M.attacktext] [src]!", 1) - M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") - var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - adjustBruteLoss(damage) - updatehealth() - - /mob/living/silicon/robot/attack_hand(mob/user) add_fingerprint(user) @@ -967,6 +892,10 @@ var/list/robot_verbs_default = list( user << "You remove \the [broken_device]." user.put_in_active_hand(broken_device) +//Robots take half damage from basic attacks. +/mob/living/silicon/robot/attack_generic(var/mob/user, var/damage, var/attack_message) + return ..(user,Floor(damage/2),attack_message) + /mob/living/silicon/robot/proc/allowed(mob/M) //check if it doesn't require any access at all if(check_access(null)) diff --git a/code/modules/mob/living/simple_animal/borer/borer.dm b/code/modules/mob/living/simple_animal/borer/borer.dm index 36d57d1225..593c41b742 100644 --- a/code/modules/mob/living/simple_animal/borer/borer.dm +++ b/code/modules/mob/living/simple_animal/borer/borer.dm @@ -16,7 +16,7 @@ a_intent = "harm" stop_automated_movement = 1 status_flags = CANPUSH - attacktext = "nips" + attacktext = "nipped" friendly = "prods" wander = 0 pass_flags = PASSTABLE diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index 21a731b041..ffcc48bd40 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -86,25 +86,6 @@ step(AM, t) now_pushing = null - -/mob/living/simple_animal/construct/attack_animal(mob/living/M as mob) - if(istype(M, /mob/living/simple_animal/construct/builder)) - health += 5 - M.emote("mends some of \the [src]'s wounds.") - else - if(M.melee_damage_upper <= 0) - M.emote("[M.friendly] \the [src]") - else - if(M.attack_sound) - playsound(loc, M.attack_sound, 50, 1, 1) - for(var/mob/O in viewers(src, null)) - O.show_message("\The [M] [M.attacktext] \the [src]!", 1) - M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") - - var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - adjustBruteLoss(damage) - /mob/living/simple_animal/construct/attackby(var/obj/item/O as obj, var/mob/user as mob) if(O.force) var/damage = O.force @@ -139,7 +120,7 @@ harm_intent_damage = 0 melee_damage_lower = 30 melee_damage_upper = 30 - attacktext = "smashes their armoured gauntlet into" + attacktext = "smashed their armoured gauntlet into" speed = 3 wall_smash = 1 attack_sound = 'sound/weapons/punch3.ogg' @@ -214,7 +195,7 @@ health = 75 melee_damage_lower = 25 melee_damage_upper = 25 - attacktext = "slashes" + attacktext = "slashed" speed = -1 see_in_dark = 7 attack_sound = 'sound/weapons/bladeslice.ogg' @@ -239,7 +220,7 @@ harm_intent_damage = 5 melee_damage_lower = 5 melee_damage_upper = 5 - attacktext = "rams" + attacktext = "rammed" speed = 0 wall_smash = 1 attack_sound = 'sound/weapons/punch2.ogg' @@ -266,7 +247,7 @@ harm_intent_damage = 0 melee_damage_lower = 50 melee_damage_upper = 50 - attacktext = "brutally crushes" + attacktext = "brutally crushed" speed = 5 wall_smash = 1 attack_sound = 'sound/weapons/punch4.ogg' diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index 8c98daaa87..a7b7cbc622 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -308,10 +308,9 @@ dir = SOUTH if(isturf(movement_target.loc) ) - movement_target.attack_animal(src) - else if(ishuman(movement_target.loc) ) - if(prob(20)) - emote("stares at the [movement_target] that [movement_target.loc] has with a sad puppy-face") + UnarmedAttack(movement_target) + else if(ishuman(movement_target.loc) && prob(20)) + custom_emote(1,"stares at the [movement_target] that [movement_target.loc] has with sad puppy eyes.") if(prob(1)) emote(pick("dances around","chases its tail")) diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index 3fa82adfcf..ef9731bb0b 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -18,7 +18,7 @@ response_disarm = "gently pushes aside the" response_harm = "kicks the" faction = "goat" - attacktext = "kicks" + attacktext = "kicked" health = 40 melee_damage_lower = 1 melee_damage_upper = 5 @@ -102,7 +102,7 @@ response_help = "pets the" response_disarm = "gently pushes aside the" response_harm = "kicks the" - attacktext = "kicks" + attacktext = "kicked" health = 50 var/datum/reagents/udder = null @@ -163,7 +163,7 @@ response_help = "pets the" response_disarm = "gently pushes aside the" response_harm = "kicks the" - attacktext = "kicks" + attacktext = "kicked" health = 1 var/amount_grown = 0 pass_flags = PASSTABLE | PASSGRILLE @@ -204,7 +204,7 @@ var/global/chicken_count = 0 response_help = "pets the" response_disarm = "gently pushes aside the" response_harm = "kicks the" - attacktext = "kicks" + attacktext = "kicked" health = 10 var/eggsleft = 0 var/body_color diff --git a/code/modules/mob/living/simple_animal/friendly/lizard.dm b/code/modules/mob/living/simple_animal/friendly/lizard.dm index 171e96fc62..d4677ef5d3 100644 --- a/code/modules/mob/living/simple_animal/friendly/lizard.dm +++ b/code/modules/mob/living/simple_animal/friendly/lizard.dm @@ -9,8 +9,7 @@ speak_emote = list("hisses") health = 5 maxHealth = 5 - attacktext = "bites" - attacktext = "bites" + attacktext = "bitten" melee_damage_lower = 1 melee_damage_upper = 2 response_help = "pets" diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index 3027819403..bf64e9265b 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -26,8 +26,7 @@ health = 10 maxHealth = 10 - attacktext = "shocks" - attacktext = "shocks" + attacktext = "shocked" melee_damage_lower = 1 melee_damage_upper = 3 diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index b46cdb58a7..ab6874276a 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -16,7 +16,7 @@ harm_intent_damage = 5 melee_damage_lower = 25 melee_damage_upper = 25 - attacktext = "slashes" + attacktext = "slashed" a_intent = "harm" attack_sound = 'sound/weapons/bladeslice.ogg' min_oxy = 0 diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm index 0036d3c153..15786b6751 100644 --- a/code/modules/mob/living/simple_animal/hostile/bear.dm +++ b/code/modules/mob/living/simple_animal/hostile/bear.dm @@ -141,10 +141,10 @@ var/mob/living/L = target_mob L.adjustBruteLoss(damage) return L - else if(istype(target_mob,/obj/mecha)) - var/obj/mecha/M = target_mob - M.attack_animal(src) - return M + //else if(istype(target_mob,/obj/mecha)) + //var/obj/mecha/M = target_mob + //M.attack_animal(src) + //return M diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm index 7fb6ee9854..8708b1009e 100644 --- a/code/modules/mob/living/simple_animal/hostile/carp.dm +++ b/code/modules/mob/living/simple_animal/hostile/carp.dm @@ -20,7 +20,7 @@ harm_intent_damage = 8 melee_damage_lower = 15 melee_damage_upper = 15 - attacktext = "bites" + attacktext = "bitten" attack_sound = 'sound/weapons/bite.ogg' //Space carp aren't affected by atmos. diff --git a/code/modules/mob/living/simple_animal/hostile/creature.dm b/code/modules/mob/living/simple_animal/hostile/creature.dm index 45464bf895..07ad06619a 100644 --- a/code/modules/mob/living/simple_animal/hostile/creature.dm +++ b/code/modules/mob/living/simple_animal/hostile/creature.dm @@ -10,7 +10,7 @@ maxHealth = 80 melee_damage_lower = 25 melee_damage_upper = 50 - attacktext = "chomps" + attacktext = "chomped" attack_sound = 'sound/weapons/bite.ogg' faction = "creature" speed = 4 \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/faithless.dm b/code/modules/mob/living/simple_animal/hostile/faithless.dm index 5613c21ac3..d69ac01012 100644 --- a/code/modules/mob/living/simple_animal/hostile/faithless.dm +++ b/code/modules/mob/living/simple_animal/hostile/faithless.dm @@ -16,7 +16,7 @@ harm_intent_damage = 10 melee_damage_lower = 15 melee_damage_upper = 15 - attacktext = "grips" + attacktext = "gripped" attack_sound = 'sound/hallucinations/growl1.ogg' min_oxy = 0 diff --git a/code/modules/mob/living/simple_animal/hostile/hivebot.dm b/code/modules/mob/living/simple_animal/hostile/hivebot.dm index b0b02f656f..26d69933e8 100644 --- a/code/modules/mob/living/simple_animal/hostile/hivebot.dm +++ b/code/modules/mob/living/simple_animal/hostile/hivebot.dm @@ -13,7 +13,7 @@ maxHealth = 15 melee_damage_lower = 2 melee_damage_upper = 3 - attacktext = "claws" + attacktext = "clawed" projectilesound = 'sound/weapons/Gunshot.ogg' projectiletype = /obj/item/projectile/hivebotbullet faction = "hivebot" diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 3aaaf8ec97..4e281e4be6 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -89,17 +89,17 @@ /mob/living/simple_animal/hostile/proc/AttackingTarget() if(!Adjacent(target_mob)) return - if(isliving(target_mob)) - var/mob/living/L = target_mob - L.attack_animal(src) - return L - if(istype(target_mob,/obj/mecha)) - var/obj/mecha/M = target_mob - M.attack_animal(src) - return M - if(istype(target_mob,/obj/machinery/bot)) - var/obj/machinery/bot/B = target_mob - B.attack_animal(src) + //if(isliving(target_mob)) + //var/mob/living/L = target_mob + //L.attack_animal(src) + //return L + //if(istype(target_mob,/obj/mecha)) + //var/obj/mecha/M = target_mob + //M.attack_animal(src) + //return M + //if(istype(target_mob,/obj/machinery/bot)) + //var/obj/machinery/bot/B = target_mob + //B.attack_animal(src) /mob/living/simple_animal/hostile/proc/LoseTarget() stance = HOSTILE_STANCE_IDLE @@ -193,10 +193,10 @@ /mob/living/simple_animal/hostile/proc/DestroySurroundings() if(prob(break_stuff_probability)) for(var/dir in cardinal) // North, South, East, West - for(var/obj/structure/window/obstacle in get_step(src, dir)) - if(obstacle.dir == reverse_dir[dir]) // So that windows get smashed in the right order - obstacle.attack_animal(src) - return - var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir)) - if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille)) - obstacle.attack_animal(src) + //for(var/obj/structure/window/obstacle in get_step(src, dir)) + //if(obstacle.dir == reverse_dir[dir]) // So that windows get smashed in the right order + //obstacle.attack_animal(src) + //return + //var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir)) + //if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille)) + //obstacle.attack_animal(src) diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index d239e88c6d..6e43df9378 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -20,7 +20,7 @@ harm_intent_damage = 5 melee_damage_lower = 8 melee_damage_upper = 12 - attacktext = "attacks" + attacktext = "attacked" attack_sound = 'sound/weapons/bite.ogg' min_oxy = 0 @@ -56,7 +56,7 @@ // Aggro when you try to open them. Will also pickup loot when spawns and drop it when dies. /mob/living/simple_animal/hostile/mimic/crate - attacktext = "bites" + attacktext = "bitten" stop_automated_movement = 1 wander = 0 diff --git a/code/modules/mob/living/simple_animal/hostile/pirate.dm b/code/modules/mob/living/simple_animal/hostile/pirate.dm index 0e0e50c07e..2ccf788893 100644 --- a/code/modules/mob/living/simple_animal/hostile/pirate.dm +++ b/code/modules/mob/living/simple_animal/hostile/pirate.dm @@ -17,7 +17,7 @@ harm_intent_damage = 5 melee_damage_lower = 30 melee_damage_upper = 30 - attacktext = "slashes" + attacktext = "slashed" attack_sound = 'sound/weapons/bladeslice.ogg' min_oxy = 5 diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm index 68d0e3c5cd..2bb2610f66 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm @@ -21,7 +21,7 @@ harm_intent_damage = 8 melee_damage_lower = 10 melee_damage_upper = 10 - attacktext = "attacks" + attacktext = "attacked" attack_sound = 'sound/items/bikehorn.ogg' min_oxy = 5 diff --git a/code/modules/mob/living/simple_animal/hostile/russian.dm b/code/modules/mob/living/simple_animal/hostile/russian.dm index d89db259b3..8c2a470dcd 100644 --- a/code/modules/mob/living/simple_animal/hostile/russian.dm +++ b/code/modules/mob/living/simple_animal/hostile/russian.dm @@ -17,7 +17,7 @@ harm_intent_damage = 5 melee_damage_lower = 15 melee_damage_upper = 15 - attacktext = "punches" + attacktext = "punched" a_intent = "harm" var/corpse = /obj/effect/landmark/mobcorpse/russian var/weapon1 = /obj/item/weapon/kitchenknife diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm index ff9aba71a4..11a81284f2 100644 --- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm +++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm @@ -17,7 +17,7 @@ harm_intent_damage = 5 melee_damage_lower = 10 melee_damage_upper = 10 - attacktext = "punches" + attacktext = "punched" a_intent = "harm" var/corpse = /obj/effect/landmark/mobcorpse/syndicatesoldier var/weapon1 @@ -55,7 +55,7 @@ icon_living = "syndicatemelee" weapon1 = /obj/item/weapon/melee/energy/sword/red weapon2 = /obj/item/weapon/shield/energy - attacktext = "slashes" + attacktext = "slashed" status_flags = 0 /mob/living/simple_animal/hostile/syndicate/melee/attackby(var/obj/item/O as obj, var/mob/user as mob) @@ -144,7 +144,7 @@ maxHealth = 15 melee_damage_lower = 15 melee_damage_upper = 15 - attacktext = "cuts" + attacktext = "cut" attack_sound = 'sound/weapons/bladeslice.ogg' faction = "syndicate" min_oxy = 0 diff --git a/code/modules/mob/living/simple_animal/hostile/tree.dm b/code/modules/mob/living/simple_animal/hostile/tree.dm index 7f44f8a9b1..b263cd2112 100644 --- a/code/modules/mob/living/simple_animal/hostile/tree.dm +++ b/code/modules/mob/living/simple_animal/hostile/tree.dm @@ -21,7 +21,7 @@ harm_intent_damage = 5 melee_damage_lower = 8 melee_damage_upper = 12 - attacktext = "bites" + attacktext = "bitten" attack_sound = 'sound/weapons/bite.ogg' //Space carp aren't affected by atmos. diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 000b125673..21833161ad 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -232,22 +232,6 @@ drop_held_item(0) return -/mob/living/simple_animal/parrot/attack_paw(mob/living/carbon/monkey/M as mob) - attack_hand(M) - -//Simple animals -/mob/living/simple_animal/parrot/attack_animal(mob/living/M as mob) - if(client) return - - - if(parrot_state == PARROT_PERCH) - parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched - - if(M.melee_damage_upper > 0) - parrot_interest = M - parrot_state = PARROT_SWOOP | PARROT_ATTACK //Attack other animals regardless - icon_state = "parrot_fly" - //Mobs with objects /mob/living/simple_animal/parrot/attackby(var/obj/item/O as obj, var/mob/user as mob) ..() @@ -753,3 +737,21 @@ if(!message || stat) return speech_buffer.Add(message) + +/mob/living/simple_animal/parrot/attack_generic(var/mob/user, var/damage, var/attack_message) + + var/success = ..() + + if(client) + return success + + if(parrot_state == PARROT_PERCH) + parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched + + if(!success) + return 0 + + parrot_interest = user + parrot_state = PARROT_SWOOP | PARROT_ATTACK //Attack other animals regardless + icon_state = "parrot_fly" + return success \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/shade.dm b/code/modules/mob/living/simple_animal/shade.dm index ae0fc99e5d..ed5f35d55b 100644 --- a/code/modules/mob/living/simple_animal/shade.dm +++ b/code/modules/mob/living/simple_animal/shade.dm @@ -16,7 +16,7 @@ response_harm = "punches the" melee_damage_lower = 5 melee_damage_upper = 15 - attacktext = "drains the life from" + attacktext = "drained the life from" minbodytemp = 0 maxbodytemp = 4000 min_oxy = 0 diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index e06d1af938..078159c12d 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -47,11 +47,12 @@ var/speed = 0 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster //LETTING SIMPLE ANIMALS ATTACK? WHAT COULD GO WRONG. Defaults to zero so Ian can still be cuddly - melee_damage_lower = 0 - melee_damage_upper = 0 - attacktext = "attacks" - attack_sound = null - friendly = "nuzzles" //If the mob does no damage with it's attack + var/melee_damage_lower = 0 + var/melee_damage_upper = 0 + var/attacktext = "attacked" + var/attack_sound = null + var/friendly = "nuzzles" + var/wall_smash = 0 /mob/living/simple_animal/New() ..() @@ -209,19 +210,6 @@ if(act == "scream") act = "whimper" //ugly hack to stop animals screaming when crushed :P ..(act, type, desc) -/mob/living/simple_animal/attack_animal(mob/living/M as mob) - if(M.melee_damage_upper == 0) - M.emote("[M.friendly] [src]") - else - if(M.attack_sound) - playsound(loc, M.attack_sound, 50, 1, 1) - for(var/mob/O in viewers(src, null)) - O.show_message("\red [M] [M.attacktext] [src]!", 1) - M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") - var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - adjustBruteLoss(damage) - /mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj) if(!Proj || Proj.nodamage) return @@ -266,29 +254,6 @@ return - -/mob/living/simple_animal/attack_slime(mob/living/carbon/slime/M as mob) - if (!ticker) - M << "You cannot attack people before the game has started." - return - - if(M.Victim) return // can't attack while eating! - - visible_message("\red The [M.name] glomps [src]!") - - var/damage = rand(1, 3) - - if(M.is_adult) - damage = rand(20, 40) - else - damage = rand(5, 35) - - adjustBruteLoss(damage) - - - return - - /mob/living/simple_animal/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri if(istype(O, /obj/item/stack/medical)) diff --git a/code/modules/mob/living/simple_animal/worm.dm b/code/modules/mob/living/simple_animal/worm.dm index 387ac33bf2..6dad3655e3 100644 --- a/code/modules/mob/living/simple_animal/worm.dm +++ b/code/modules/mob/living/simple_animal/worm.dm @@ -57,7 +57,7 @@ melee_damage_lower = 10 melee_damage_upper = 15 - attacktext = "bites" + attacktext = "bitten" animate_movement = SLIDE_STEPS diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 9577a476f6..1233923ca5 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -921,10 +921,10 @@ note dizziness decrements automatically in the mob's Life() proc. return facedir(SOUTH) -/mob/proc/IsAdvancedToolUser()//This might need a rename but it should replace the can this mob use things check +//This might need a rename but it should replace the can this mob use things check +/mob/proc/IsAdvancedToolUser() return 0 - /mob/proc/Stun(amount) if(status_flags & CANSTUN) stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 8f0f71a0ab..43ed04b0d0 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -21,11 +21,6 @@ return - -/obj/item/weapon/paper_bin/attack_paw(mob/user as mob) - return attack_hand(user) - - /obj/item/weapon/paper_bin/attack_hand(mob/user as mob) if (hasorgans(user)) var/datum/organ/external/temp = user:organs_by_name["r_hand"] diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index fc4668ec25..ce867e818a 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -18,9 +18,6 @@ attack_ai(mob/user as mob) return attack_hand(user) - attack_paw(mob/user as mob) - return attack_hand(user) - attack_hand(mob/user as mob) user.set_machine(src) diff --git a/code/modules/paperwork/stamps.dm b/code/modules/paperwork/stamps.dm index 1717560c56..51ec0002dd 100644 --- a/code/modules/paperwork/stamps.dm +++ b/code/modules/paperwork/stamps.dm @@ -64,12 +64,7 @@ icon_state = "stamp-cent" item_color = "centcomm" - -/obj/item/weapon/stamp/attack_paw(mob/user as mob) - return attack_hand(user) - // Syndicate stamp to forge documents. - /obj/item/weapon/stamp/chameleon/attack_self(mob/user as mob) var/list/stamp_types = typesof(/obj/item/weapon/stamp) - src.type // Get all stamp types except our own diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 12b16a54ef..e906bf99b0 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -819,7 +819,6 @@ if(inoperable()) return 0 if(!user.IsAdvancedToolUser()) - user << "You don't have the dexterity to use [src]!" return 0 if(user.restrained()) user << "You must have free hands to use [src]." diff --git a/code/modules/power/engine.dm b/code/modules/power/engine.dm index 59227bf7cb..c0f761254e 100644 --- a/code/modules/power/engine.dm +++ b/code/modules/power/engine.dm @@ -1,6 +1,3 @@ -/turf/simulated/floor/engine/attack_paw(var/mob/user as mob) - return src.attack_hand(user) - /turf/simulated/floor/engine/attack_hand(var/mob/user as mob) if ((!( user.canmove ) || user.restrained() || !( user.pulling ))) return diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 73a0fce4ec..53599073b2 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -63,10 +63,6 @@ break return foundgenerator - -/obj/machinery/computer/gravity_control_computer/attack_paw(mob/user as mob) - return attack_hand(user) - /obj/machinery/computer/gravity_control_computer/attack_ai(mob/user as mob) return attack_hand(user) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 0cc94399b3..f6cfe8f3ca 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -87,7 +87,7 @@ /obj/machinery/light_construct/examine(mob/user) if(!..(user, 2)) return - + switch(src.stage) if(1) user << "It's an empty frame." @@ -307,6 +307,17 @@ if(on != on_gs) on_gs = on +/obj/machinery/light/attack_generic(var/mob/user, var/damage) + if(!damage) + return + if(status == LIGHT_EMPTY||status == LIGHT_BROKEN) + user << "That object is useless to you." + return + if(!(status == LIGHT_OK||status == LIGHT_BURNED)) + return + visible_message("[user] smashes the light!") + broken() + return 1 // attempt to set the light's on/off status // will not switch on if broken/burned/empty @@ -452,19 +463,8 @@ src.flicker(1) return -/obj/machinery/light/attack_animal(mob/living/M) - if(M.melee_damage_upper == 0) return - if(status == LIGHT_EMPTY||status == LIGHT_BROKEN) - M << "\red That object is useless to you." - return - else if (status == LIGHT_OK||status == LIGHT_BURNED) - for(var/mob/O in viewers(src)) - O.show_message("\red [M.name] smashed the light!", 3, "You hear a tinkle of breaking glass", 2) - broken() - return // attack with hand - remove tube/bulb // if hands aren't protected and the light is on, burn the player - /obj/machinery/light/attack_hand(mob/user) add_fingerprint(user) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index edcb764de4..0799900909 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -266,9 +266,6 @@ display round(lastgen) and phorontank amount /obj/machinery/power/port_gen/pacman/attack_ai(mob/user as mob) interact(user) -/obj/machinery/power/port_gen/pacman/attack_paw(mob/user as mob) - interact(user) - /obj/machinery/power/port_gen/pacman/interact(mob/user) if (get_dist(src, user) > 1 ) if (!istype(user, /mob/living/silicon/ai)) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 3d4ea67c3b..c7a62e7f5c 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -74,7 +74,6 @@ return if (!user.IsAdvancedToolUser()) - user << "\red You don't have the dexterity to do this!" return if(istype(user, /mob/living)) var/mob/living/M = user diff --git a/code/modules/projectiles/guns/projectile/launcher.dm b/code/modules/projectiles/guns/projectile/launcher.dm index c367780a5e..5f9d9fdfde 100644 --- a/code/modules/projectiles/guns/projectile/launcher.dm +++ b/code/modules/projectiles/guns/projectile/launcher.dm @@ -39,7 +39,6 @@ /obj/item/weapon/gun/launcher/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0) if (!user.IsAdvancedToolUser()) - user << "\red You don't have the dexterity to do this!" return 0 add_fingerprint(user) diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 4c6b26f19e..70c706b951 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -172,9 +172,6 @@ /obj/machinery/chem_dispenser/attack_ai(mob/user as mob) return src.attack_hand(user) -/obj/machinery/chem_dispenser/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/machinery/chem_dispenser/attack_hand(mob/user as mob) if(stat & BROKEN) return @@ -460,9 +457,6 @@ /obj/machinery/chem_master/attack_ai(mob/user as mob) return src.attack_hand(user) -/obj/machinery/chem_master/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/machinery/chem_master/attack_hand(mob/user as mob) if(stat & BROKEN) return @@ -686,9 +680,6 @@ /obj/machinery/computer/pandemic/attack_ai(mob/user as mob) return src.attack_hand(user) -/obj/machinery/computer/pandemic/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/machinery/computer/pandemic/attack_hand(mob/user as mob) if(stat & (NOPOWER|BROKEN)) return @@ -922,9 +913,6 @@ src.updateUsrDialog() return 0 -/obj/machinery/reagentgrinder/attack_paw(mob/user as mob) - return src.attack_hand(user) - /obj/machinery/reagentgrinder/attack_ai(mob/user as mob) return 0 diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 63944b8157..3735aed0cf 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -127,7 +127,7 @@ if(istype(W,/obj/item/weapon/storage)) ..() // -> item/attackby() return - + // Eating with forks if(istype(W,/obj/item/weapon/kitchen/utensil)) var/obj/item/weapon/kitchen/utensil/U = W @@ -156,16 +156,16 @@ if (reagents.total_volume <= 0) del(src) return - + if (is_sliceable()) //these are used to allow hiding edge items in food that is not on a table/tray var/can_slice_here = isturf(src.loc) && ((locate(/obj/structure/table) in src.loc) || (locate(/obj/machinery/optable) in src.loc) || (locate(/obj/item/weapon/tray) in src.loc)) var/hide_item = !has_edge(W) || !can_slice_here - + if (hide_item) if (W.w_class >= src.w_class || W.is_robot_module()) return - + user << "\red You slip [W] inside [src]." user.u_equip(W) if ((user.client && user.s_active != src)) @@ -174,19 +174,19 @@ add_fingerprint(user) contents += W return - + if (has_edge(W)) if (!can_slice_here) user << "\red You cannot slice [src] here! You need a table or at least a tray to do it." return - + var/slices_lost = 0 if (W.w_class > 3) user.visible_message("\blue [user] crudely slices \the [src] with [W]!", "\blue You crudely slice \the [src] with your [W]!") slices_lost = rand(1,min(1,round(slices_num/2))) else user.visible_message("\blue [user] slices \the [src]!", "\blue You slice \the [src]!") - + var/reagents_per_slice = reagents.total_volume/slices_num for(var/i=1 to (slices_num-slices_lost)) var/obj/slice = new slice_path (src.loc) @@ -195,7 +195,7 @@ return /obj/item/weapon/reagent_containers/food/snacks/proc/is_sliceable() - return (slices_num <= 0 || !slices_num || !slice_path) + return (slices_num <= 0 || !slices_num || !slice_path) /obj/item/weapon/reagent_containers/food/snacks/Del() if(contents) @@ -203,38 +203,27 @@ something.loc = get_turf(src) ..() -/obj/item/weapon/reagent_containers/food/snacks/attack_animal(var/mob/M) - if(isanimal(M)) - if(iscorgi(M)) - if(bitecount == 0 || prob(50)) - M.emote("nibbles away at the [src]") - bitecount++ - if(bitecount >= 5) - var/sattisfaction_text = pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where the [src] was") - if(sattisfaction_text) - M.emote("[sattisfaction_text]") - del(src) - if(ismouse(M)) - var/mob/living/simple_animal/mouse/N = M - N << text("\blue You nibble away at [src].") - if(prob(50)) - N.visible_message("[N] nibbles away at [src].", "") - //N.emote("nibbles away at the [src]") - N.health = min(N.health + 1, N.maxHealth) - //////////////////////////////////////////////////////////////////////////////// /// FOOD END //////////////////////////////////////////////////////////////////////////////// +/obj/item/weapon/reagent_containers/food/snacks/attack_generic(var/mob/living/user) + if(isanimal(user) || isalien(user)) + if(bitecount == 0 || prob(50)) + user.custom_emote(1,"nibbles away at the [src]") + bitecount++ + if(reagents && user.reagents) + reagents.trans_to_ingest(user, bitesize) + spawn(5) + if(!src && !user.client) + user.custom_emote(1,"[pick("burps", "cries for more", "burps twice", "looks at the area where the food was")]") + del(src) - - - - + On_Consume(user) ////////////////////////////////////////////////// ////////////////////////////////////////////Snacks diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 810b523078..49348a22a0 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -14,10 +14,6 @@ flags = FPRINT | TABLEPASS | OPENCONTAINER slot_flags = SLOT_BELT -/obj/item/weapon/reagent_containers/hypospray/attack_paw(mob/user as mob) - return src.attack_hand(user) - - /obj/item/weapon/reagent_containers/hypospray/New() //comment this to make hypos start off empty ..() reagents.add_reagent("tricordrazine", 30) diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 5617a3802e..744e212e78 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -45,9 +45,6 @@ ..() update_icon() - attack_paw() - return attack_hand() - attackby(obj/item/I as obj, mob/user as mob) return @@ -308,9 +305,6 @@ ..() update_icon() - attack_paw() - return attack_hand() - attackby(obj/item/I as obj, mob/user as mob) return diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 035c16e70e..bf77c47d59 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -204,31 +204,27 @@ update() return - -// monkeys can only pull the flush lever -/obj/machinery/disposal/attack_paw(mob/user as mob) - if(stat & BROKEN) - return - - flush = !flush - update() - return - // ai as human but can't flush /obj/machinery/disposal/attack_ai(mob/user as mob) interact(user, 1) // human interact with machine /obj/machinery/disposal/attack_hand(mob/user as mob) + + if(stat & BROKEN) + return + if(user && user.loc == src) usr << "\red You cannot reach the controls from inside." return - /* - if(mode==-1) - usr << "\red The disposal units power is disabled." - return - */ - interact(user, 0) + + // Clumsy folks can only flush it. + if(user.IsAdvancedToolUser(1)) + interact(user, 0) + else + flush = !flush + update() + return // user interaction /obj/machinery/disposal/interact(mob/user, var/ai=0) diff --git a/code/modules/research/xenoarchaeology/genetics/prehistoric_animals.dm b/code/modules/research/xenoarchaeology/genetics/prehistoric_animals.dm index c9022726a6..df2ff6d852 100644 --- a/code/modules/research/xenoarchaeology/genetics/prehistoric_animals.dm +++ b/code/modules/research/xenoarchaeology/genetics/prehistoric_animals.dm @@ -12,7 +12,7 @@ speed = 2 melee_damage_lower = 5 melee_damage_upper = 15 - attacktext = "mauls" + attacktext = "mauled" cold_damage_per_tick = 0 speak_chance = 5 speak = list("Hruuugh!","Hrunnph") @@ -33,7 +33,7 @@ speed = 1 melee_damage_lower = 1 melee_damage_upper = 8 - attacktext = "gouges" + attacktext = "gouged" cold_damage_per_tick = 0 speak_chance = 5 speak = list("Awrr?","Aowrl!","Worrl") @@ -54,7 +54,7 @@ speed = 1 melee_damage_lower = 3 melee_damage_upper = 12 - attacktext = "gouges" + attacktext = "gouged" cold_damage_per_tick = 0 speak_chance = 5 speak = list("Shuhn","Shrunnph?","Shunpf") diff --git a/code/modules/security levels/keycard authentication.dm b/code/modules/security levels/keycard authentication.dm index 33f40e4193..87514a5473 100644 --- a/code/modules/security levels/keycard authentication.dm +++ b/code/modules/security levels/keycard authentication.dm @@ -24,10 +24,6 @@ user << "The station AI is not to interact with these devices." return -/obj/machinery/keycard_auth/attack_paw(mob/user as mob) - user << "You are too primitive to use this device." - return - /obj/machinery/keycard_auth/attackby(obj/item/weapon/W as obj, mob/user as mob) if(stat & (NOPOWER|BROKEN)) user << "This device is not powered." @@ -53,6 +49,8 @@ if(user.stat || stat & (NOPOWER|BROKEN)) user << "This device is not powered." return + if(!user.IsAdvancedToolUser()) + return 0 if(busy) user << "This device is busy." return diff --git a/code/modules/shieldgen/shield_capacitor.dm b/code/modules/shieldgen/shield_capacitor.dm index ed68d6ce81..2893f11b89 100644 --- a/code/modules/shieldgen/shield_capacitor.dm +++ b/code/modules/shieldgen/shield_capacitor.dm @@ -64,12 +64,6 @@ else ..() -/obj/machinery/shield_capacitor/attack_paw(user as mob) - return src.attack_hand(user) - -/obj/machinery/shield_capacitor/attack_ai(user as mob) - return src.attack_hand(user) - /obj/machinery/shield_capacitor/attack_hand(mob/user) if(stat & (BROKEN)) return diff --git a/code/modules/shieldgen/shield_gen.dm b/code/modules/shieldgen/shield_gen.dm index b330b7cac9..0573770dc7 100644 --- a/code/modules/shieldgen/shield_gen.dm +++ b/code/modules/shieldgen/shield_gen.dm @@ -80,9 +80,6 @@ else ..() -/obj/machinery/shield_gen/attack_paw(user as mob) - return src.attack_hand(user) - /obj/machinery/shield_gen/attack_ai(user as mob) return src.attack_hand(user) @@ -146,16 +143,16 @@ //figure out how much energy we need to draw from the capacitor if(active && owned_capacitor && owned_capacitor.active) var/target_renwick_increase = min(target_field_strength - average_field_strength, strengthen_rate) + renwick_upkeep_per_field //per field tile - + var/required_energy = field.len * target_renwick_increase / energy_conversion_rate var/assumed_charge = min(owned_capacitor.stored_charge, required_energy) total_renwick_increase = assumed_charge * energy_conversion_rate owned_capacitor.stored_charge -= assumed_charge else renwick_upkeep_per_field = max(renwick_upkeep_per_field, 0.5) - + var/renwick_increase_per_field = total_renwick_increase/field.len //per field tile - + average_field_strength = 0 //recalculate the average field strength for(var/obj/effect/energy_field/E in field) var/amount_to_strengthen = renwick_increase_per_field - renwick_upkeep_per_field @@ -164,7 +161,7 @@ E.ticks_recovering -= 1 else E.Strengthen(amount_to_strengthen) - + average_field_strength += E.strength average_field_strength /= field.len @@ -190,7 +187,7 @@ strengthen_rate = between(0, strengthen_rate + text2num(href_list["strengthen_rate"]), max_strengthen_rate) else if( href_list["target_field_strength"] ) target_field_strength = between(1, target_field_strength + text2num(href_list["target_field_strength"]), max_field_strength) - + updateDialog() /obj/machinery/shield_gen/ex_act(var/severity) @@ -236,24 +233,24 @@ //grab the border tiles in a circle around this machine /obj/machinery/shield_gen/proc/get_shielded_turfs() var/list/out = list() - + var/turf/gen_turf = get_turf(src) if (!gen_turf) return - + var/turf/T for (var/x_offset = -field_radius; x_offset <= field_radius; x_offset++) T = locate(gen_turf.x + x_offset, gen_turf.y - field_radius, gen_turf.z) if (T) out += T - + T = locate(gen_turf.x + x_offset, gen_turf.y + field_radius, gen_turf.z) if (T) out += T - + for (var/y_offset = -field_radius+1; y_offset < field_radius; y_offset++) T = locate(gen_turf.x - field_radius, gen_turf.y + y_offset, gen_turf.z) if (T) out += T - + T = locate(gen_turf.x + field_radius, gen_turf.y + y_offset, gen_turf.z) if (T) out += T - + return out diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index 9260c44346..8e74323d6e 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -7,10 +7,10 @@ /* How to tweak the SM - + POWER_FACTOR directly controls how much power the SM puts out at a given level of excitation (power var). Making this lower means you have to work the SM harder to get the same amount of power. CRITICAL_TEMPERATURE The temperature at which the SM starts taking damage. - + CHARGING_FACTOR Controls how much emitter shots excite the SM. DAMAGE_RATE_LIMIT Controls the maximum rate at which the SM will take damage due to high temperatures. */ @@ -77,7 +77,7 @@ var/config_hallucination_power = 0.1 var/obj/item/device/radio/radio - + var/debug = 0 shard //Small subtype, less efficient and more sensitive, but less boom. @@ -203,7 +203,7 @@ //If chain reacting at oxygen == 1, we want the power at 800 K to stabilize at a power level of 250 equilibrium_power = 250 icon_state = base_icon_state - + temp_factor = ( (equilibrium_power/DECAY_FACTOR)**3 )/800 power = max( (removed.temperature * temp_factor) * oxygen + power, 0) @@ -216,13 +216,13 @@ var/heat_capacity = removed.heat_capacity() removed.adjust_multi("phoron", max(device_energy / PHORON_RELEASE_MODIFIER, 0), \ "oxygen", max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0)) - + var/thermal_power = THERMAL_RELEASE_MODIFIER * device_energy if (debug) var/heat_capacity_new = removed.heat_capacity() visible_message("[src]: Releasing [round(thermal_power)] W.") visible_message("[src]: Releasing additional [round((heat_capacity_new - heat_capacity)*removed.temperature)] W with exhaust gasses.") - + removed.add_thermal_energy(thermal_power) removed.temperature = between(0, removed.temperature, 10000) @@ -255,11 +255,6 @@ damage += Proj.damage * config_bullet_energy return 0 - -/obj/machinery/power/supermatter/attack_paw(mob/user as mob) - return attack_hand(user) - - /obj/machinery/power/supermatter/attack_robot(mob/user as mob) if(Adjacent(user)) return attack_hand(user) @@ -282,7 +277,7 @@ var/distance = get_dist(R, src) if(distance <= 15) //for collectors using standard phoron tanks at 1013 kPa, the actual power generated will be this power*POWER_FACTOR*20*29 = power*POWER_FACTOR*580 - R.receive_pulse(power * POWER_FACTOR * (min(3/distance, 1))**2) + R.receive_pulse(power * POWER_FACTOR * (min(3/distance, 1))**2) return /obj/machinery/power/supermatter/attackby(obj/item/weapon/W as obj, mob/living/user as mob) diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index c15c587efd..5b40c9e5fc 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -100,15 +100,6 @@ else ..() -/obj/vehicle/attack_animal(var/mob/living/simple_animal/M as mob) - if(M.melee_damage_upper == 0) return - health -= M.melee_damage_upper - src.visible_message("\red [M] has [M.attacktext] [src]!") - M.attack_log += text("\[[time_stamp()]\] attacked [src.name]") - if(prob(10)) - new /obj/effect/decal/cleanable/blood/oil(src.loc) - healthcheck() - /obj/vehicle/bullet_act(var/obj/item/projectile/Proj) health -= Proj.damage ..() @@ -355,4 +346,15 @@ // Stat update procs //------------------------------------------------------- /obj/vehicle/proc/update_stats() - return \ No newline at end of file + return + +/obj/vehicle/attack_generic(var/mob/user, var/damage, var/attack_message) + if(!damage) + return + visible_message("[user] [attack_message] the [src]!") + user.attack_log += text("\[[time_stamp()]\] attacked [src.name]") + src.health -= damage + if(prob(10)) + new /obj/effect/decal/cleanable/blood/oil(src.loc) + spawn(1) healthcheck() + return 1 \ No newline at end of file diff --git a/code/modules/virus2/curer.dm b/code/modules/virus2/curer.dm index 44a0fd348b..d87f579d31 100644 --- a/code/modules/virus2/curer.dm +++ b/code/modules/virus2/curer.dm @@ -32,16 +32,11 @@ state("The [src.name] Buzzes", "blue") return ..() - return + return /obj/machinery/computer/curer/attack_ai(var/mob/user as mob) return src.attack_hand(user) -/obj/machinery/computer/curer/attack_paw(var/mob/user as mob) - - return src.attack_hand(user) - return - /obj/machinery/computer/curer/attack_hand(var/mob/user as mob) if(..()) return diff --git a/code/modules/virus2/diseasesplicer.dm b/code/modules/virus2/diseasesplicer.dm index 47a4402ab4..cbab5f5f7d 100644 --- a/code/modules/virus2/diseasesplicer.dm +++ b/code/modules/virus2/diseasesplicer.dm @@ -36,9 +36,6 @@ /obj/machinery/computer/diseasesplicer/attack_ai(var/mob/user as mob) return src.attack_hand(user) -/obj/machinery/computer/diseasesplicer/attack_paw(var/mob/user as mob) - return src.attack_hand(user) - /obj/machinery/computer/diseasesplicer/attack_hand(var/mob/user as mob) if(..()) return ui_interact(user)