Merge branch 'wound-port' of https://github.com/timothyteakettle/Citadel-Station-13 into wound-port
This commit is contained in:
@@ -249,7 +249,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/spritesheet/pipes)
|
||||
assets.send(user)
|
||||
|
||||
ui = new(user, src, ui_key, "rpd", name, 425, 472, master_ui, state)
|
||||
ui = new(user, src, ui_key, "RapidPipeDispenser", name, 425, 515, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/pipe_dispenser/ui_data(mob/user)
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
switch(var_name)
|
||||
if("assignment","registered_name")
|
||||
if(NAMEOF(src, assignment),NAMEOF(src, registered_name)) //,NAMEOF(src, registered_age))
|
||||
update_label()
|
||||
|
||||
/obj/item/card/id/attack_self(mob/user)
|
||||
@@ -280,7 +280,7 @@
|
||||
total += physical_money.get_item_credit_value()
|
||||
CHECK_TICK
|
||||
|
||||
registered_account.adjust_money(total)
|
||||
registered_account.adjust_money(total)
|
||||
|
||||
QDEL_LIST(money)
|
||||
|
||||
|
||||
@@ -53,32 +53,32 @@
|
||||
|
||||
/obj/item/chromosome/stabilizer
|
||||
name = "stabilizer chromosome"
|
||||
desc = "A chromosome that adjusts to the body to reduce genetic damage by 20%."
|
||||
desc = "A chromosome that reduces mutation instability by 20%."
|
||||
icon_state = "stabilizer"
|
||||
stabilizer_coeff = 0.8
|
||||
weight = 1
|
||||
|
||||
/obj/item/chromosome/synchronizer
|
||||
name = "synchronizer chromosome"
|
||||
desc = "A chromosome that gives the mind more controle over the mutation, reducing knockback and downsides by 50%."
|
||||
desc = "A chromosome that reduces mutation knockback and downsides by 50%."
|
||||
icon_state = "synchronizer"
|
||||
synchronizer_coeff = 0.5
|
||||
|
||||
/obj/item/chromosome/power
|
||||
name = "power chromosome"
|
||||
desc = "A power chromosome for boosting certain mutation's power by 50%."
|
||||
desc = "A chromosome that increases mutation power by 50%."
|
||||
icon_state = "power"
|
||||
power_coeff = 1.5
|
||||
|
||||
/obj/item/chromosome/energy
|
||||
name = "energetic chromosome"
|
||||
desc = "A chromosome that reduces cooldown on action based mutations by 50%."
|
||||
desc = "A chromosome that reduces action based mutation cooldowns by by 50%."
|
||||
icon_state = "energy"
|
||||
energy_coeff = 0.5
|
||||
|
||||
/obj/item/chromosome/reinforcer
|
||||
name = "reinforcement chromosome"
|
||||
desc = "Renders the mutation immune to mutadone."
|
||||
desc = "A chromosome that renders mutations immune to mutadone."
|
||||
icon_state = "reinforcer"
|
||||
weight = 3
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "crayon", name, 600, 600,
|
||||
ui = new(user, src, ui_key, "Crayon", name, 600, 600,
|
||||
master_ui, state)
|
||||
ui.open()
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "intellicard", name, 500, 500, master_ui, state)
|
||||
ui = new(user, src, ui_key, "Intellicard", name, 500, 500, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/aicard/ui_data()
|
||||
|
||||
@@ -76,7 +76,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
// Variable window height, depending on how many GPS units there are
|
||||
// to show, clamped to relatively safe range.
|
||||
var/gps_window_height = clamp(325 + GLOB.GPS_list.len * 14, 325, 700)
|
||||
ui = new(user, src, ui_key, "gps", "Global Positioning System", 470, gps_window_height, master_ui, state) //width, height
|
||||
ui = new(user, src, ui_key, "Gps", "Global Positioning System", 470, gps_window_height, master_ui, state) //width, height
|
||||
ui.open()
|
||||
|
||||
ui.set_autoupdate(state = updating)
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
var/on = TRUE
|
||||
var/shock_cooldown = FALSE
|
||||
|
||||
var/ui_x = 260
|
||||
var/ui_y = 137
|
||||
|
||||
/obj/item/electropack/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] hooks [user.p_them()]self to the electropack and spams the trigger! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (FIRELOSS)
|
||||
@@ -128,22 +131,12 @@
|
||||
if(!ishuman(user))
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<TT>
|
||||
Turned [on ? "On" : "Off"] - <A href='?src=[REF(src)];set=power'>Toggle</A><BR>
|
||||
<B>Frequency/Code</B> for electropack:<BR>
|
||||
Frequency:
|
||||
[format_frequency(src.frequency)]
|
||||
<A href='byond://?src=[REF(src)];set=freq'>Set</A><BR>
|
||||
|
||||
Code:
|
||||
[src.code]
|
||||
<A href='byond://?src=[REF(src)];set=code'>Set</A><BR>
|
||||
</TT>"}
|
||||
user << browse(dat, "window=radio")
|
||||
onclose(user, "radio")
|
||||
return
|
||||
/obj/item/electropack/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "Electropack", name, ui_x, ui_y, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/electropack/shockcollar
|
||||
name = "shock collar"
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
ui_height += 6 + channels.len * 21
|
||||
else
|
||||
ui_height += 24
|
||||
ui = new(user, src, ui_key, "radio", name, ui_width, ui_height, master_ui, state)
|
||||
ui = new(user, src, ui_key, "Radio", name, ui_width, ui_height, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/radio/ui_data(mob/user)
|
||||
|
||||
@@ -76,6 +76,9 @@ effective or pretty fucking useless.
|
||||
var/used = 0 // is it cooling down?
|
||||
var/stealth = FALSE
|
||||
|
||||
var/ui_x = 320
|
||||
var/ui_y = 335
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/attack(mob/living/M, mob/living/user)
|
||||
if(!stealth || !irradiate)
|
||||
..()
|
||||
@@ -111,7 +114,12 @@ effective or pretty fucking useless.
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/ui_interact(mob/user)
|
||||
. = ..()
|
||||
/obj/item/healthanalyzer/rad_laser/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "RadioactiveMicrolaser", "Radioactive Microlaser", ui_x, ui_y, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
var/dat = "Irradiation: <A href='?src=[REF(src)];rad=1'>[irradiate ? "On" : "Off"]</A><br>"
|
||||
dat += "Stealth Mode (NOTE: Deactivates automatically while Irradiation is off): <A href='?src=[REF(src)];stealthy=[TRUE]'>[stealth ? "On" : "Off"]</A><br>"
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
var/mob/attacher = null
|
||||
var/valve_open = FALSE
|
||||
var/toggle = 1
|
||||
var/ui_x = 310
|
||||
var/ui_y = 320
|
||||
|
||||
/obj/item/transfer_valve/IsAssemblyHolder()
|
||||
return TRUE
|
||||
@@ -235,3 +237,52 @@
|
||||
// eventually maybe have it update icon to show state (timer, prox etc.) like old bombs
|
||||
/obj/item/transfer_valve/proc/c_state()
|
||||
return
|
||||
|
||||
/obj/item/transfer_valve/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "TransferValve", name, ui_x, ui_y, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/transfer_valve/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["tank_one"] = tank_one
|
||||
data["tank_two"] = tank_two
|
||||
data["attached_device"] = attached_device
|
||||
data["valve"] = valve_open
|
||||
return data
|
||||
|
||||
/obj/item/transfer_valve/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
|
||||
switch(action)
|
||||
if("tankone")
|
||||
if(tank_one)
|
||||
split_gases()
|
||||
valve_open = FALSE
|
||||
tank_one.forceMove(drop_location())
|
||||
tank_one = null
|
||||
. = TRUE
|
||||
if("tanktwo")
|
||||
if(tank_two)
|
||||
split_gases()
|
||||
valve_open = FALSE
|
||||
tank_two.forceMove(drop_location())
|
||||
tank_two = null
|
||||
. = TRUE
|
||||
if("toggle")
|
||||
toggle_valve()
|
||||
. = TRUE
|
||||
if("device")
|
||||
if(attached_device)
|
||||
attached_device.attack_self(usr)
|
||||
. = TRUE
|
||||
if("remove_device")
|
||||
if(attached_device)
|
||||
attached_device.on_detach()
|
||||
attached_device = null
|
||||
. = TRUE
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "eightball", name, 400, 600, master_ui, state)
|
||||
ui = new(user, src, ui_key, "EightBallVote", name, 400, 600, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/toy/eightball/haunted/ui_data(mob/user)
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "gangtool-blue"
|
||||
item_state = "radio"
|
||||
var/list/stored_options
|
||||
var/force_refresh = FALSE //if set to true, the beacon will recalculate its display options whenever opened
|
||||
|
||||
/obj/item/choice_beacon/attack_self(mob/user)
|
||||
if(canUseBeacon(user))
|
||||
@@ -34,14 +36,15 @@
|
||||
return FALSE
|
||||
|
||||
/obj/item/choice_beacon/proc/generate_options(mob/living/M)
|
||||
var/list/display_names = generate_display_names()
|
||||
if(!display_names.len)
|
||||
if(!stored_options || force_refresh)
|
||||
stored_options = generate_display_names()
|
||||
if(!stored_options.len)
|
||||
return
|
||||
var/choice = input(M,"Which item would you like to order?","Select an Item") as null|anything in display_names
|
||||
var/choice = input(M,"Which item would you like to order?","Select an Item") as null|anything in stored_options
|
||||
if(!choice || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
|
||||
spawn_option(display_names[choice],M)
|
||||
spawn_option(stored_options[choice],M)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/choice_beacon/proc/spawn_option(obj/choice,mob/living/M)
|
||||
@@ -153,6 +156,51 @@
|
||||
new choice(get_turf(M))
|
||||
to_chat(M, "<span class='hear'>You hear something crackle from the beacon for a moment before a voice speaks. \"Please stand by for a message from S.E.L.F. Message as follows: <b>Item request received. Your package has been transported, use the autosurgeon supplied to apply the upgrade.</b> Message ends.\"</span>")
|
||||
|
||||
/obj/item/choice_beacon/box
|
||||
name = "choice box (default)"
|
||||
desc = "Think really hard about what you want, and then rip it open!"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "deliverypackage3"
|
||||
item_state = "deliverypackage3"
|
||||
|
||||
/obj/item/choice_beacon/box/spawn_option(obj/choice,mob/living/M)
|
||||
to_chat(M, "<span class='hear'>The box opens, revealing the [choice]!</span>")
|
||||
playsound(src.loc, 'sound/items/poster_ripped.ogg', 50, 1)
|
||||
M.temporarilyRemoveItemFromInventory(src, TRUE)
|
||||
M.put_in_hands(new choice)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/choice_beacon/box/plushie
|
||||
name = "choice box (plushie)"
|
||||
desc = "Using the power of quantum entanglement, this box contains every plush, until the moment it is opened!"
|
||||
icon = 'icons/obj/plushes.dmi'
|
||||
icon_state = "box"
|
||||
item_state = "box"
|
||||
|
||||
/obj/item/choice_beacon/box/spawn_option(choice,mob/living/M)
|
||||
if(ispath(choice, /obj/item/toy/plush))
|
||||
..() //regular plush, spawn it naturally
|
||||
else
|
||||
//snowflake plush
|
||||
var/obj/item/toy/plush/snowflake_plushie = new(get_turf(M))
|
||||
snowflake_plushie.set_snowflake_from_config(choice)
|
||||
M.temporarilyRemoveItemFromInventory(src, TRUE)
|
||||
M.put_in_hands(new choice)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/choice_beacon/box/plushie/generate_display_names()
|
||||
var/list/plushie_list = list()
|
||||
//plushie set 1: just subtypes of /obj/item/toy/plush
|
||||
var/list/plushies_set_one = subtypesof(/obj/item/toy/plush) - list(/obj/item/toy/plush/narplush, /obj/item/toy/plush/awakenedplushie, /obj/item/toy/plush/random_snowflake, /obj/item/toy/plush/random) //don't allow these special ones (you can still get narplush/hugbox)
|
||||
for(var/V in plushies_set_one)
|
||||
var/atom/A = V
|
||||
plushie_list[initial(A.name)] = A
|
||||
//plushie set 2: snowflake plushies
|
||||
var/list/plushies_set_two = CONFIG_GET(keyed_list/snowflake_plushies)
|
||||
for(var/V in plushies_set_two)
|
||||
plushie_list[V] = V //easiest way to do this which works with how selecting options works, despite being snowflakey to have the key equal the value
|
||||
return plushie_list
|
||||
|
||||
/obj/item/skub
|
||||
desc = "It's skub."
|
||||
name = "skub"
|
||||
|
||||
@@ -746,8 +746,8 @@
|
||||
***********************************************************************/
|
||||
|
||||
/obj/item/weapon/gripper
|
||||
name = "circuit gripper"
|
||||
desc = "A simple grasping tool for inserting circuitboards into machinary."
|
||||
name = "engineering gripper"
|
||||
desc = "A simple grasping tool for interacting with various engineering related items, such as circuits, gas tanks and conveyer belts. Alt click to drop instead of use."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "gripper"
|
||||
|
||||
@@ -755,18 +755,36 @@
|
||||
|
||||
//Has a list of items that it can hold.
|
||||
var/list/can_hold = list(
|
||||
/obj/item/circuitboard
|
||||
/obj/item/circuitboard,
|
||||
/obj/item/light,
|
||||
/obj/item/electronics,
|
||||
/obj/item/tank,
|
||||
/obj/item/conveyor_switch_construct,
|
||||
/obj/item/stack/conveyor,
|
||||
/obj/item/wallframe,
|
||||
/obj/item/vending_refill,
|
||||
/obj/item/stack/sheet,
|
||||
/obj/item/stack/tile,
|
||||
/obj/item/stack/rods,
|
||||
/obj/item/stock_parts
|
||||
)
|
||||
//Basically a blacklist for any subtypes above we dont want
|
||||
var/list/cannot_hold = list(
|
||||
/obj/item/stack/sheet/mineral/plasma,
|
||||
/obj/item/stack/sheet/plasteel
|
||||
)
|
||||
|
||||
var/obj/item/wrapped = null // Item currently being held.
|
||||
|
||||
/obj/item/weapon/gripper/attack_self()
|
||||
//Used to interact with UI's of held items, such as gas tanks and airlock electronics.
|
||||
/obj/item/weapon/gripper/AltClick(mob/user)
|
||||
if(wrapped)
|
||||
wrapped.forceMove(get_turf(wrapped))
|
||||
to_chat(user, "<span class='notice'>You drop the [wrapped].</span>")
|
||||
wrapped = null
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gripper/afterattack(var/atom/target, var/mob/living/user, proximity, params)
|
||||
/obj/item/weapon/gripper/afterattack(var/atom/target, var/mob/living/silicon/robot/user, proximity, params)
|
||||
|
||||
if(!proximity)
|
||||
return
|
||||
@@ -792,18 +810,21 @@
|
||||
return
|
||||
|
||||
else if(istype(target,/obj/item))
|
||||
|
||||
var/obj/item/I = target
|
||||
|
||||
var/grab = 0
|
||||
|
||||
for(var/typepath in can_hold)
|
||||
if(istype(I,typepath))
|
||||
grab = 1
|
||||
break
|
||||
for(var/badpath in cannot_hold)
|
||||
if(istype(I,badpath))
|
||||
if(!user.emagged)
|
||||
grab = 0
|
||||
continue
|
||||
|
||||
//We can grab the item, finally.
|
||||
if(grab)
|
||||
to_chat(user, "You collect \the [I].")
|
||||
to_chat(user, "<span class='notice'>You collect \the [I].</span>")
|
||||
I.loc = src
|
||||
wrapped = I
|
||||
return
|
||||
@@ -812,19 +833,12 @@
|
||||
|
||||
/obj/item/weapon/gripper/mining
|
||||
name = "shelter capsule deployer"
|
||||
desc = "A simple grasping tool for carrying and deploying shelter capsules."
|
||||
desc = "A simple grasping tool for carrying and deploying shelter capsules. Alt click to drop instead of use."
|
||||
icon_state = "gripper_mining"
|
||||
can_hold = list(
|
||||
/obj/item/survivalcapsule
|
||||
)
|
||||
|
||||
/obj/item/weapon/gripper/mining/attack_self()
|
||||
if(wrapped)
|
||||
wrapped.forceMove(get_turf(wrapped))
|
||||
wrapped.attack_self()
|
||||
wrapped = null
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/cyborg
|
||||
name = "cyborg plasma cutter"
|
||||
desc = "A basic variation of the plasma cutter, compressed into a cyborg chassis. Less effective than normal plasma cutters."
|
||||
|
||||
@@ -244,6 +244,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
|
||||
new/datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 20), \
|
||||
new/datum/stack_recipe("rolling pin", /obj/item/kitchen/rollingpin, 2, time = 30), \
|
||||
new/datum/stack_recipe("wooden bucket", /obj/item/reagent_containers/glass/bucket/wood, 2, time = 30), \
|
||||
new/datum/stack_recipe("painting frame", /obj/item/wallframe/painting, 1, time = 10),\
|
||||
new/datum/stack_recipe("wooden buckler", /obj/item/shield/riot/buckler, 20, time = 40), \
|
||||
new/datum/stack_recipe("baseball bat", /obj/item/melee/baseball_bat, 5, time = 15),\
|
||||
null, \
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/obj/item/stack/arcadeticket
|
||||
name = "arcade tickets"
|
||||
desc = "Wow! With enough of these, you could buy a bike! ...Pssh, yeah right."
|
||||
singular_name = "arcade ticket"
|
||||
icon_state = "arcade-ticket"
|
||||
item_state = "tickets"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
max_amount = 30
|
||||
|
||||
/obj/item/stack/arcadeticket/Initialize(mapload, new_amount, merge = TRUE)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/arcadeticket/update_icon()
|
||||
var/amount = get_amount()
|
||||
if((amount >= 12) && (amount > 0))
|
||||
icon_state = "arcade-ticket_4"
|
||||
else if((amount >= 6) && (amount > 0))
|
||||
icon_state = "arcade-ticket_3"
|
||||
else if((amount >= 2) && (amount > 0))
|
||||
icon_state = "arcade-ticket_2"
|
||||
else
|
||||
icon_state = "arcade-ticket"
|
||||
|
||||
/obj/item/stack/arcadeticket/proc/pay_tickets()
|
||||
amount -= 2
|
||||
if (amount == 0)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/arcadeticket/thirty
|
||||
amount = 30
|
||||
@@ -651,3 +651,9 @@ obj/item/storage/backpack/duffelbag/syndie/shredderbundle
|
||||
new /obj/item/gun/ballistic/automatic/flechette/shredder(src)
|
||||
new /obj/item/storage/belt/military(src)
|
||||
new /obj/item/clothing/suit/space/hardsuit/syndi/elite(src)
|
||||
|
||||
/obj/item/storage/backpack/snail
|
||||
name = "snail shell"
|
||||
desc = "Worn by snails as armor and storage compartment."
|
||||
icon_state = "snailshell"
|
||||
item_state = "snailshell"
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "tanks", name, 400, 120, master_ui, state)
|
||||
ui = new(user, src, ui_key, "Tank", name, 400, 120, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/tank/ui_data(mob/user)
|
||||
|
||||
@@ -708,6 +708,92 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
|
||||
item_flags = DROPDEL | ABSTRACT
|
||||
attack_verb = list("bopped")
|
||||
|
||||
/obj/item/circlegame/Initialize()
|
||||
. = ..()
|
||||
var/mob/living/owner = loc
|
||||
if(!istype(owner))
|
||||
return
|
||||
RegisterSignal(owner, COMSIG_PARENT_EXAMINE, .proc/ownerExamined)
|
||||
|
||||
/obj/item/circlegame/Destroy()
|
||||
var/mob/owner = loc
|
||||
if(istype(owner))
|
||||
UnregisterSignal(owner, COMSIG_PARENT_EXAMINE)
|
||||
return ..()
|
||||
|
||||
/obj/item/circlegame/dropped(mob/user)
|
||||
UnregisterSignal(user, COMSIG_PARENT_EXAMINE) //loc will have changed by the time this is called, so Destroy() can't catch it
|
||||
// this is a dropdel item.
|
||||
return ..()
|
||||
|
||||
/// Stage 1: The mistake is made
|
||||
/obj/item/circlegame/proc/ownerExamined(mob/living/owner, mob/living/sucker)
|
||||
if(!istype(sucker) || !in_range(owner, sucker))
|
||||
return
|
||||
addtimer(CALLBACK(src, .proc/waitASecond, owner, sucker), 4)
|
||||
|
||||
/// Stage 2: Fear sets in
|
||||
/obj/item/circlegame/proc/waitASecond(mob/living/owner, mob/living/sucker)
|
||||
if(QDELETED(sucker) || QDELETED(src) || QDELETED(owner))
|
||||
return
|
||||
|
||||
if(owner == sucker) // big mood
|
||||
to_chat(owner, "<span class='danger'>Wait a second... you just looked at your own [src.name]!</span>")
|
||||
addtimer(CALLBACK(src, .proc/selfGottem, owner), 10)
|
||||
else
|
||||
to_chat(sucker, "<span class='danger'>Wait a second... was that a-</span>")
|
||||
addtimer(CALLBACK(src, .proc/GOTTEM, owner, sucker), 6)
|
||||
|
||||
/// Stage 3A: We face our own failures
|
||||
/obj/item/circlegame/proc/selfGottem(mob/living/owner)
|
||||
if(QDELETED(src) || QDELETED(owner))
|
||||
return
|
||||
|
||||
playsound(get_turf(owner), 'sound/effects/hit_punch.ogg', 50, TRUE, -1)
|
||||
owner.visible_message("<span class='danger'>[owner] shamefully bops [owner.p_them()]self with [owner.p_their()] [src.name].</span>", "<span class='userdanger'>You shamefully bop yourself with your [src.name].</span>", \
|
||||
"<span class='hear'>You hear a dull thud!</span>")
|
||||
log_combat(owner, owner, "bopped", src.name, "(self)")
|
||||
owner.do_attack_animation(owner)
|
||||
owner.apply_damage(100, STAMINA)
|
||||
owner.Knockdown(10)
|
||||
qdel(src)
|
||||
|
||||
/// Stage 3B: We face our reckoning (unless we moved away or they're incapacitated)
|
||||
/obj/item/circlegame/proc/GOTTEM(mob/living/owner, mob/living/sucker)
|
||||
if(QDELETED(sucker))
|
||||
return
|
||||
|
||||
if(QDELETED(src) || QDELETED(owner))
|
||||
to_chat(sucker, "<span class='warning'>Nevermind... must've been your imagination...</span>")
|
||||
return
|
||||
|
||||
if(!in_range(owner, sucker) || !(owner.mobility_flags & MOBILITY_USE))
|
||||
to_chat(sucker, "<span class='notice'>Phew... you moved away before [owner] noticed you saw [owner.p_their()] [src.name]...</span>")
|
||||
return
|
||||
|
||||
to_chat(owner, "<span class='warning'>[sucker] looks down at your [src.name] before trying to avert [sucker.p_their()] eyes, but it's too late!</span>")
|
||||
to_chat(sucker, "<span class='danger'><b>[owner] sees the fear in your eyes as you try to look away from [owner.p_their()] [src.name]!</b></span>")
|
||||
|
||||
playsound(get_turf(owner), 'sound/effects/hit_punch.ogg', 50, TRUE, -1)
|
||||
owner.do_attack_animation(sucker)
|
||||
|
||||
if(HAS_TRAIT(owner, TRAIT_HULK))
|
||||
owner.visible_message("<span class='danger'>[owner] bops [sucker] with [owner.p_their()] [src.name] much harder than intended, sending [sucker.p_them()] flying!</span>", \
|
||||
"<span class='danger'>You bop [sucker] with your [src.name] much harder than intended, sending [sucker.p_them()] flying!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", ignored_mobs=list(sucker))
|
||||
to_chat(sucker, "<span class='userdanger'>[owner] bops you incredibly hard with [owner.p_their()] [src.name], sending you flying!</span>")
|
||||
sucker.apply_damage(50, STAMINA)
|
||||
sucker.Knockdown(50)
|
||||
log_combat(owner, sucker, "bopped", src.name, "(setup- Hulk)")
|
||||
var/atom/throw_target = get_edge_target_turf(sucker, owner.dir)
|
||||
sucker.throw_at(throw_target, 6, 3, owner)
|
||||
else
|
||||
owner.visible_message("<span class='danger'>[owner] bops [sucker] with [owner.p_their()] [src.name]!</span>", "<span class='danger'>You bop [sucker] with your [src.name]!</span>", \
|
||||
"<span class='hear'>You hear a dull thud!</span>", ignored_mobs=list(sucker))
|
||||
sucker.apply_damage(15, STAMINA)
|
||||
log_combat(owner, sucker, "bopped", src.name, "(setup)")
|
||||
to_chat(sucker, "<span class='userdanger'>[owner] bops you with [owner.p_their()] [src.name]!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/slapper
|
||||
name = "slapper"
|
||||
desc = "This is how real men fight."
|
||||
|
||||
@@ -42,13 +42,9 @@
|
||||
if("anchored")
|
||||
setAnchored(vval)
|
||||
return TRUE
|
||||
if("obj_flags")
|
||||
if(NAMEOF(src, obj_flags))
|
||||
if ((obj_flags & DANGEROUS_POSSESSION) && !(vval & DANGEROUS_POSSESSION))
|
||||
return FALSE
|
||||
if("control_object")
|
||||
var/obj/O = vval
|
||||
if(istype(O) && (O.obj_flags & DANGEROUS_POSSESSION))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/Initialize()
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "canvas", name, ui_x, ui_y, master_ui, state)
|
||||
ui = new(user, src, ui_key, "Canvas", name, ui_x, ui_y, master_ui, state)
|
||||
ui.set_autoupdate(FALSE)
|
||||
ui.open()
|
||||
|
||||
|
||||
@@ -225,7 +225,15 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
GLOB.crematoriums.Add(src)
|
||||
..()
|
||||
|
||||
/obj/structure/bodycontainer/crematorium/update_icon_state()
|
||||
/obj/structure/bodycontainer/crematorium/Initialize()
|
||||
. = ..()
|
||||
connected = new /obj/structure/tray/c_tray(src)
|
||||
connected.connected = src
|
||||
|
||||
/obj/structure/bodycontainer/crematorium/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE)
|
||||
id = "[idnum][id]"
|
||||
|
||||
/obj/structure/bodycontainer/crematorium/update_icon()
|
||||
if(!connected || connected.loc != src)
|
||||
icon_state = "crema0"
|
||||
else
|
||||
|
||||
@@ -71,9 +71,12 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "tank_dispenser", name, 275, 103, master_ui, state)
|
||||
ui = new(user, src, ui_key, "TankDispenser", name, 275, 103, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/structure/tank_dispenser/attack_robot(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/structure/tank_dispenser/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["oxygen"] = oxygentanks
|
||||
|
||||
Reference in New Issue
Block a user