Skip to content

Commit

Permalink
Merge branch 'dev-sierra' into explosions
Browse files Browse the repository at this point in the history
  • Loading branch information
Lexanx authored Nov 21, 2024
2 parents 58cd509 + 1056d00 commit 18d14b4
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 29 deletions.
2 changes: 1 addition & 1 deletion code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ avoid code duplication. This includes items that may sometimes act as a standard

use_call = "use"
. = use_before(atom, user, click_params)
if (!. && user.a_intent == I_HURT)
if (!. && (user.a_intent == I_HURT || user.a_intent == I_DISARM))
use_call = "weapon"
. = atom.use_weapon(src, user, click_params)
if (!.)
Expand Down
6 changes: 6 additions & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@
return TRUE
return FALSE


/obj/item/update_icon()
..()
update_twohanding()


/obj/item/ex_act(severity)
..()
if (get_max_health())
Expand Down
2 changes: 0 additions & 2 deletions code/game/objects/items/devices/oxycandle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
STOP_PROCESSING(SSprocessing, src)
on = 2
update_icon()
update_held_icon()
SetName("burnt oxygen candle")
desc += "This tube has exhausted its chemicals."
return
Expand Down Expand Up @@ -79,7 +78,6 @@
icon_state = "oxycandle"
item_state = icon_state
set_light(0)
update_held_icon()

/obj/item/device/oxycandle/Destroy()
QDEL_NULL(air_contents)
Expand Down
1 change: 0 additions & 1 deletion code/game/objects/items/devices/paint_sprayer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
/obj/item/device/paint_sprayer/on_update_icon()
ClearOverlays()
AddOverlays(overlay_image(icon, "paint_sprayer_color", paint_color))
update_held_icon()

/obj/item/device/paint_sprayer/get_mob_overlay(mob/user_mob, slot, bodypart)
var/image/ret = ..()
Expand Down
1 change: 0 additions & 1 deletion code/game/objects/items/weapons/defib.dm
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@
else
wielded = 0
SetName(initial(name))
update_icon()
..()

/obj/item/shockpaddles/on_update_icon()
Expand Down
1 change: 0 additions & 1 deletion code/game/objects/items/weapons/material/twohanded.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
else
wielded = 0
force = force_unwielded
update_icon()
..()

/obj/item/material/twohanded/update_force()
Expand Down
1 change: 0 additions & 1 deletion code/game/objects/items/weapons/swords_axes_etc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
add_fingerprint(user)
update_icon()
update_held_icon()

/obj/item/melee/telebaton/on_update_icon()
if(on)
Expand Down
8 changes: 0 additions & 8 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,6 @@
if(scope_zoom)
verbs += /obj/item/gun/proc/scope

/obj/item/gun/update_twohanding()
if(one_hand_penalty)
update_icon() // In case item_state is set somewhere else.
..()

/obj/item/gun/on_update_icon()
var/mob/living/M = loc
ClearOverlays()
Expand Down Expand Up @@ -234,11 +229,8 @@
else
Fire(target, user, pointblank = TRUE)
return TRUE

// Point blank shooting
if (user.a_intent == I_HURT && !user.isEquipped(target))
if (safety()) // Pistol whip instead of unsafety+fire
return ..()
Fire(target, user, pointblank = TRUE)
return TRUE

Expand Down
1 change: 0 additions & 1 deletion code/modules/projectiles/guns/energy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
icon_state = "[modifystate][ratio]"
else
icon_state = "[initial(icon_state)][ratio]"
update_held_icon()

/obj/item/gun/energy/handle_post_fire(mob/user, atom/target, pointblank, reflex, obj/projectile)
..()
Expand Down
2 changes: 0 additions & 2 deletions code/modules/projectiles/guns/launcher/pneumatic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@
icon_state = "pneumatic"
item_state = "pneumatic"

update_held_icon()

