-
-
Notifications
You must be signed in to change notification settings - Fork 417
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
Новое дерево технологий #13287
Merged
Merged
Новое дерево технологий #13287
Changes from 18 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
b42d589
Basic hud upgrades functionality
L4rever dc839e0
Added override button icon states
AirBlack 1c7c57b
Bassic toggle functionality
AirBlack 4893f7b
Added other functionality for advanced HUD
L4rever 7b45927
Added HUD design, advanced thermals replaces other buttons
L4rever 84bcab1
Special tech tree is now unshown by default
L4rever 61a2cbd
Upgrading huds now in separate proc. Deleted not working properly cod…
L4rever 81daf02
fix item action removal
AirBlack 4bc7270
Merge remote-tracking branch 'upstream/master' into rnd-feature
L4rever 67048a6
Merge remote-tracking branch 'upstream/master' into rnd-feature
L4rever face44a
Added new icons, sprites and rebalanced designes
L4rever c0a052d
Added disk with starting technology on derelict
L4rever 4e67c65
Fixed sprites on character
L4rever 5df62a0
Changed one of the derelicts with disk
L4rever 14ecfcb
Probably fix for codelinter
L4rever 7998e59
Super mega fix for codelinter
L4rever 68bfc52
Fixed world sprites
L4rever f57411c
Added new sprites for upgrade circuits
L4rever e522a00
Merge remote-tracking branch 'upstream/master' into rnd-feature
L4rever 9529a0c
Update code/modules/item_upgrades/item_upgrade.dm
L4rever cda1a38
Merge branch 'rnd-feature' of https://github.com/L4rever/TauCetiClass…
L4rever 5138415
Added sound for uploading
L4rever 92359a4
Added sound to all disks
L4rever 1817c8a
mob remove
KatoMarika 858804c
fix for mob remove
KatoMarika a8ea7fe
fix conflict merge
KatoMarika 087b7cb
Merge branch 'master' of https://github.com/TauCetiStation/TauCetiCla…
L4rever 986c39b
fix conflict
L4rever 675874a
Refactored mode change due to NinjaPikachushka desicion
L4rever 8a14f68
Added special operation tech branch
L4rever bf206c2
Added disk with tech on 2 maps
L4rever 814790c
Update code/modules/item_upgrades/item_upgrade.dm
L4rever 9f25c98
Update code/modules/item_upgrades/item_upgrade.dm
L4rever 3232706
Update code/modules/item_upgrades/item_upgrade.dm
L4rever fa180c6
Update code/modules/item_upgrades/item_upgrade.dm
L4rever b46def1
Review fixes
L4rever 0f0f955
Merge branch 'rnd-feature' of https://github.com/L4rever/TauCetiClass…
L4rever f4f07db
Makes everything beautiful
L4rever 9166892
Beautiful fix
L4rever 8ab7030
234
L4rever 505e5ad
Some fixes
L4rever ed399aa
Fix boots design
L4rever File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
#define HUD_UPGRADE_MEDSCAN 1 | ||
#define HUD_UPGRADE_NIGHTVISION 2 | ||
#define HUD_UPGRADE_THERMAL 3 | ||
#define HUD_UPGRADE_THERMAL_ADVANCED 4 | ||
|
||
#define HUD_TOGGLEABLE_MODE_NIGHTVISION "night" | ||
#define HUD_TOGGLEABLE_MODE_THERMAL "thermal" | ||
#define HUD_TOGGLEABLE_MODE_THERMAL_ADVANCED "thermal_adv" | ||
|
||
/obj/item/clothing/glasses/sunglasses/hud/advanced | ||
name = "Advanced HUD" | ||
desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status and health status." | ||
icon = 'icons/obj/clothing/goggles.dmi' | ||
item_state = "sechud" | ||
item_state_inventory = "sechud" | ||
item_state_world = "sechud_w" | ||
body_parts_covered = 0 | ||
L4rever marked this conversation as resolved.
Show resolved
Hide resolved
|
||
hud_types = list(DATA_HUD_SECURITY) | ||
item_action_types = list() | ||
var/upgrade_tier = 0 | ||
var/current_mode = null | ||
|
||
/obj/item/clothing/glasses/sunglasses/hud/advanced/proc/apply_effects(mode_type, enable) | ||
if(!ishuman(usr)) | ||
return | ||
L4rever marked this conversation as resolved.
Show resolved
Hide resolved
|
||
var/mob/living/carbon/human/human = usr | ||
L4rever marked this conversation as resolved.
Show resolved
Hide resolved
|
||
switch(mode_type) | ||
if(HUD_TOGGLEABLE_MODE_NIGHTVISION) | ||
if(enable) | ||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE | ||
sightglassesmod = "nightsight" | ||
darkness_view = 7 | ||
else | ||
lighting_alpha = null | ||
sightglassesmod = null | ||
darkness_view = 0 | ||
if(HUD_TOGGLEABLE_MODE_THERMAL) | ||
if(enable) | ||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE | ||
sightglassesmod = "sepia" | ||
vision_flags = SEE_MOBS | ||
|
||
else | ||
lighting_alpha = null | ||
sightglassesmod = null | ||
vision_flags = 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. страшная копипаста, нельзя вынести это? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Починил, в целом. |
||
|
||
if(HUD_TOGGLEABLE_MODE_THERMAL_ADVANCED) | ||
if(enable) | ||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE | ||
darkness_view = 7 | ||
vision_flags = SEE_MOBS | ||
L4rever marked this conversation as resolved.
Show resolved
Hide resolved
|
||
else | ||
lighting_alpha = null | ||
darkness_view = 0 | ||
vision_flags = 0 | ||
|
||
playsound(src, activation_sound, VOL_EFFECTS_MASTER, 10, FALSE) | ||
human.update_sight() | ||
update_item_actions() | ||
|
||
|
||
/obj/item/clothing/glasses/sunglasses/hud/advanced/proc/switch_mode(mode_type) | ||
if(current_mode) | ||
apply_effects(current_mode, FALSE) | ||
if(current_mode == mode_type) | ||
current_mode = null | ||
return | ||
|
||
apply_effects(mode_type, TRUE) | ||
current_mode = mode_type | ||
|
||
/obj/item/clothing/glasses/sunglasses/hud/advanced/proc/upgrade_hud(obj/item/hud_upgrade/hud_upgrade) | ||
switch(hud_upgrade.tier) | ||
if(HUD_UPGRADE_MEDSCAN) | ||
item_state = "mixhud" | ||
item_state_inventory = "mixhud" | ||
item_state_world = "mixhud_w" | ||
hud_types.Add(DATA_HUD_MEDICAL_ADV) | ||
def_hud_types.Add(DATA_HUD_MEDICAL_ADV) | ||
if(HUD_UPGRADE_NIGHTVISION) | ||
item_state = "nvghud" | ||
item_state_inventory = "nvghud" | ||
item_state_world = "nvghud_w" | ||
item_actions.Add(new /datum/action/item_action/hands_free/switch_hud_modes/night(src)) | ||
if(HUD_UPGRADE_THERMAL) | ||
item_state = "thermalhud" | ||
item_state_inventory = "thermalhud" | ||
item_state_world = "thermalhud_w" | ||
item_actions.Add(new /datum/action/item_action/hands_free/switch_hud_modes/thermal(src)) | ||
if(HUD_UPGRADE_THERMAL_ADVANCED) | ||
item_state = "thermalhudadv" | ||
item_state_inventory = "thermalhudadv" | ||
item_state_world = "thermalhudadv_w" | ||
for(var/datum/action/item_action/hands_free/switch_hud_modes/night/night_action in item_actions) | ||
night_action.Remove(usr) | ||
L4rever marked this conversation as resolved.
Show resolved
Hide resolved
|
||
item_actions.Remove(night_action) | ||
for(var/datum/action/item_action/hands_free/switch_hud_modes/thermal/thermal_action in item_actions) | ||
thermal_action.Remove(usr) | ||
item_actions.Remove(thermal_action) | ||
item_actions.Add(new /datum/action/item_action/hands_free/switch_hud_modes/thermal_advanced(src)) | ||
|
||
upgrade_tier = hud_upgrade.tier | ||
update_world_icon() | ||
add_item_actions(usr) | ||
|
||
/obj/item/clothing/glasses/sunglasses/hud/advanced/attackby(obj/item/W, mob/living/user) | ||
if(istype(W, /obj/item/hud_upgrade)) | ||
var/obj/item/hud_upgrade/hud_upgrade = W | ||
if(upgrade_tier >= hud_upgrade.tier) | ||
to_chat(usr, "<span class='notice'>You've already installed that upgrade</span>") | ||
return | ||
if(upgrade_tier < hud_upgrade.tier - 1) | ||
to_chat(usr, "<span class='alert'>You have to install previous upgrades</span>") | ||
return | ||
if(user.is_in_hands(src)) | ||
upgrade_hud(hud_upgrade) | ||
add_item_actions(user) | ||
else | ||
to_chat(usr, "<span class='alert'>You have to hold huds in hands to upgrade it</span>") | ||
return | ||
qdel(hud_upgrade) | ||
if(istype(W, /obj/item/device/hud_calibrator)) | ||
L4rever marked this conversation as resolved.
Show resolved
Hide resolved
|
||
var/obj/item/device/hud_calibrator = W | ||
to_chat(usr, "<span class='alert'>You try to recalibrate huds, but nothing happens</span>") | ||
qdel(hud_calibrator) | ||
L4rever marked this conversation as resolved.
Show resolved
Hide resolved
L4rever marked this conversation as resolved.
Show resolved
Hide resolved
|
||
. = ..() | ||
L4rever marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/obj/item/hud_upgrade | ||
icon = 'icons/obj/item_upgrades.dmi' | ||
var/tier = 0 | ||
/obj/item/hud_upgrade/medscan | ||
name = "Damage Scan Upgrade" | ||
desc = "Allows HUD to show damage on person." | ||
item_state_inventory = "medscan" | ||
item_state_world = "medscan_w" | ||
tier = 1 | ||
/obj/item/hud_upgrade/night | ||
name = "Basic Nightvision HUD upgrade" | ||
desc = "Allows HUD to turn a basic nightvision mode. Can be installed only after damage scan upgrade" | ||
item_state_inventory = "nightvision" | ||
item_state_world = "nightvision_w" | ||
tier = 2 | ||
/obj/item/hud_upgrade/thermal | ||
name = "Thermal HUD upgrade" | ||
desc = "Allows HUD to turn a basic thermal mode, makes nightvision mode more comfortable for use. Can be installed only after basic nightvision upgrade" | ||
item_state_inventory = "thermal" | ||
item_state_world = "thermal_w" | ||
tier = 3 | ||
/obj/item/hud_upgrade/thermal_advanced | ||
name = "Advanced Thermal HUD upgrade" | ||
desc = "Makes thermal mode comfortable and combines it with nightvision mode. Can be installed only after thermal upgrade" | ||
item_state_inventory = "thermaladv" | ||
item_state_world = "thermaladv_w" | ||
tier = 4 | ||
L4rever marked this conversation as resolved.
Show resolved
Hide resolved
L4rever marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/datum/action/item_action/hands_free/switch_hud_modes/ | ||
L4rever marked this conversation as resolved.
Show resolved
Hide resolved
|
||
name = "Switch Mode" | ||
button_overlay_icon = 'icons/obj/clothing/goggles.dmi' | ||
var/hud_mode | ||
|
||
/datum/action/item_action/hands_free/switch_hud_modes/Activate() | ||
var/obj/item/clothing/glasses/sunglasses/hud/advanced/hud = target | ||
if(!hud_mode || !istype(hud)) | ||
return | ||
|
||
hud.switch_mode(hud_mode) | ||
|
||
/datum/action/item_action/hands_free/switch_hud_modes/night | ||
name = "Toggle Nightvision" | ||
button_overlay_state = "nvghud" | ||
hud_mode = HUD_TOGGLEABLE_MODE_NIGHTVISION | ||
|
||
/datum/action/item_action/hands_free/switch_hud_modes/thermal //only thermal | ||
name = "Toggle thermal" | ||
button_overlay_state = "thermalhud" | ||
hud_mode = HUD_TOGGLEABLE_MODE_THERMAL | ||
|
||
/datum/action/item_action/hands_free/switch_hud_modes/thermal_advanced //mixed thermal and nightvision | ||
name = "Toggle Advanced Thermal" | ||
button_overlay_state = "thermalhudadv" | ||
hud_mode = HUD_TOGGLEABLE_MODE_THERMAL_ADVANCED | ||
|
||
#undef HUD_UPGRADE_MEDSCAN | ||
#undef HUD_UPGRADE_NIGHTVISION | ||
#undef HUD_UPGRADE_THERMAL | ||
#undef HUD_UPGRADE_THERMAL_ADVANCED | ||
#undef HUD_TOGGLEABLE_MODE_NIGHTVISION | ||
#undef HUD_TOGGLEABLE_MODE_THERMAL | ||
#undef HUD_TOGGLEABLE_MODE_THERMAL_ADVANCED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Зачем добавлять новые какие-то иконки, если можно использовать button_icon и button_icon_state? Я так понимаю, потому что background_icon_state использует файл основной иконки, мб тогда и добавить
background_icon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мы с киборгом решили что пофиг