fixes some bugs (#6679)

- syringes & blood
- turrets
- a cargo voucher
This commit is contained in:
silicons
2024-08-29 23:12:29 -06:00
committed by GitHub
parent dd97a3d46a
commit d00b4e66bb
6 changed files with 20 additions and 10 deletions
+1
View File
@@ -35,6 +35,7 @@
// - item use & receive item use (item_interaction() on /atom, definiteily)
// - tool use & receive tool use (we already have tool_interaction() on /atom)
// - melee attack & receive melee attack (melee_interaction() on /atom? not melee_act directly?)
// - melee attack shouldn't require attackby() to allow it to, it should be automatic on harm intent (?)
// - the item should have final say but we need a way to allow click redirections so..
if(resolve_attackby(target, user, params, null, .))
return CLICKCHAIN_DO_NOT_PROPAGATE
@@ -35,6 +35,11 @@
set_ticking(idle_retarget_pulse_time)
/datum/ai_holder/turret/tick(cycles)
var/obj/machinery/porta_turret/turret = agent
// check if we should do anything
if(turret.disabled || !turret.enabled)
idle()
return
// first, evaluate
var/found_in_wake_range = continuous_evaluation()
// then,
+4 -3
View File
@@ -441,7 +441,8 @@
else
to_chat(user, "<span class='notice'>Access denied.</span>")
..()
else
return ..()
/obj/machinery/porta_turret/emag_act(remaining_charges, mob/user)
if(!emagged)
@@ -574,7 +575,7 @@
if(assess_perp(L) < 4)
return TURRET_NOT_TARGET //if threat level < 4, keep going
if(L.stat != CONSCIOUS) //if the perp is lying down, it's still a target but a less-important target
if(L.stat != CONSCIOUS && (lethal || emagged)) //if the perp is lying down, it's still a target but a less-important target
return check_down ? TURRET_SECONDARY_TARGET : TURRET_NOT_TARGET
return TURRET_PRIORITY_TARGET //if the perp has passed all previous tests, congrats, it is now a "shoot-me!" nominee
@@ -648,7 +649,7 @@
* @return TRUE on success
*/
/obj/machinery/porta_turret/proc/try_fire_at(atom/target, angle)
if(disabled || is_integrity_broken())
if(disabled || !enabled || is_integrity_broken())
return FALSE
if(is_on_cooldown())
return FALSE
@@ -167,7 +167,7 @@
order.comment = "Voucher redemption"
order.ordered_at = stationdate2text() + " - " + stationtime2text()
order.status = SUP_ORDER_APPROVED //auto approved
order.approved_by = "[src]"
order.approved_by = "[user]"
order.approved_at = stationdate2text() + " - " + stationtime2text()
SSsupply.order_history += order//tell supply the order exists.
@@ -224,7 +224,7 @@
name = "Laser reflector voucher"
desc = "A voucher redeemable, at any NT cargo department, for a single laser reflector."
icon_state = "engineering_voucher"
redeemable_for = new /datum/supply_pack/nanotrasen/engineering/engine/fusion_fuel_compressor
redeemable_for = new /datum/supply_pack/nanotrasen/engineering/reflector
/obj/item/engineering_mystical_tech
name = "XYE"
+7 -4
View File
@@ -492,10 +492,13 @@
if(trajectory_moving_to)
// create tracers
var/datum/point/visual_impact_point = get_intersection_point(trajectory_moving_to)
// kick it forwards a bit
visual_impact_point.shift_in_projectile_angle(angle, 2)
// draw
finalize_hitscan_tracers(visual_impact_point, impact_effect = TRUE)
if(visual_impact_point)
// kick it forwards a bit
visual_impact_point.shift_in_projectile_angle(angle, 2)
// draw
finalize_hitscan_tracers(visual_impact_point, impact_effect = TRUE)
else
finalize_hitscan_tracers(impact_effect = TRUE, kick_forwards = 32)
else
finalize_hitscan_tracers(impact_effect = TRUE, kick_forwards = 32)
@@ -119,7 +119,7 @@
B = T.take_blood(src,amount)
drawing = 0
if (B)
if (B && !(B in reagents.reagent_list))
reagents.reagent_list += B
reagents.update_total()
on_reagent_change()