mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-25-04a
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
heads_up = "Are you a bad enough dude to grief the station?"
|
||||
boss_name = "George Melon"
|
||||
|
||||
/datum/computer_file/program/arcade/proc/game_check(mob/user)
|
||||
/datum/computer_file/program/arcade/proc/game_check(mob/living/user)
|
||||
sleep(0.5 SECONDS)
|
||||
user?.mind?.adjust_experience(/datum/skill/gaming, 1)
|
||||
if(boss_hp <= 0)
|
||||
@@ -49,7 +49,7 @@
|
||||
computer.update_appearance()
|
||||
ticket_count += 1
|
||||
user?.mind?.adjust_experience(/datum/skill/gaming, 50)
|
||||
usr.won_game()
|
||||
user.won_game()
|
||||
sleep(1 SECONDS)
|
||||
else if(player_hp <= 0 || player_mp <= 0)
|
||||
heads_up = "You have been defeated... how will the station survive?"
|
||||
@@ -59,10 +59,10 @@
|
||||
if(istype(computer))
|
||||
computer.update_appearance()
|
||||
user?.mind?.adjust_experience(/datum/skill/gaming, 10)
|
||||
usr.lost_game()
|
||||
user.lost_game()
|
||||
sleep(1 SECONDS)
|
||||
|
||||
/datum/computer_file/program/arcade/proc/enemy_check(mob/user)
|
||||
/datum/computer_file/program/arcade/proc/enemy_check(mob/living/user)
|
||||
var/boss_attackamt = 0 //Spam protection from boss attacks as well.
|
||||
var/boss_mpamt = 0
|
||||
var/bossheal = 0
|
||||
@@ -88,7 +88,7 @@
|
||||
player_hp -= boss_attackamt
|
||||
|
||||
pause_state = FALSE
|
||||
game_check()
|
||||
game_check(user)
|
||||
|
||||
/datum/computer_file/program/arcade/ui_assets(mob/user)
|
||||
return list(
|
||||
@@ -109,12 +109,15 @@
|
||||
|
||||
/datum/computer_file/program/arcade/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
||||
. = ..()
|
||||
usr.played_game()
|
||||
var/mob/living/gamer = ui.user
|
||||
if (!istype(gamer))
|
||||
return
|
||||
gamer.played_game()
|
||||
var/gamerSkillLevel = 0
|
||||
var/gamerSkill = 0
|
||||
if(usr?.mind)
|
||||
gamerSkillLevel = usr.mind.get_skill_level(/datum/skill/gaming)
|
||||
gamerSkill = usr.mind.get_skill_modifier(/datum/skill/gaming, SKILL_RANDS_MODIFIER)
|
||||
if(gamer?.mind)
|
||||
gamerSkillLevel = gamer.mind.get_skill_level(/datum/skill/gaming)
|
||||
gamerSkill = gamer.mind.get_skill_modifier(/datum/skill/gaming, SKILL_RANDS_MODIFIER)
|
||||
switch(action)
|
||||
if("Attack")
|
||||
var/attackamt = 0 //Spam prevention.
|
||||
@@ -125,8 +128,8 @@
|
||||
playsound(computer.loc, 'sound/machines/arcade/hit.ogg', 50, TRUE)
|
||||
boss_hp -= attackamt
|
||||
sleep(1 SECONDS)
|
||||
game_check()
|
||||
enemy_check()
|
||||
game_check(gamer)
|
||||
enemy_check(gamer)
|
||||
return TRUE
|
||||
if("Heal")
|
||||
var/healamt = 0 //More Spam Prevention.
|
||||
@@ -143,8 +146,8 @@
|
||||
player_hp += healamt
|
||||
player_mp -= healcost
|
||||
sleep(1 SECONDS)
|
||||
game_check()
|
||||
enemy_check()
|
||||
game_check(gamer)
|
||||
enemy_check(gamer)
|
||||
return TRUE
|
||||
if("Recharge_Power")
|
||||
var/rechargeamt = 0 //As above.
|
||||
@@ -155,22 +158,22 @@
|
||||
playsound(computer.loc, 'sound/machines/arcade/mana.ogg', 50, TRUE)
|
||||
player_mp += rechargeamt
|
||||
sleep(1 SECONDS)
|
||||
game_check()
|
||||
enemy_check()
|
||||
game_check(gamer)
|
||||
enemy_check(gamer)
|
||||
return TRUE
|
||||
if("Dispense_Tickets")
|
||||
if(computer.stored_paper <= 0)
|
||||
to_chat(usr, span_notice("Printer is out of paper."))
|
||||
to_chat(gamer, span_notice("Printer is out of paper."))
|
||||
return
|
||||
else
|
||||
computer.visible_message(span_notice("\The [computer] prints out paper."))
|
||||
if(ticket_count >= 1)
|
||||
new /obj/item/stack/arcadeticket((get_turf(computer)), 1)
|
||||
to_chat(usr, span_notice("[computer] dispenses a ticket!"))
|
||||
to_chat(gamer, span_notice("[computer] dispenses a ticket!"))
|
||||
ticket_count -= 1
|
||||
computer.stored_paper -= 1
|
||||
else
|
||||
to_chat(usr, span_notice("You don't have any stored tickets!"))
|
||||
to_chat(gamer, span_notice("You don't have any stored tickets!"))
|
||||
return TRUE
|
||||
if("Start_Game")
|
||||
game_active = TRUE
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
extended_desc = "A built-in app for cyborg self-management and diagnostics."
|
||||
ui_header = "robotact.gif" //DEBUG -- new icon before PR
|
||||
program_open_overlay = "command"
|
||||
program_flags = NONE
|
||||
program_flags = PROGRAM_HEADER
|
||||
undeletable = TRUE
|
||||
can_run_on_flags = PROGRAM_PDA
|
||||
size = 5
|
||||
|
||||
@@ -214,18 +214,19 @@ GLOBAL_LIST_EMPTY(virtual_pets_list)
|
||||
|
||||
/datum/computer_file/program/virtual_pet/proc/alter_profile_picture()
|
||||
var/image/pet_preview = image(icon = 'icons/ui/virtualpet/pet_state.dmi', icon_state = "pet_preview")
|
||||
if(LAZYACCESS(pet.atom_colours, FIXED_COLOUR_PRIORITY))
|
||||
pet_preview.color = pet.atom_colours[FIXED_COLOUR_PRIORITY]
|
||||
if(pet.cached_color_filter)
|
||||
pet_preview.color = apply_matrix_to_color(COLOR_WHITE, pet.cached_color_filter["color"], pet.cached_color_filter["space"] || COLORSPACE_RGB)
|
||||
else if (pet.color)
|
||||
pet_preview.color = pet.color
|
||||
|
||||
if(length(selected_hat))
|
||||
var/mutable_appearance/our_selected_hat = selected_hat["appearance"]
|
||||
var/mutable_appearance/hat_preview = mutable_appearance(our_selected_hat.icon, our_selected_hat.icon_state)
|
||||
hat_preview.pixel_y = -9 + selected_hat["worn_offset"]
|
||||
var/mutable_appearance/hat_preview = mutable_appearance(our_selected_hat.icon, our_selected_hat.icon_state, appearance_flags = RESET_COLOR|KEEP_APART)
|
||||
hat_preview.pixel_z = -9 + selected_hat["worn_offset"]
|
||||
var/list/spec_hat = special_hat_placement[selected_hat["type"]]?["south"]
|
||||
if(spec_hat)
|
||||
hat_preview.pixel_w += spec_hat[1]
|
||||
hat_preview.pixel_z += spec_hat[2]
|
||||
hat_preview.appearance_flags = RESET_COLOR
|
||||
pet_preview.add_overlay(hat_preview)
|
||||
|
||||
profile_picture = getFlatIcon(pet_preview, no_anim = TRUE)
|
||||
@@ -504,7 +505,7 @@ GLOBAL_LIST_EMPTY(virtual_pets_list)
|
||||
else
|
||||
selected_hat["type"] = chosen_type
|
||||
var/state_to_use = initial(chosen_type.worn_icon_state) || initial(chosen_type.icon_state)
|
||||
var/mutable_appearance/selected_hat_appearance = mutable_appearance(initial(chosen_type.worn_icon), state_to_use, appearance_flags = RESET_COLOR)
|
||||
var/mutable_appearance/selected_hat_appearance = mutable_appearance(initial(chosen_type.worn_icon), state_to_use, appearance_flags = RESET_COLOR|KEEP_APART)
|
||||
selected_hat["worn_offset"] = initial(chosen_type.worn_y_offset)
|
||||
var/list/scale_list = special_hat_placement[chosen_type]?["scale"]
|
||||
if(scale_list)
|
||||
@@ -584,7 +585,7 @@ GLOBAL_LIST_EMPTY(virtual_pets_list)
|
||||
announce_global_updates(message = "has found a chocolate at [selected_area.name]")
|
||||
selected_area = null
|
||||
var/obj/item/food/virtual_chocolate/chocolate = new(get_turf(computer))
|
||||
chocolate.AddElement(/datum/element/temporary_atom, life_time = 30 SECONDS) //we cant maintain its existence for too long!
|
||||
chocolate.fade_into_nothing(life_time = 30 SECONDS) //we cant maintain its existence for too long!
|
||||
|
||||
/datum/computer_file/program/virtual_pet/proc/recall_pet(mob/living/friend)
|
||||
animate(pet, transform = matrix().Scale(0.3, 0.3), time = 1.5 SECONDS)
|
||||
|
||||
Reference in New Issue
Block a user