Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vehicle combat 2: electric boogaloo #496

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__HELPERS/icon_smoothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@
/atom
var/icon_type_smooth
var/junction
var/bypass_interactions = FALSE

/atom/proc/recalculate_junction()
junction = 0
Expand Down
6 changes: 6 additions & 0 deletions code/_onclick/drag_drop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@
var/obj/item/h = get_active_held_item()
if(h)
. = h.CanItemAutoclick(object, location, params)
if(istype(loc, /obj/mecha))
var/obj/mecha/piloting = loc
if(piloting.selected && istype(piloting.selected, /obj/item/mecha_parts/mecha_equipment/weapon))
var/obj/item/mecha_parts/mecha_equipment/weapon/selectedweapon = piloting.selected
. = selectedweapon.is_automatic


/mob/proc/canMobMousedown(atom/object, location, params)

Expand Down
22 changes: 15 additions & 7 deletions code/controllers/subsystem/jukeboxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ SUBSYSTEM_DEF(jukeboxes)
var/area/currentarea = get_area(jukebox)
var/turf/currentturf = get_turf(jukebox)
var/list/hearerscache = hearers(7, jukebox)
var/turf/currentturfabove = SSmapping.get_turf_above(currentturf)
if(istype(currentturf, /turf/open/transparent/openspace))
var/turf/belowturf = SSmapping.get_turf_below(currentturf)
hearerscache += hearers(7, belowturf)
if(istype(currentturfabove, /turf/open/transparent/openspace))
hearerscache += hearers(7, currentturfabove)
if(!isturf(jukebox.loc))
hearerscache += hearers(7, jukebox.loc)

song_played.falloff = jukeinfo[4]

Expand All @@ -108,16 +116,16 @@ SUBSYSTEM_DEF(jukeboxes)
continue

var/inrange = FALSE
if(jukebox.z == M.z) //todo - expand this to work with mining planet z-levels when robust jukebox audio gets merged to master
song_played.status = SOUND_UPDATE
if(get_area(M) == currentarea)
inrange = TRUE
else if(M in hearerscache)
inrange = TRUE
//if(jukebox.z == M.z) //todo - expand this to work with mining planet z-levels when robust jukebox audio gets merged to master
song_played.status = SOUND_UPDATE
if(get_area(M) == currentarea)
inrange = TRUE
else if(M in hearerscache)
inrange = TRUE
else
song_played.status = SOUND_MUTE | SOUND_UPDATE //Setting volume = 0 doesn't let the sound properties update at all, which is lame.

M.playsound_local(currentturf, null, 100, channel = jukeinfo[2], S = song_played, envwet = (inrange ? -250 : 0), envdry = (inrange ? 0 : -10000))
M.playsound_local(M, null, 100, channel = jukeinfo[2], S = song_played, envwet = (inrange ? -250 : 0), envdry = (inrange ? 0 : -10000))
CHECK_TICK
return
//BIG IRON EDIT start
Expand Down
8 changes: 7 additions & 1 deletion code/controllers/subsystem/throwing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ SUBSYSTEM_DEF(throwing)
if (dist_travelled && hitcheck()) //to catch sneaky things moving on our tile while we slept
finalize()
return

var/turf/starting_turf = get_turf(AM)
if(AM.z < target_turf.z)
var/turf/new_turf = SSmapping.get_turf_above(starting_turf)
AM.forceMove(new_turf)
if(starting_turf.z > target_turf.z)
var/turf/new_turf = SSmapping.get_turf_below(starting_turf)
AM.forceMove(new_turf)
var/atom/step

last_move = world.time
Expand Down
12 changes: 12 additions & 0 deletions code/datums/components/crafting/recipes/recipes_carparts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@
category = CAT_CARPARTS
subcategory = CAT_CAREQUIP

/datum/crafting_recipe/carpart/stereo
name = "Mounted Stereo"
result = /obj/item/mecha_parts/mecha_equipment/stereo
reqs = list(/obj/item/stack/sheet/metal = 5,
/obj/item/stack/crafting/metalparts = 10,
/obj/item/circuitboard/machine/jukebox = 1,
/obj/item/stack/rods = 5)
tools = list(TOOL_WORKBENCH)
time = 90
category = CAT_CARPARTS
subcategory = CAT_CAREQUIP

/datum/crafting_recipe/carpart/Car_engine
name = "Car Engine"
result = /obj/item/mecha_parts/part/Car_engine
Expand Down
11 changes: 11 additions & 0 deletions code/datums/components/crafting/recipes/recipes_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,14 @@
/obj/item/stack/rods = 2)
category = CAT_CRAFTING
subcategory = CAT_TOOL

