mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 14:07:51 +01:00
FUCK
This commit is contained in:
+20
-11
@@ -16,6 +16,14 @@
|
||||
#define DIAG_MECH_HUD "11"// Mech health bar
|
||||
#define STATUS_HUD_OOC "12"// STATUS_HUD without virus db check for someone being ill.
|
||||
#define DIAG_BOT_HUD "13"// Bot HUDS
|
||||
#define PLANT_NUTRIENT_HUD "15"// Plant nutrient level
|
||||
#define PLANT_WATER_HUD "16"// Plant water level
|
||||
#define PLANT_STATUS_HUD "17"// Plant harvest/dead
|
||||
#define PLANT_HEALTH_HUD "18"// Plant health
|
||||
#define PLANT_TOXIN_HUD "19"// Toxin level
|
||||
#define PLANT_PEST_HUD "20"// Pest level
|
||||
#define PLANT_WEED_HUD "21"// Weed level
|
||||
#define PLANT_HONEY_HUD "22"// Used on apiary
|
||||
|
||||
//for antag huds. these are used at the /mob level
|
||||
#define SPECIALROLE_HUD "13"
|
||||
@@ -28,16 +36,17 @@
|
||||
#define DATA_HUD_MEDICAL_BASIC 3
|
||||
#define DATA_HUD_MEDICAL_ADVANCED 4
|
||||
#define DATA_HUD_DIAGNOSTIC 5
|
||||
#define DATA_HUD_HYDROPONIC 6
|
||||
//NATIONS
|
||||
#define GAME_HUD_NATIONS 6
|
||||
#define GAME_HUD_NATIONS 7
|
||||
//antag HUD defines
|
||||
#define ANTAG_HUD_CULT 7
|
||||
#define ANTAG_HUD_REV 8
|
||||
#define ANTAG_HUD_OPS 9
|
||||
#define ANTAG_HUD_WIZ 10
|
||||
#define ANTAG_HUD_SHADOW 11
|
||||
#define ANTAG_HUD_TRAITOR 12
|
||||
#define ANTAG_HUD_NINJA 13 //For Daves Rework
|
||||
#define ANTAG_HUD_CHANGELING 14
|
||||
#define ANTAG_HUD_VAMPIRE 15
|
||||
#define ANTAG_HUD_ABDUCTOR 16 //For Fox
|
||||
#define ANTAG_HUD_CULT 8
|
||||
#define ANTAG_HUD_REV 9
|
||||
#define ANTAG_HUD_OPS 10
|
||||
#define ANTAG_HUD_WIZ 11
|
||||
#define ANTAG_HUD_SHADOW 12
|
||||
#define ANTAG_HUD_TRAITOR 13
|
||||
#define ANTAG_HUD_NINJA 14 //For Daves Rework
|
||||
#define ANTAG_HUD_CHANGELING 15
|
||||
#define ANTAG_HUD_VAMPIRE 16
|
||||
#define ANTAG_HUD_ABDUCTOR 17 //For Fox
|
||||
|
||||
+3
-2
@@ -6,7 +6,8 @@ var/datum/atom_hud/huds = list( \
|
||||
DATA_HUD_SECURITY_ADVANCED = new/datum/atom_hud/data/human/security/advanced(), \
|
||||
DATA_HUD_MEDICAL_BASIC = new/datum/atom_hud/data/human/medical/basic(), \
|
||||
DATA_HUD_MEDICAL_ADVANCED = new/datum/atom_hud/data/human/medical/advanced(), \
|
||||
DATA_HUD_DIAGNOSTIC = new/datum/atom_hud/data/diagnostic(),
|
||||
DATA_HUD_DIAGNOSTIC = new/datum/atom_hud/data/diagnostic(), \
|
||||
DATA_HUD_HYDROPONIC = new/datum/atom_hud/data/hydroponic(), \
|
||||
GAME_HUD_NATIONS = new/datum/atom_hud/antag(), \
|
||||
ANTAG_HUD_CULT = new/datum/atom_hud/antag(), \
|
||||
ANTAG_HUD_REV = new/datum/atom_hud/antag(), \
|
||||
@@ -17,7 +18,7 @@ var/datum/atom_hud/huds = list( \
|
||||
ANTAG_HUD_NINJA = new/datum/atom_hud/antag/hidden(),\
|
||||
ANTAG_HUD_CHANGELING = new/datum/atom_hud/antag/hidden(),\
|
||||
ANTAG_HUD_VAMPIRE = new/datum/atom_hud/antag/hidden(),\
|
||||
ANTAG_HUD_ABDUCTOR = new/datum/atom_hud/antag/hidden(),\
|
||||
ANTAG_HUD_ABDUCTOR = new/datum/atom_hud/antag/hidden()\
|
||||
)
|
||||
|
||||
/datum/atom_hud
|
||||
|
||||
@@ -46,6 +46,9 @@
|
||||
/datum/atom_hud/data/diagnostic
|
||||
hud_icons = list (DIAG_HUD, DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD, DIAG_BOT_HUD)
|
||||
|
||||
/datum/atom_hud/data/hydroponic
|
||||
hud_icons = list (PLANT_NUTRIENT_HUD, PLANT_WATER_HUD, PLANT_STATUS_HUD, PLANT_HEALTH_HUD, PLANT_TOXIN_HUD, PLANT_PEST_HUD, PLANT_WEED_HUD, PLANT_HONEY_HUD)
|
||||
|
||||
/* MED/SEC/DIAG HUD HOOKS */
|
||||
|
||||
/*
|
||||
@@ -294,3 +297,87 @@
|
||||
holder.icon_state = "hudmove"
|
||||
else
|
||||
holder.icon_state = ""
|
||||
|
||||
/*~~~~~~~~~~~~~~
|
||||
PLANT HUD
|
||||
~~~~~~~~~~~~~~~*/
|
||||
/proc/RoundPlantBar(value)
|
||||
switch(value * 100)
|
||||
if(90 to INFINITY)
|
||||
return "max"
|
||||
if(80 to 90)
|
||||
return "90"
|
||||
if(70 to 80)
|
||||
return "80"
|
||||
if(60 to 70)
|
||||
return "70"
|
||||
if(50 to 60)
|
||||
return "60"
|
||||
if(40 to 50)
|
||||
return "50"
|
||||
if(30 to 40)
|
||||
return "40"
|
||||
if(20 to 30)
|
||||
return "30"
|
||||
if(10 to 20)
|
||||
return "20"
|
||||
if(1 to 10)
|
||||
return "10"
|
||||
else
|
||||
return "zero"
|
||||
return "zero"
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/proc/plant_hud_set_nutrient()
|
||||
var/image/holder = hud_list[PLANT_NUTRIENT_HUD]
|
||||
holder.icon_state = "hudnutrient[RoundPlantBar(nutrilevel/maxnutri)]"
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/proc/plant_hud_set_water()
|
||||
var/image/holder = hud_list[PLANT_WATER_HUD]
|
||||
holder.icon_state = "hudnutrient[RoundPlantBar(waterlevel/maxwater)]"
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/proc/plant_hud_set_status()
|
||||
var/image/holder = hud_list[PLANT_STATUS_HUD]
|
||||
// Dis be drugs here. And special mention plants
|
||||
var/list/special = list(/datum/seed/nettle, /datum/seed/apple/poison, /datum/seed/ambrosia, /datum/seed/tobacco, /datum/seed/mushroom, \
|
||||
/datum/seed/weeds, /datum/seed/grass, /datum/seed/kudzu, /datum/seed/diona, /datum/seed/clown)
|
||||
if (!seed) return
|
||||
if (harvest)
|
||||
if (is_type_in_list(seed, special))
|
||||
holder.icon_state = "hudharvest2"
|
||||
holder.icon_state = "hudharvest"
|
||||
return
|
||||
if (dead)
|
||||
holder.icon_state = "huddead"
|
||||
return
|
||||
else
|
||||
holder.icon_state = ""
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/proc/plant_hud_set_health()
|
||||
var/image/holder = hud_list[PLANT_HEALTH_HUD]
|
||||
if (!seed) return
|
||||
holder.icon_state = "hudhealth[RoundPlantBar(health/seed.get_trait(TRAIT_ENDURANCE))]"
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/proc/plant_hud_set_toxin()
|
||||
var/image/holder = hud_list[PLANT_TOXIN_HUD]
|
||||
if (toxins < 1) // You don't want to see these icons if the value is small
|
||||
holder.icon_state = ""
|
||||
return
|
||||
holder.icon_state = "hudtoxin[RoundPlantBar(toxins/10)]"
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/proc/plant_hud_set_pest()
|
||||
var/image/holder = hud_list[PLANT_PEST_HUD]
|
||||
if (pestlevel < 1) // You don't want to see these icons if the value is small
|
||||
holder.icon_state = ""
|
||||
return
|
||||
holder.icon_state = "hudpest[RoundPlantBar(pestlevel/10)]"
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/proc/plant_hud_set_weed()
|
||||
var/image/holder = hud_list[PLANT_WEED_HUD]
|
||||
if (weedlevel < 1) // You don't want to see these icons if the value is small
|
||||
holder.icon_state = ""
|
||||
return
|
||||
holder.icon_state = "hudweed[RoundPlantBar(weedlevel/10)]"
|
||||
|
||||
/obj/structure/beebox/proc/plant_hud_set_honey()
|
||||
var/image/holder = hud_list[PLANT_HONEY_HUD]
|
||||
holder.icon_state = "hudhoney[honeycombs.len]"
|
||||
@@ -108,4 +108,19 @@
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/hud/security/sunglasses/prescription
|
||||
prescription = 1
|
||||
prescription = 1
|
||||
|
||||
/obj/item/clothing/glasses/hud/hydroponic
|
||||
name = "Hydroponic HUD"
|
||||
desc = "A heads-up display capable of analyzing the health and status of plants growing in hydro trays and soil."
|
||||
icon_state = "hydroponichud"
|
||||
HUDType = DATA_HUD_HYDROPONIC
|
||||
|
||||
/obj/item/clothing/glasses/hud/hydroponic/night
|
||||
name = "Night Vision Hydroponic HUD"
|
||||
desc = "A hydroponic HUD fitted with a light amplifier."
|
||||
icon_state = "hydroponichudnight"
|
||||
item_state = "glasses"
|
||||
darkness_view = 8
|
||||
see_darkness = 0
|
||||
prescription_upgradable = 0
|
||||
@@ -48,6 +48,10 @@
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
|
||||
/* var/datum/atom_hud/data/hydroponic/hydro_hud = huds[DATA_HUD_HYDROPONIC]
|
||||
hydro_hud.add_to_hud(src)
|
||||
plant_hud_set_honey()
|
||||
*/
|
||||
|
||||
/obj/structure/beebox/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
|
||||
@@ -101,6 +101,17 @@
|
||||
if(closed_system)
|
||||
flags &= ~OPENCONTAINER
|
||||
|
||||
var/datum/atom_hud/data/hydroponic/hydro_hud = huds[DATA_HUD_HYDROPONIC]
|
||||
prepare_huds()
|
||||
hydro_hud.add_to_hud(src)
|
||||
plant_hud_set_nutrient()
|
||||
plant_hud_set_water()
|
||||
plant_hud_set_status()
|
||||
plant_hud_set_health()
|
||||
plant_hud_set_toxin()
|
||||
plant_hud_set_pest()
|
||||
plant_hud_set_weed()
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/upgraded/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.5 KiB |
Reference in New Issue
Block a user