Skip to content

Commit

Permalink
Fix auto deployment having wrong sentry range
Browse files Browse the repository at this point in the history
  • Loading branch information
Drulikar committed Jun 2, 2024
1 parent 857d745 commit 0389ccc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion code/game/gamemodes/colonialmarines/colonialmarines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@

///Spawns a droppod with a temporary defense sentry at the given turf
/datum/game_mode/colonialmarines/proc/spawn_lz_sentry(turf/target, list/structures_to_break)
var/obj/structure/droppod/equipment/droppod = new(target, /obj/structure/machinery/sentry_holder/landing_zone)
var/obj/structure/droppod/equipment/sentry_holder/droppod = new(target, /obj/structure/machinery/sentry_holder/landing_zone)
droppod.special_structures_to_damage = structures_to_break
droppod.special_structure_damage = 500
droppod.drop_time = 5 SECONDS
Expand Down
21 changes: 16 additions & 5 deletions code/modules/cm_tech/droppod/equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,22 @@
equipment_to_spawn.forceMove(loc)

/obj/structure/droppod/equipment/sentry/spawn_equipment(equipment, mob/M)
var/obj/structure/machinery/defenses/sentry/S = ..()
S.owner_mob = M
return S
var/obj/structure/machinery/defenses/sentry/sentry = ..()
sentry.owner_mob = M
return sentry

/obj/structure/droppod/equipment/sentry/move_equipment()
..()
var/obj/structure/machinery/defenses/sentry/S = equipment_to_spawn
S.power_on()
var/obj/structure/machinery/defenses/sentry/sentry = equipment_to_spawn
sentry.power_on()

/obj/structure/droppod/equipment/sentry_holder/spawn_equipment(equipment, mob/M)
var/obj/structure/machinery/sentry_holder/holder = ..()
var/obj/structure/machinery/defenses/sentry/sentry = holder.deployed_turret
sentry.owner_mob = M
return holder

/obj/structure/droppod/equipment/sentry_holder/move_equipment()
..()
var/obj/structure/machinery/sentry_holder/holder = equipment_to_spawn
holder.deploy_sentry()

0 comments on commit 0389ccc

Please sign in to comment.