/obj/item/gun/launcher/pneumatic/small
name = "small pneumatic cannon"
desc = "It looks smaller than your garden variety cannon."
Expand Down
5 changes: 5 additions & 0 deletions html/changelogs/AutoChangeLog-sierra-pr-2660.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
author: PurplePineapple
changes:
- {bugfix: Clicking a victim with an item on disarm intent calls use_weapon(). Disarm
intent/Dislocation combat for melee works again.}
delete-after: true
5 changes: 5 additions & 0 deletions html/changelogs/AutoChangeLog-sierra-pr-2894.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
author: Lexanx
changes:
- {tweak: Изменена форма снабжения 32}
- {rscadd: Добавил зарядник боргов на ГУП}
delete-after: true
7 changes: 0 additions & 7 deletions maps/sierra/datums/reports/deck.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
add_field(/datum/report_field/date, "Дата заполнения")
add_field(/datum/report_field/time, "Время заполнения")
add_field(/datum/report_field/simple_text, "Название шаттла", required = 1)
add_field(/datum/report_field/text_label/instruction, "Следующий пункт рекомендуется заполнить в порядке посещения пунктов назначения.")
add_field(/datum/report_field/pencode_text, "Пункт(ы) Назначения", required = 1)
add_field(/datum/report_field/simple_text, "Место Дислокации", required = 1)
add_field(/datum/report_field/simple_text, "Причина вылета", required = 1)
add_field(/datum/report_field/text_label, "Предполетная подготовка")
add_field(/datum/report_field/options/yes_no, "Корпус левой стороны без повреждений?", required = 1)
add_field(/datum/report_field/options/yes_no, "Корпус правой стороны без повреждений?", required = 1)
Expand All @@ -31,9 +27,6 @@
add_field(/datum/report_field/options/yes_no, "Давление в канистре воздушных шлюзов больше 200kPa?", required = 1)
add_field(/datum/report_field/options/yes_no, "Набор первой помощи на борту?", required = 1)
add_field(/datum/report_field/options/yes_no, "Набор инструментов на борту?", required = 1)
add_field(/datum/report_field/options/yes_no, "Скафандры для членов экспедиции на борту?", required = 1)
add_field(/datum/report_field/options/yes_no, "Другая необходимая экипировка на борту?", required = 1)
add_field(/datum/report_field/options/yes_no, "Все члены экспедиции на борту?", required = 1)
add_field(/datum/report_field/options/yes_no, "Герметичность шлюзов с обеих сторон?", required = 1)
permission_fields += add_field(/datum/report_field/options/yes_no, "Разрешение на вылет из ангара?", required = 1)
permission_fields += add_field(/datum/report_field/signature, "Для разрешения на вылет, поставьте подпись либо печать здесь", required = 1)
Expand Down
4 changes: 1 addition & 3 deletions maps/sierra/z1-z5_sierra.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -20211,16 +20211,14 @@
/turf/simulated/floor/grass/cut,
/area/crew_quarters/garden_room)
"cYd" = (
/obj/structure/bed/chair/shuttle/blue{
dir = 4
},
/obj/machinery/atmospherics/pipe/simple/visible/universal,
/obj/machinery/firealarm{
pixel_y = 24
},
/obj/machinery/light{
dir = 8
},
/obj/machinery/recharge_station,
/turf/simulated/floor/tiled/steel_ridged,
/area/guppy_hangar/start)
"cYe" = (
Expand Down
2 changes: 1 addition & 1 deletion test/check-paths.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ exactly 2 "<< uses" '(?<!<)<<(?!<)' -P
exactly 2 ">> uses" '(?<!>)>>(?!>)' -P
exactly 0 "incorrect indentations" '^( {4,})' -P
exactly 25 "text2path uses" 'text2path'
exactly 4 "update_icon() override" '/update_icon\((.*)\)' -P
exactly 5 "update_icon() override" '/update_icon\((.*)\)' -P
exactly 4 "goto use" 'goto '
exactly 1 "NOOP match" 'NOOP'
exactly 332 "spawn uses" '^\s*spawn\s*\(\s*(-\s*)?\d*\s*\)' -P
Expand Down

0 comments on commit 18d14b4

Please sign in to comment.