could you write the core logic in love2d for the following game description? 
In the year 2178, humanity had finally reached the stars. The United Space Colonies (USC) established its first colony on Mars, marking the beginning of a new era of intergalactic exploration and colonization. However, this new frontier came with its own unique challenges. Resources were scarce, and survival was far from guaranteed.

You are the newly appointed Station Manager of the USC’s latest colony, located on a spaceship bound for an interesting destination at the edge of the galaxy. Your job is to oversee the construction and maintenance of the spaceship, ensuring the safety and well-being of the crew. You have been given a budget of 50 million credits to build and upgrade structures, recruit personnel, and manage resources.

As you enter the spaceship, you notice several compartments and rooms scattered throughout. There’s the Life Support Center (LSC), where air, water, and food are processed; the Energy Generator (EG), which powers the entire spaceship; the Medical Bay (MB); and the Crew Quarters (CQ). Each area has a specific function, but they all rely on one another to keep the spaceship running smoothly.

Your primary objective is to construct and upgrade various compartments and systems to meet the needs of the crew during the spaceship’s journey to the interesting destination. Here are some of the key goals you must accomplish:

1. Build additional Living Spaces to accommodate more crew members. This will increase morale and productivity, as well as free up existing quarters for other purposes.
2. Upgrade the Life Support Center to improve resource efficiency and expand the spaceship’s food production capabilities. This will require materials like Oxygen Tanks, Water Purifiers, and Food Processors.
3. Establish a Communication Array to maintain contact with Earth and other spaceships. This will allow for better coordination and support, as well as facilitate trade agreements.
4. Develop an Energy Storage System to ensure a stable power supply during periods of low energy generation or unexpected demand spikes.
5. Construct a Recycling Facility to reduce waste and conserve valuable resources. This can include facilities for composting organic matter, recycling metals, and repurposing old equipment.
6. Hire and train additional staff to handle various roles within the spaceship, such as Engineers, Scientists, Medics, and Administrators. As your team grows, so does the complexity of managing their needs and keeping them happy and motivated.
7. Explore neighboring planets and asteroids for valuable mineral deposits or rare resources. These discoveries can lead to new opportunities for expansion and growth.
8. Defend against hostile alien encounters by upgrading security systems and investing in advanced weaponry. A robust defense strategy will help protect your crew and preserve the integrity of the spaceship.
9. Balance resource allocation between short-term needs and long-term planning. For example, allocating too many resources towards immediate survival may neglect crucial research projects that could lead to sustainable solutions down the line.
10. Manage crises as they arise, whether it be technical malfunctions, system failures, or personal conflicts among crew members. Effective crisis management will demonstrate your leadership skills and prove vital to the spaceship’s success.

As you progress through these objectives, you will encounter various events and challenges that test your ability to adapt and innovate. Whether dealing with unexpected resource shortages or navigating political intrigue among your crew, every decision counts toward shaping the fate of the spaceship and the success of its mission. With careful planning and strategic thinking, you might just lead your crew to a safe and prosperous journey to the interesting destination, establishing a thriving community in the depths of outer space.