mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
Merge remote-tracking branch 'upstream/master' into BEPISQOL
This commit is contained in:
@@ -4,14 +4,15 @@
|
||||
icon_state = "timer"
|
||||
custom_materials = list(/datum/material/iron=500, /datum/material/glass=50)
|
||||
attachable = TRUE
|
||||
|
||||
drop_sound = 'sound/items/handling/component_drop.ogg'
|
||||
pickup_sound = 'sound/items/handling/component_pickup.ogg'
|
||||
var/ui_x = 275
|
||||
var/ui_y = 115
|
||||
var/timing = FALSE
|
||||
var/time = 5
|
||||
var/saved_time = 5
|
||||
var/loop = FALSE
|
||||
var/hearing_range = 3
|
||||
drop_sound = 'sound/items/handling/component_drop.ogg'
|
||||
pickup_sound = 'sound/items/handling/component_pickup.ogg'
|
||||
|
||||
/obj/item/assembly/timer/suicide_act(mob/living/user)
|
||||
user.visible_message("<span class='suicide'>[user] looks at the timer and decides [user.p_their()] fate! It looks like [user.p_theyre()] going to commit suicide!</span>")
|
||||
@@ -43,7 +44,6 @@
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/assembly/timer/toggle_secure()
|
||||
secured = !secured
|
||||
if(secured)
|
||||
@@ -54,7 +54,6 @@
|
||||
update_icon()
|
||||
return secured
|
||||
|
||||
|
||||
/obj/item/assembly/timer/proc/timer_end()
|
||||
if(!secured || next_activate > world.time)
|
||||
return FALSE
|
||||
@@ -68,7 +67,6 @@
|
||||
timing = TRUE
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/assembly/timer/process()
|
||||
if(!timing)
|
||||
return
|
||||
@@ -78,7 +76,6 @@
|
||||
timer_end()
|
||||
time = saved_time
|
||||
|
||||
|
||||
/obj/item/assembly/timer/update_icon()
|
||||
cut_overlays()
|
||||
attached_overlays = list()
|
||||
@@ -88,48 +85,44 @@
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
|
||||
|
||||
/obj/item/assembly/timer/ui_interact(mob/user)//TODO: Have this use the wires
|
||||
. = ..()
|
||||
/obj/item/assembly/timer/ui_status(mob/user)
|
||||
if(is_secured(user))
|
||||
var/second = time % 60
|
||||
var/minute = (time - second) / 60
|
||||
var/dat = "<TT><B>Timing Unit</B></TT>"
|
||||
dat += "<BR>[(timing ? "<A href='?src=[REF(src)];time=0'>Timing</A>" : "<A href='?src=[REF(src)];time=1'>Not Timing</A>")] [minute]:[second]"
|
||||
dat += "<BR><A href='?src=[REF(src)];tp=-30'>-</A> <A href='?src=[REF(src)];tp=-1'>-</A> <A href='?src=[REF(src)];tp=1'>+</A> <A href='?src=[REF(src)];tp=30'>+</A>"
|
||||
dat += "<BR><BR><A href='?src=[REF(src)];repeat=[(loop ? "0'>Stop repeating" : "1'>Set to repeat")]</A>"
|
||||
dat += "<BR><BR><A href='?src=[REF(src)];refresh=1'>Refresh</A>"
|
||||
dat += "<BR><BR><A href='?src=[REF(src)];close=1'>Close</A>"
|
||||
var/datum/browser/popup = new(user, "timer", name)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
return ..()
|
||||
return UI_CLOSE
|
||||
|
||||
/obj/item/assembly/timer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "timer", name, ui_x, ui_y, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/assembly/timer/Topic(href, href_list)
|
||||
..()
|
||||
if(!usr.canUseTopic(src, BE_CLOSE))
|
||||
usr << browse(null, "window=timer")
|
||||
onclose(usr, "timer")
|
||||
/obj/item/assembly/timer/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
var/time_left = time
|
||||
data["seconds"] = round(time_left % 60)
|
||||
data["minutes"] = round((time_left - data["seconds"]) / 60)
|
||||
data["timing"] = timing
|
||||
data["loop"] = loop
|
||||
return data
|
||||
|
||||
/obj/item/assembly/timer/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(href_list["time"])
|
||||
timing = text2num(href_list["time"])
|
||||
if(timing && istype(holder, /obj/item/transfer_valve))
|
||||
log_bomber(usr, "activated a", src, "attachment on [holder]")
|
||||
|
||||
update_icon()
|
||||
if(href_list["repeat"])
|
||||
loop = text2num(href_list["repeat"])
|
||||
|
||||
if(href_list["tp"])
|
||||
var/tp = text2num(href_list["tp"])
|
||||
time += tp
|
||||
time = min(max(round(time), 1), 600)
|
||||
saved_time = time
|
||||
|
||||
if(href_list["close"])
|
||||
usr << browse(null, "window=timer")
|
||||
return
|
||||
|
||||
if(usr)
|
||||
attack_self(usr)
|
||||
switch(action)
|
||||
if("time")
|
||||
timing = !timing
|
||||
if(timing && istype(holder, /obj/item/transfer_valve))
|
||||
log_bomber(usr, "activated a", src, "attachment on [holder]")
|
||||
update_icon()
|
||||
. = TRUE
|
||||
if("repeat")
|
||||
loop = !loop
|
||||
. = TRUE
|
||||
if("input")
|
||||
var/value = text2num(params["adjust"])
|
||||
if(value)
|
||||
time = min(max(round(time+value), 1), 600)
|
||||
saved_time = time
|
||||
. = TRUE
|
||||
|
||||
@@ -46,7 +46,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
key_bindings = (hotkeys) ? deepCopyList(GLOB.hotkey_keybinding_list_by_key) : deepCopyList(GLOB.classic_keybinding_list_by_key)
|
||||
parent.update_movement_keys(src)
|
||||
to_chat(parent, "<span class='userdanger'>Empty keybindings, setting default to [hotkeys ? "Hotkey" : "Classic"] mode</span>")
|
||||
|
||||
|
||||
if(current_version < 30)
|
||||
if(clientfps == 0)
|
||||
clientfps = 60
|
||||
@@ -329,6 +329,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["backpack"] >> backpack
|
||||
S["jumpsuit_style"] >> jumpsuit_style
|
||||
S["uplink_loc"] >> uplink_spawn_loc
|
||||
S["phobia"] >> phobia
|
||||
S["randomise"] >> randomise
|
||||
S["feature_mcolor"] >> features["mcolor"]
|
||||
S["feature_ethcolor"] >> features["ethcolor"]
|
||||
@@ -468,6 +469,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
WRITE_FILE(S["uplink_loc"] , uplink_spawn_loc)
|
||||
WRITE_FILE(S["randomise"] , randomise)
|
||||
WRITE_FILE(S["species"] , pref_species.id)
|
||||
WRITE_FILE(S["phobia"], phobia)
|
||||
WRITE_FILE(S["feature_mcolor"] , features["mcolor"])
|
||||
WRITE_FILE(S["feature_ethcolor"] , features["ethcolor"])
|
||||
WRITE_FILE(S["feature_lizard_tail"] , features["tail_lizard"])
|
||||
|
||||
@@ -232,8 +232,9 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
|
||||
var/list/msg = list("([timestamp]) <b>[machine_name]</b> in [area_name]<br>[action] [abs(amount)]x [noun]<br>")
|
||||
var/sep = ""
|
||||
for(var/key in materials)
|
||||
var/datum/material/M = key
|
||||
var/val = round(materials[key]) / MINERAL_MATERIAL_AMOUNT
|
||||
msg += sep
|
||||
sep = ", "
|
||||
msg += "[amount < 0 ? "-" : "+"][val] [copytext(key, length(key[1]) + 1)]"
|
||||
msg += "[amount < 0 ? "-" : "+"][val] [M.name]"
|
||||
formatted = msg.Join()
|
||||
|
||||
@@ -111,11 +111,19 @@
|
||||
return
|
||||
|
||||
/obj/machinery/rnd/bepis/proc/calcsuccess()
|
||||
var/turf/dropturf = get_turf(pick(view(1,src)))
|
||||
var/turf/dropturf = null
|
||||
var/gauss_major = 0
|
||||
var/gauss_minor = 0
|
||||
var/gauss_real = 0
|
||||
if(!dropturf) //Check to verify the turf exists and the reward isn't lost somehow.
|
||||
var/list/turfs = block(locate(x-1,y-1,z),locate(x+1,y+1,z)) //NO MORE DISCS IN WINDOWS
|
||||
while(length(turfs))
|
||||
var/turf/T = pick_n_take(turfs)
|
||||
if(is_blocked_turf(T, exclude_mobs=TRUE))
|
||||
continue
|
||||
else
|
||||
dropturf = T
|
||||
break
|
||||
if (!dropturf)
|
||||
dropturf = drop_location()
|
||||
gauss_major = (gaussian(major_threshold, std) - negative_cash_offset) //This is the randomized profit value that this experiment has to surpass to unlock a tech.
|
||||
gauss_minor = (gaussian(minor_threshold, std) - negative_cash_offset) //And this is the threshold to instead get a minor prize.
|
||||
|
||||
@@ -1082,6 +1082,10 @@
|
||||
description = "A bored scientist was thinking to himself for very long...and then realized his coffee got cold! He made this invention to solve this extreme problem."
|
||||
prereq_ids = list("base")
|
||||
design_ids = list("mauna_mug")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
|
||||
export_price = 2500
|
||||
hidden = TRUE
|
||||
experimental = TRUE
|
||||
|
||||
/datum/techweb_node/spec_eng
|
||||
id = "spec_eng"
|
||||
|
||||
@@ -552,7 +552,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
school = "restoration"
|
||||
sound = 'sound/magic/staff_healing.ogg'
|
||||
|
||||
/obj/effect/proc_holder/spell/self/basic_heal/cast(mob/living/carbon/human/user) //Note the lack of "list/targets" here. Instead, use a "user" var depending on mob requirements.
|
||||
/obj/effect/proc_holder/spell/self/basic_heal/cast(list/targets, mob/living/carbon/human/user) //Note the lack of "list/targets" here. Instead, use a "user" var depending on mob requirements.
|
||||
//Also, notice the lack of a "for()" statement that looks through the targets. This is, again, because the spell can only have a single target.
|
||||
user.visible_message("<span class='warning'>A wreath of gentle light passes over [user]!</span>", "<span class='notice'>You wreath yourself in healing light!</span>")
|
||||
user.adjustBruteLoss(-10)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
action_icon = 'icons/mob/actions/actions_spells.dmi'
|
||||
action_icon_state = "soultap"
|
||||
|
||||
/obj/effect/proc_holder/spell/self/tap/cast(mob/living/user = usr)
|
||||
/obj/effect/proc_holder/spell/self/tap/cast(list/targets, mob/living/user = usr)
|
||||
if(!user.mind.hasSoul)
|
||||
to_chat(user, "<span class='warning'>You do not possess a soul to tap into!</span>")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user