/datum/crafting_recipe/cellupgrade
name = "High cell to Ultra cell convertion"
result = /obj/item/stock_parts/cell/bluespace
time = 80
reqs = list(/obj/item/stock_parts/cell/high = 4,
/obj/item/stack/cable_coil = 10,
/obj/item/toy/crayon/spraycan = 1)
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
category = CAT_CRAFTING
subcategory = CAT_TOOL
193 changes: 193 additions & 0 deletions code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,199 @@
category = CAT_WEAPONRY
subcategory = CAT_WEAPON

/datum/crafting_recipe/gun/InmolatorCannon
name = "CH-PS \"Immolator\" laser"
result = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
reqs = list(/obj/item/stack/crafting/metalparts = 10,
/obj/item/stack/crafting/electronicparts = 10,
/obj/item/stack/sheet/metal = 15,
/obj/item/advanced_crafting_components/lenses = 1,
/obj/item/advanced_crafting_components/conductors = 1)
tools = list(TOOL_WORKBENCH)
time = 180
category = CAT_WEAPONRY
subcategory = CAT_WEAPON

/datum/crafting_recipe/gun/SolarisCannon
name = "CH-PS \"Immolator\" laser"
result = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy
reqs = list(/obj/item/stack/crafting/metalparts = 10,
/obj/item/stack/crafting/electronicparts = 10,
/obj/item/stack/crafting/goodparts = 10,
/obj/item/stack/sheet/mineral/titanium = 5,
/obj/item/advanced_crafting_components/lenses = 1,
/obj/item/advanced_crafting_components/conductors = 2,
/obj/item/advanced_crafting_components/flux = 1)
tools = list(TOOL_WORKBENCH)
time = 180
category = CAT_WEAPONRY
subcategory = CAT_WEAPON

/datum/crafting_recipe/gun/CarbineVehicle
name = "FNX-99 \"Hades\" Carbine"
result = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine
reqs = list(/obj/item/stack/crafting/metalparts = 5,
/obj/item/stack/sheet/metal = 10,
/obj/item/stack/rods = 2,
/obj/item/advanced_crafting_components/assembly = 1,
/datum/reagent/fuel = 50)
tools = list(TOOL_WORKBENCH)
time = 180
category = CAT_WEAPONRY
subcategory = CAT_WEAPON

/datum/crafting_recipe/gun/Scattershot
name = "LBX AC 10 \"Scattershot\""
result = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot
reqs = list(/obj/item/stack/crafting/metalparts = 10,
/obj/item/stack/crafting/goodparts = 5,
/obj/item/stack/sheet/metal = 15,
/obj/item/stack/rods = 4,
/obj/item/advanced_crafting_components/assembly = 1,)
tools = list(TOOL_WORKBENCH)
time = 180
category = CAT_WEAPONRY
subcategory = CAT_WEAPON

/datum/crafting_recipe/gun/minigunVehicle
name = "Minigun"
result = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/minigun
reqs = list(/obj/item/stack/crafting/metalparts = 10,
/obj/item/stack/crafting/goodparts = 5,
/obj/item/stack/crafting/electronicparts = 5,
/obj/item/stack/sheet/metal = 10,
/obj/item/stack/sheet/mineral/titanium = 20,
/obj/item/stack/rods = 6,
/obj/item/advanced_crafting_components/assembly = 1,
/obj/item/advanced_crafting_components/receiver = 1,
/obj/item/advanced_crafting_components/alloys = 1)
tools = list(TOOL_WORKBENCH)
time = 180
category = CAT_WEAPONRY
subcategory = CAT_WEAPON

/datum/crafting_recipe/gun/PheumonicLauncherVehicle
name = "Mounted Pheumonic launcher"
result = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/anykind
reqs = list(/obj/item/stack/crafting/metalparts = 20,
/obj/item/stack/crafting/goodparts = 10,
/obj/item/stack/crafting/electronicparts = 5,
/obj/item/stack/sheet/metal = 30,
/obj/item/stack/sheet/mineral/titanium = 20,
/obj/item/stack/rods = 8,
/obj/item/advanced_crafting_components/assembly = 1,
/obj/item/advanced_crafting_components/receiver = 1)
tools = list(TOOL_WORKBENCH)
time = 180
category = CAT_WEAPONRY
subcategory = CAT_WEAPON

/datum/crafting_recipe/gun/Missile_rack
name = "SRM-8 missile rack"
result = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
reqs = list(/obj/item/stack/crafting/metalparts = 20,
/obj/item/stack/crafting/goodparts = 20,
/obj/item/stack/crafting/electronicparts = 10,
/obj/item/stack/sheet/mineral/titanium = 50,
/obj/item/stack/rods = 8,
/obj/item/advanced_crafting_components/alloys = 1)
tools = list(TOOL_WORKBENCH)
time = 180
category = CAT_WEAPONRY
subcategory = CAT_WEAPON

