mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
Increases time between random events happening in low population rounds to a maximum of double. Random events are more likely to happen up to a limit of around 30 active players. Events now fire at the same rate as previously with around 20~ active players.
Also adds floodlights, cause floodlights are cool.
This commit is contained in:
@@ -162,11 +162,9 @@
|
|||||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Supermatter"
|
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Supermatter"
|
||||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Tajara"
|
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Tajara"
|
||||||
#define FILE_DIR "code/WorkInProgress/Chinsky"
|
#define FILE_DIR "code/WorkInProgress/Chinsky"
|
||||||
#define FILE_DIR "code/WorkInProgress/Holiday"
|
|
||||||
#define FILE_DIR "code/WorkInProgress/mapload"
|
#define FILE_DIR "code/WorkInProgress/mapload"
|
||||||
#define FILE_DIR "code/WorkInProgress/Mini"
|
#define FILE_DIR "code/WorkInProgress/Mini"
|
||||||
#define FILE_DIR "code/WorkInProgress/Mloc"
|
#define FILE_DIR "code/WorkInProgress/Mloc"
|
||||||
#define FILE_DIR "code/WorkInProgress/Mloc/MAtmos"
|
|
||||||
#define FILE_DIR "code/WorkInProgress/organs"
|
#define FILE_DIR "code/WorkInProgress/organs"
|
||||||
#define FILE_DIR "code/WorkInProgress/Ported"
|
#define FILE_DIR "code/WorkInProgress/Ported"
|
||||||
#define FILE_DIR "code/WorkInProgress/Ported/Abi79"
|
#define FILE_DIR "code/WorkInProgress/Ported/Abi79"
|
||||||
@@ -484,6 +482,7 @@
|
|||||||
#include "code\game\machinery\dispenser.dm"
|
#include "code\game\machinery\dispenser.dm"
|
||||||
#include "code\game\machinery\door_control.dm"
|
#include "code\game\machinery\door_control.dm"
|
||||||
#include "code\game\machinery\flasher.dm"
|
#include "code\game\machinery\flasher.dm"
|
||||||
|
#include "code\game\machinery\floodlight.dm"
|
||||||
#include "code\game\machinery\Freezer.dm"
|
#include "code\game\machinery\Freezer.dm"
|
||||||
#include "code\game\machinery\hologram.dm"
|
#include "code\game\machinery\hologram.dm"
|
||||||
#include "code\game\machinery\hydroponics.dm"
|
#include "code\game\machinery\hydroponics.dm"
|
||||||
|
|||||||
@@ -117,9 +117,18 @@ var/datum/roundinfo/roundinfo = new()
|
|||||||
spawn() supply_ticker() // Added to kick-off the supply shuttle regenerating points -- TLE
|
spawn() supply_ticker() // Added to kick-off the supply shuttle regenerating points -- TLE
|
||||||
|
|
||||||
spawn(0)
|
spawn(0)
|
||||||
while(1)
|
while (1)
|
||||||
sleep(5000+rand(6000,10000))
|
var/potential_sleep_time = 10000 + rand(10000, 20000)
|
||||||
SpawnEvent()
|
for (var/mob/living/M in world)
|
||||||
|
if(!M.client) continue
|
||||||
|
if(M.client.inactivity > 10 * 60 * 10) continue
|
||||||
|
if(M.stat == 2) continue
|
||||||
|
|
||||||
|
if (potential_sleep_time > 10000)
|
||||||
|
potential_sleep_time -= 600
|
||||||
|
|
||||||
|
sleep(potential_sleep_time)
|
||||||
|
SpawnEvent()
|
||||||
|
|
||||||
//Start master_controller.process()
|
//Start master_controller.process()
|
||||||
spawn master_controller.process()
|
spawn master_controller.process()
|
||||||
|
|||||||
108
code/game/machinery/floodlight.dm
Normal file
108
code/game/machinery/floodlight.dm
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
/obj/machinery/floodlight
|
||||||
|
name = "Emergency Floodlight"
|
||||||
|
icon = 'floodlight.dmi'
|
||||||
|
icon_state = "flood00"
|
||||||
|
density = 1
|
||||||
|
var/on = 0
|
||||||
|
var/obj/item/weapon/cell/cell = null
|
||||||
|
var/use = 1
|
||||||
|
var/unlocked = 0
|
||||||
|
var/open = 0
|
||||||
|
|
||||||
|
/obj/machinery/floodlight/proc/updateicon()
|
||||||
|
icon_state = "flood[open ? "o" : ""][open && cell ? "b" : ""]0[on]"
|
||||||
|
|
||||||
|
/obj/machinery/floodlight/process()
|
||||||
|
if (!on)
|
||||||
|
if (luminosity)
|
||||||
|
updateicon()
|
||||||
|
sd_SetLuminosity(0)
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!luminosity && cell && cell.charge > 0)
|
||||||
|
sd_SetLuminosity(10)
|
||||||
|
updateicon()
|
||||||
|
|
||||||
|
if(!cell && luminosity)
|
||||||
|
on = 0
|
||||||
|
updateicon()
|
||||||
|
sd_SetLuminosity(0)
|
||||||
|
return
|
||||||
|
|
||||||
|
cell.charge -= use
|
||||||
|
|
||||||
|
if(cell.charge <= 0 && luminosity)
|
||||||
|
on = 0
|
||||||
|
updateicon()
|
||||||
|
sd_SetLuminosity(0)
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/machinery/floodlight/attack_hand(mob/user as mob)
|
||||||
|
if(open && cell)
|
||||||
|
cell.loc = usr
|
||||||
|
cell.layer = 20
|
||||||
|
if (user.hand )
|
||||||
|
user.l_hand = cell
|
||||||
|
else
|
||||||
|
user.r_hand = cell
|
||||||
|
|
||||||
|
cell.add_fingerprint(user)
|
||||||
|
updateicon()
|
||||||
|
cell.updateicon()
|
||||||
|
|
||||||
|
src.cell = null
|
||||||
|
user << "You remove the power cell"
|
||||||
|
return
|
||||||
|
|
||||||
|
if(on)
|
||||||
|
on = 0
|
||||||
|
user << "You turn off the light"
|
||||||
|
else
|
||||||
|
if(!cell)
|
||||||
|
return
|
||||||
|
if(cell.charge <= 0)
|
||||||
|
return
|
||||||
|
on = 1
|
||||||
|
user << "You turn on the light"
|
||||||
|
|
||||||
|
updateicon()
|
||||||
|
|
||||||
|
|
||||||
|
/obj/machinery/floodlight/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
|
if (istype(W, /obj/item/weapon/screwdriver))
|
||||||
|
if (!open)
|
||||||
|
if(unlocked)
|
||||||
|
unlocked = 0
|
||||||
|
user << "You screw the battery panel in place."
|
||||||
|
else
|
||||||
|
unlocked = 1
|
||||||
|
user << "You unscrew the battery panel."
|
||||||
|
|
||||||
|
if (istype(W, /obj/item/weapon/crowbar))
|
||||||
|
if(unlocked)
|
||||||
|
if(open)
|
||||||
|
open = 0
|
||||||
|
overlays = null
|
||||||
|
user << "You crowbar the battery panel in place."
|
||||||
|
else
|
||||||
|
if(unlocked)
|
||||||
|
open = 1
|
||||||
|
user << "You remove the battery panel."
|
||||||
|
|
||||||
|
if (istype(W, /obj/item/weapon/cell))
|
||||||
|
if(open)
|
||||||
|
if(cell)
|
||||||
|
user << "There is a power cell already installed."
|
||||||
|
else
|
||||||
|
user.drop_item()
|
||||||
|
W.loc = src
|
||||||
|
cell = W
|
||||||
|
user << "You insert the power cell."
|
||||||
|
updateicon()
|
||||||
|
|
||||||
|
/obj/machinery/floodlight/New()
|
||||||
|
src.cell = new/obj/item/weapon/cell(src)
|
||||||
|
cell.maxcharge = 1000
|
||||||
|
cell.charge = 1000
|
||||||
|
..()
|
||||||
|
|
||||||
BIN
icons/obj/machines/floodlight.dmi
Normal file
BIN
icons/obj/machines/floodlight.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
Reference in New Issue
Block a user