Skip to content

Commit

Permalink
Reverts the changes made for Vertibird testing and bug (#370)
Browse files Browse the repository at this point in the history
* Oasised Kebab + Church

Its like PR 303, But with a church change.

* Update Pahrump-Above-3.dmm

* Update Pahrump-Surface-2.dmm

* Update Pahrump-Surface-2.dmm

* Update Pahrump-Surface-2.dmm

* The updated town

* Update Church secret Lab

Removed the scrubbers

* Added 2 office (One Ambassy type, one private eye)

* Lil Fixes !

Fixes the bar jukebox, the door in the mechant house,  Stairs to the coloseum, the sniper decoration moved, replaced a Autolath with a manuel one (but moved the actua autolath

* Adding some lil oopsy fixes

Somethings I forgot.

* Removes. CATS. (Except Pixy)

Cat were MULTIPLYING

* Update Pahrump-Surface-2.dmm

* Reverts the changes made for Vertibird testing and bug

* working ups and down

* f

* Revert "Merge branch 'master' into Up-down-fucks-you-up"

This reverts commit ea57595, reversing
changes made to 3c60aad.

* fix ghost up

* can't fly on the ground

* vertibirds gets an action to go up and down, no mob movement inside mecha

---------

Co-authored-by: xTrainx <[email protected]>
  • Loading branch information
DeltaDav and xTrainx authored Apr 8, 2024
1 parent f793246 commit c36ce8e
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 5 deletions.
19 changes: 19 additions & 0 deletions code/game/mecha/combat/phazon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
movement_type = FLYING
stepsound = 'sound/f13machines/vertibird_loop.ogg'
turnsound = 'sound/f13machines/vertibird_loop.ogg'
on_the_air = TRUE

/obj/structure/mecha_wreckage/vertibird
name = "\improper Vertibird Wreck"
Expand All @@ -75,6 +76,7 @@
strafing_action.Grant(user, src)
zoom_action.Grant(user, src)
eject_action.Grant(user, src)
landing_action.Grant(user, src)
//rotorup_action.Grant(user, src)
//rotordown_action.Grant(user, src)

Expand All @@ -86,6 +88,7 @@
strafing_action.Remove(user)
zoom_action.Remove(user)
eject_action.Remove(user)
landing_action.Grant(user)
//rotorup_action.Remove(user)
//rotordown_action.Remove(user)

Expand All @@ -103,6 +106,8 @@

/obj/mecha/combat/phazon/vertibird/loaded/Initialize()
. = ..()
if(z != 5)
on_the_air = FALSE
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/seat
Expand All @@ -115,6 +120,14 @@
ME.attach(src)
max_ammo()

/obj/mecha/combat/phazon/vertibird/domove(direction)
if(z != 5)
if(world.time - last_message > 20)
occupant_message("Unable to move while landed.")
last_message = world.time
return 0
. = ..()

///NCR VERTIBIRD

/obj/mecha/combat/phazon/vertibird/ncr
Expand Down Expand Up @@ -155,6 +168,7 @@
zoom_action.Grant(user, src)
eject_action.Grant(user, src)
smoke_action.Grant(user, src)
landing_action.Grant(user, src)
//rotorup_action.Grant(user, src)
//rotordown_action.Grant(user, src)

Expand All @@ -167,6 +181,7 @@
zoom_action.Remove(user)
eject_action.Remove(user)
smoke_action.Remove(user)
landing_action.Grant(user)
//rotorup_action.Remove(user)
//rotordown_action.Remove(user)

Expand Down Expand Up @@ -235,6 +250,7 @@
strafing_action.Grant(user, src)
zoom_action.Grant(user, src)
eject_action.Grant(user, src)
landing_action.Grant(user, src)
//rotorup_action.Grant(user, src)
//rotordown_action.Grant(user, src)

Expand All @@ -246,6 +262,7 @@
strafing_action.Remove(user)
zoom_action.Remove(user)
eject_action.Remove(user)
landing_action.Grant(user)
//rotorup_action.Remove(user)
//rotordown_action.Remove(user)

Expand Down Expand Up @@ -308,6 +325,7 @@
strafing_action.Grant(user, src)
zoom_action.Grant(user, src)
eject_action.Grant(user, src)
landing_action.Grant(user, src)
//rotorup_action.Grant(user, src)
//rotordown_action.Grant(user, src)

Expand All @@ -319,6 +337,7 @@
strafing_action.Remove(user)
zoom_action.Remove(user)
eject_action.Remove(user)
landing_action.Grant(user)
//rotorup_action.Remove(user)
//rotordown_action.Remove(user)

Expand Down
20 changes: 20 additions & 0 deletions code/game/mecha/mecha.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
var/datum/action/innate/mecha/strafe/strafing_action = new
var/datum/action/innate/mecha/klaxon/klaxon_action = new
var/datum/action/innate/mecha/sirens/sirens_action = new
var/datum/action/innate/mecha/Landing/landing_action = new


//Action vars
Expand All @@ -145,6 +146,7 @@

var/occupant_sight_flags = 0 //sight flags to give to the occupant (e.g. mech mining scanner gives meson-like vision)
var/mouse_pointer
var/on_the_air = FALSE

hud_possible = list (DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD, DIAG_TRACK_HUD)

Expand Down Expand Up @@ -1027,6 +1029,24 @@
L.client.change_view(CONFIG_GET(string/default_view))
zoom_mode = 0

/obj/mecha/proc/canZMove(dir, turf/target)
return can_zTravel(target, dir) && (movement_type & FLYING)

/obj/mecha/proc/zMove(dir, feedback = FALSE)
if(dir != UP && dir != DOWN)
return FALSE
var/turf/target = get_step_multiz(src, dir)
if(!target)
if(feedback)
to_chat(src, "<span class='warning'>There's nothing in that direction!</span>")
return FALSE
if(!canZMove(dir, target))
if(feedback)
to_chat(src, "<span class='warning'>You couldn't move there!</span>")
return FALSE
forceMove(target)
return TRUE

/////////////////////////
////// Access stuff /////
/////////////////////////
Expand Down
34 changes: 33 additions & 1 deletion code/game/mecha/mecha_actions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -298,5 +298,37 @@
/datum/action/innate/mecha/sirens/Activate()
playsound(chassis,'sound/f13machines/police.ogg', 50, 1)


/datum/action/innate/mecha/Landing
name = "Land"
button_icon_state = "mech_thrusters_on"

/datum/action/innate/mecha/Landing/Activate()
if(chassis.on_the_air)
var/turf/target = get_step_multiz(chassis, DOWN)
if(!chassis.canZMove(DOWN, target))
chassis.occupant_message("You can't Move in that Direction!")
return
chassis.occupant_message("deploying gear and landing")
if(!do_after(chassis.occupant, 15, target = chassis))
return
chassis.zMove(DOWN, TRUE)
chassis.occupant_message("you hit the ground with the [src]'s rubber tires")
name = "Take Off"
button_icon_state = "mech_thrusters_off"
UpdateButtonIcon()
chassis.on_the_air = FALSE
else
var/turf/target = get_step_multiz(chassis, UP)
if(!chassis.canZMove(UP, target))
chassis.occupant_message("You can't Move in that Direction!")
return
chassis.occupant_message("starting rotors")
if(!do_after(chassis.occupant, 15, target = chassis))
return
chassis.zMove(UP, TRUE)
chassis.occupant_message("taking off!")
name = "Land"
button_icon_state = "mech_thrusters_on"
UpdateButtonIcon()
chassis.on_the_air = TRUE

20 changes: 16 additions & 4 deletions code/modules/mob/mob_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -419,18 +419,31 @@
layer -= MOB_LAYER_SHIFT_INCREMENT
var/layer_priority = (layer - MOB_LAYER) * 100 // Just for text feedback
to_chat(src, span_notice("Your layer priority is now [layer_priority]."))

/mob/verb/up()
set name = "Move Upwards"
set category = "IC"

var/turf/current_turf = get_turf(src)
var/turf/above_turf = SSmapping.get_turf_above(current_turf)

if(!above_turf)
to_chat(src, span_warning("There's nowhere to go in that direction!"))
return
if(can_zFall(above_turf, target = current_turf, direction = DOWN )) //Will we fall down if we go up?
if(buckled)
to_chat(src, span_warning("[buckled] is is not capable of flight."))
else
to_chat(src, span_warning("You are not Superman."))
return

if(zMove(UP, TRUE))
to_chat(src, "<span class='notice'>You move upwards.</span>")
to_chat(src, span_notice("You move upwards."))

/mob/verb/down()
set name = "Move Down"
set category = "IC"

if(zMove(DOWN, TRUE))
to_chat(src, "<span class='notice'>You move down.</span>")

Expand All @@ -449,6 +462,5 @@
forceMove(target)
return TRUE


/mob/proc/canZMove(direction, turf/target)
return FALSE

0 comments on commit c36ce8e

Please sign in to comment.