/datum/crafting_recipe/gun/Breach_missile_rack
name = "BRM-6 missile rack"
result = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/breaching
reqs = list(/obj/item/stack/crafting/metalparts = 20,
/obj/item/stack/crafting/goodparts = 20,
/obj/item/stack/crafting/electronicparts = 10,
/obj/item/stack/sheet/mineral/titanium = 40,
/obj/item/stack/rods = 6,
/obj/item/advanced_crafting_components/alloys = 1)
tools = list(TOOL_WORKBENCH)
time = 180
category = CAT_WEAPONRY
subcategory = CAT_WEAPON

/datum/crafting_recipe/mech_ammo/scattershot
name = "Scattershot ammo pack"
result = /obj/item/mecha_ammo/scattershot
reqs = list(/obj/item/ammo_box/shotgun/buck = 4,
/obj/item/stack/crafting/metalparts = 5,
/obj/item/stack/crafting/powder = 10)
tools = list(TOOL_WORKBENCH)
time = 180
category = CAT_WEAPONRY
subcategory = CAT_AMMO

/datum/crafting_recipe/mech_ammo/carbine
name = "Hades ammo pack"
result = /obj/item/mecha_ammo/incendiary
reqs = list(/obj/item/ammo_box/a762box = 1,
/datum/reagent/fuel = 40,
/obj/item/stack/crafting/powder = 10)
tools = list(TOOL_WORKBENCH)
time = 180
category = CAT_WEAPONRY
subcategory = CAT_AMMO

/datum/crafting_recipe/mech_ammo/srm8_missiles
name = "SRM-8 missile pack"
result = /obj/item/mecha_ammo/missiles_he
reqs = list(/obj/item/ammo_casing/caseless/rocket = 3,
/obj/item/stack/sheet/metal = 10,
/obj/item/assembly/timer = 4)
tools = list(TOOL_WORKBENCH)
time = 180
category = CAT_WEAPONRY
subcategory = CAT_AMMO

/datum/crafting_recipe/mech_ammo/brm8_missiles
name = "BRM-8 missile pack"
result = /obj/item/mecha_ammo/missiles_br
reqs = list(/obj/item/ammo_casing/caseless/rocket = 4,
/obj/item/stack/sheet/mineral/titanium = 20,
/obj/item/stack/crafting/powder = 10)
tools = list(TOOL_WORKBENCH)
time = 180
category = CAT_WEAPONRY
subcategory = CAT_AMMO

/datum/crafting_recipe/mech_ammo/minigun_ammo
name = "Minigun Ammo Pack"
result = /obj/item/mecha_ammo/minigun
reqs = list(/obj/item/ammo_box/magazine/ammobelt/m1919 = 3,
/obj/item/stack/sheet/metal = 10,
/obj/item/stack/sheet/mineral/titanium = 20,
/obj/item/stack/crafting/powder = 30)
tools = list(TOOL_WORKBENCH)
time = 180
category = CAT_WEAPONRY
subcategory = CAT_AMMO

/datum/crafting_recipe/mech_ammo/antoproj_armor
name = "armor booster module (Ranged Weaponry)"
result = /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster
reqs = list(/obj/item/shield/riot/tower = 2,
/obj/item/stack/cable_coil = 5,
/obj/item/stack/sheet/mineral/titanium = 20)
tools = list(TOOL_WELDER)
time = 180
category = CAT_CARPARTS
subcategory = CAT_CAREQUIP

/datum/crafting_recipe/mech_ammo/antomelee_armor
name = "armor booster module (Melee Weaponry)"
result = /obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster
reqs = list(/obj/item/shield/riot/tower = 2,
/obj/item/stack/cable_coil = 5,
/obj/item/stack/sheet/mineral/titanium = 20)
tools = list(TOOL_WELDER)
time = 180
category = CAT_CARPARTS
subcategory = CAT_CAREQUIP

/datum/crafting_recipe/gun/HMGvehicule
name = "Improvised HMG (for vehicules)"
result = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg/hobo
Expand Down
10 changes: 6 additions & 4 deletions code/game/mecha/combat/phazon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
strafing_action.Remove(user)
zoom_action.Remove(user)
eject_action.Remove(user)
landing_action.Grant(user)
landing_action.Remove(user)
//rotorup_action.Remove(user)
//rotordown_action.Remove(user)

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

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

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

Expand Down Expand Up @@ -401,6 +401,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 @@ -413,6 +414,7 @@
zoom_action.Remove(user)
eject_action.Remove(user)
smoke_action.Remove(user)
landing_action.Remove(user, src)
//rotorup_action.Remove(user)
//rotordown_action.Remove(user)

Expand Down
Loading
Loading