Skip to content

Commit

Permalink
Merge pull request #137 from Kmc2000/Performance
Browse files Browse the repository at this point in the history
Performance + Map prettification
  • Loading branch information
Kmc2000 committed Nov 20, 2019
2 parents f7a4b44 + 4a4aa8d commit bfbec34
Show file tree
Hide file tree
Showing 30 changed files with 7,090 additions and 4,844 deletions.
11,498 changes: 6,723 additions & 4,775 deletions _maps/map_files/Hammerhead/Hammerhead.dmm

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
#define FIRE_PRIORITY_OBJ 40
#define FIRE_PRIORITY_ACID 40
#define FIRE_PRIOTITY_BURNING 40
#define FIRE_PRIORITY_OVERMAP 40 //NSV13 - Overmap SS.
#define FIRE_PRIORITY_DEFAULT 50
#define FIRE_PRIORITY_PARALLAX 65
#define FIRE_PRIORITY_MOBS 100
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/firealarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
last_alarm = world.time
var/area/A = get_area(src)
A.firealert(src)
playsound(loc, 'goon/sound/machinery/FireAlarm.ogg', 75)
playsound(loc, 'nsv13/sound/effects/computer/alarm.ogg', 100)//NSV13 - Fire alarm sound change.
if(user)
log_game("[user] triggered a fire alarm at [COORD(src)]")

Expand Down Expand Up @@ -260,7 +260,7 @@

/obj/machinery/firealarm/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
if((buildstage == 0) && (the_rcd.upgrade & RCD_UPGRADE_SIMPLE_CIRCUITS))
return list("mode" = RCD_UPGRADE_SIMPLE_CIRCUITS, "delay" = 20, "cost" = 1)
return list("mode" = RCD_UPGRADE_SIMPLE_CIRCUITS, "delay" = 20, "cost" = 1)
return FALSE

/obj/machinery/firealarm/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
Expand Down
1 change: 1 addition & 0 deletions nsv13.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2895,6 +2895,7 @@
#include "nsv13\code\_onclick\hud\ai.dm"
#include "nsv13\code\_onclick\hud\parallax.dm"
#include "nsv13\code\controllers\configuration\entries\game_options.dm"
#include "nsv13\code\controllers\subsystem\processing\overmap.dm"
#include "nsv13\code\datums\holocall.dm"
#include "nsv13\code\datums\shuttles.dm"
#include "nsv13\code\datums\ai_laws\laws.dm"
Expand Down
7 changes: 7 additions & 0 deletions nsv13/code/controllers/subsystem/processing/overmap.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//Fires five times every second.

PROCESSING_SUBSYSTEM_DEF(overmap)
name = "Overmap Processing"
wait = 2
stat_tag = "OP"
priority = FIRE_PRIORITY_OVERMAP
15 changes: 7 additions & 8 deletions nsv13/code/modules/munitions/munitions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@
icon_state = "highvelocity"
desc = "A small torpedo which is fitted with an advanced propulsion system, allowing it to rapidly travel long distances. Due to its smaller frame however, it packs less of a punch."
torpedo_type = /obj/item/projectile/bullet/torpedo/fast
speed = 3

/obj/structure/munition/decoy //A dud missile designed to exhaust flak
name = "NTP-0x 'DCY' 530mm electronic countermeasure"
icon = 'nsv13/icons/obj/munition_types.dmi'
icon_state = "decoy"
desc = "A simple electronic countermeasure packed inside a standard torpedo casing. This model excels at diverting enemy PDC emplacements away from friendly ships, or even another barrage of missiles."
torpedo_type = /obj/item/projectile/bullet/torpedo/decoy
speed = 2

/obj/structure/munition/nuke //The alpha torpedo
name = "NTNK 'Oncoming Storm' 700mm thermonuclear warhead"
Expand Down Expand Up @@ -247,6 +249,7 @@
icon_state = "munitions_console"
density = TRUE
anchored = TRUE
req_access = list(ACCESS_MUNITIONS)
var/obj/structure/ship_weapon/railgun //The one we're firing

/obj/machinery/computer/ship/munitions_computer/Initialize()
Expand Down Expand Up @@ -364,12 +367,7 @@
/obj/structure/ship_weapon/proc/fire()
if(!can_fire())
return
var/proj_type
if(istype(chambered, /obj/structure/munition))
proj_type = chambered.torpedo_type
if(istype(chambered, /obj/item/twohanded/required/railgun_ammo))
var/obj/item/twohanded/required/railgun_ammo/RA = chambered
proj_type = RA.proj_type
var/atom/projectile = null
if(maint_req <= 0)
weapon_malfunction()
return
Expand All @@ -381,13 +379,14 @@
if(M.stat == DEAD || !isliving(M))
continue
M.soundbang_act(1,200,10,15)
projectile = new chambered.type() //Dummy munition in nullspace so we can get its attributes for the ship to fire it.
qdel(chambered)
chambered = null
state = STATE_NOTLOADED
maint_req --
after_fire()
if(proj_type) //Looks like we were able to fire a projectile, let's tell the ship what kind of bullet to shoot.
return proj_type
if(projectile) //Looks like we were able to fire a projectile, let's tell the ship what kind of bullet to shoot.
return projectile

/obj/structure/ship_weapon/proc/after_fire()
return
Expand Down
1 change: 1 addition & 0 deletions nsv13/code/modules/overmap/ai_interiors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
return TRUE

/obj/structure/overmap/Destroy()
STOP_PROCESSING(SSovermap, src)
GLOB.overmap_objects -= src
relay('nsv13/sound/effects/ship/damage/ship_explode.ogg')
animate(src, alpha = 0,time = 20) //Ship fades to black
Expand Down
8 changes: 5 additions & 3 deletions nsv13/code/modules/overmap/camera.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
LAZYREMOVE(M.mousemove_intercept_objects, src)
if(M.click_intercept == src)
M.click_intercept = null
if(M == pilot)
if(pilot && M == pilot)
pilot = null
if(helm)
playsound(helm, 'nsv13/sound/effects/computer/hum.ogg', 100, 1)
if(M == gunner)
if(gunner && M == gunner)
if(tactical)
playsound(tactical, 'nsv13/sound/effects/computer/hum.ogg', 100, 1)
gunner = null
Expand All @@ -55,7 +55,6 @@
M.overmap_ship = null
M.cancel_camera()
M.remote_control = null
return TRUE

/obj/structure/overmap/proc/CreateEye(mob/user)
if(!user.client)
Expand Down Expand Up @@ -92,6 +91,9 @@
/datum/action/innate/camera_off/overmap/Activate()
if(!target || !isliving(target))
return
if(!remote_eye.origin)
qdel(src)
qdel(remote_eye)
var/obj/structure/overmap/ship = remote_eye.origin
if(ship.stop_piloting(target))
qdel(remote_eye)
Expand Down
Loading

0 comments on commit bfbec34

Please sign in to comment.