Merge remote-tracking branch 'upstream/master' into arconomy

This commit is contained in:
ArcaneMusic
2020-02-25 13:11:56 -05:00
437 changed files with 6416 additions and 4324 deletions
+7 -3
View File
@@ -8,7 +8,7 @@
anchored = TRUE
light_range = 3
var/movechance = 70
var/obj/item/assembly/signaler/anomaly/aSignal
var/obj/item/assembly/signaler/anomaly/aSignal = /obj/item/assembly/signaler/anomaly
var/area/impact_area
var/lifespan = 990
@@ -26,8 +26,7 @@
if (!impact_area)
return INITIALIZE_HINT_QDEL
aSignal = new(src)
aSignal.name = "[name] core"
aSignal = new aSignal(src)
aSignal.code = rand(1,100)
aSignal.anomaly_type = type
@@ -88,6 +87,7 @@
icon_state = "shield2"
density = FALSE
var/boing = 0
aSignal = /obj/item/assembly/signaler/anomaly/grav
/obj/effect/anomaly/grav/anomalyEffect()
..()
@@ -142,6 +142,7 @@
name = "flux wave anomaly"
icon_state = "electricity2"
density = TRUE
aSignal = /obj/item/assembly/signaler/anomaly/flux
var/canshock = FALSE
var/shockdamage = 20
var/explosive = TRUE
@@ -180,6 +181,7 @@
icon = 'icons/obj/projectiles.dmi'
icon_state = "bluespace"
density = TRUE
aSignal = /obj/item/assembly/signaler/anomaly/bluespace
/obj/effect/anomaly/bluespace/anomalyEffect()
..()
@@ -252,6 +254,7 @@
name = "pyroclastic anomaly"
icon_state = "mustard"
var/ticks = 0
aSignal = /obj/item/assembly/signaler/anomaly/pyro
/obj/effect/anomaly/pyro/anomalyEffect()
..()
@@ -295,6 +298,7 @@
name = "vortex anomaly"
icon_state = "bhole3"
desc = "That's a nice station you have there. It'd be a shame if something happened to it."
aSignal = /obj/item/assembly/signaler/anomaly/vortex
/obj/effect/anomaly/bhole/anomalyEffect()
..()
+1 -1
View File
@@ -440,7 +440,7 @@
icon_state = "poster1_legit"
/obj/structure/sign/poster/official/nanotrasen_logo
name = "Nanotrasen Logo"
name = "\improper Nanotrasen logo"
desc = "A poster depicting the Nanotrasen logo."
icon_state = "poster2_legit"
@@ -100,6 +100,9 @@
S.blood_state = blood_state
update_icon()
H.update_inv_shoes()
/atom/effect/decal/cleanable/washed(atom/washer)
. = ..()
qdel(src)
/obj/effect/decal/cleanable/proc/can_bloodcrawl_in()
if((blood_state != BLOOD_STATE_OIL) && (blood_state != BLOOD_STATE_NOT_BLOODY))
@@ -231,3 +231,9 @@
icon = 'icons/obj/objects.dmi'
icon_state = "shards"
color = "#c6f4ff"
/obj/effect/decal/cleanable/wrapping
name = "wrapping shreds"
desc = "Torn pieces of cardboard and paper, left over from a package."
icon = 'icons/obj/objects.dmi'
icon_state = "paper_shreds"
+35 -15
View File
@@ -4,6 +4,9 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
// if true, everyone item when created will have its name changed to be
// more... RPG-like.
GLOBAL_VAR_INIT(stickpocalypse, FALSE) // if true, all non-embeddable items will be able to harmlessly stick to people when thrown
GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to embed in people, takes precedence over stickpocalypse
/obj/item
name = "item"
icon = 'icons/obj/items_and_weapons.dmi'
@@ -85,7 +88,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
mouse_drag_pointer = MOUSE_ACTIVE_POINTER //the icon to indicate this object is being dragged
var/datum/embedding_behavior/embedding
var/list/embedding = NONE
var/flags_cover = 0 //for flags such as GLASSESCOVERSEYES
var/heat = 0
@@ -129,7 +132,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
/obj/item/Initialize()
if (attack_verb)
if(attack_verb)
attack_verb = typelist("attack_verb", attack_verb)
. = ..()
@@ -137,9 +140,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
new path(src)
actions_types = null
if(GLOB.rpg_loot_items)
AddComponent(/datum/component/fantasy)
if(force_string)
item_flags |= FORCE_STRING_OVERRIDE
@@ -149,16 +149,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
if(damtype == "brute")
hitsound = "swing_hit"
if (!embedding)
embedding = getEmbeddingBehavior()
else if (islist(embedding))
embedding = getEmbeddingBehavior(arglist(embedding))
else if (!istype(embedding, /datum/embedding_behavior))
stack_trace("Invalid type [embedding.type] found in .embedding during /obj/item Initialize()")
if(sharpness) //give sharp objects butchering functionality, for consistency
AddComponent(/datum/component/butchering, 80 * toolspeed)
/obj/item/Destroy()
item_flags &= ~DROPDEL //prevent reqdels
if(ismob(loc))
@@ -178,6 +168,28 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
if(B && B.loc == loc)
qdel(src)
/obj/item/ComponentInitialize()
. = ..()
// this proc says it's for initializing components, but we're initializing elements too because it's you and me against the world >:)
if(embedding)
AddElement(/datum/element/embed, embedding)
else if(GLOB.embedpocalypse)
embedding = EMBED_POINTY
AddElement(/datum/element/embed, embedding)
name = "pointy [name]"
else if(GLOB.stickpocalypse)
embedding = EMBED_HARMLESS
AddElement(/datum/element/embed, embedding)
name = "sticky [name]"
if(GLOB.rpg_loot_items)
AddComponent(/datum/component/fantasy)
if(sharpness) //give sharp objects butchering functionality, for consistency
AddComponent(/datum/component/butchering, 80 * toolspeed)
//user: The mob that is suiciding
//damagetype: The type of damage the item will inflict on the user
//BRUTELOSS = 1
@@ -863,3 +875,11 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
/obj/item/proc/doStrip(mob/stripper, mob/owner)
return owner.dropItemToGround(src)
/**
* Does the current embedding var meet the criteria for being harmless? Namely, does it have a pain multiplier and jostle pain mult of 0? If so, return true.
*
*/
/obj/item/proc/is_embed_harmless()
if(embedding)
return (!embedding["pain_mult"] && !embedding["jostle_pain_mult"])
+1 -1
View File
@@ -95,7 +95,7 @@
/obj/item/station_charter/flag
name = "nanotrasen banner"
name = "\improper Nanotrasen banner"
icon = 'icons/obj/banner.dmi'
name_type = "planet"
icon_state = "banner"
+1 -1
View File
@@ -203,7 +203,7 @@
/obj/structure/chrono_field/update_icon()
var/ttk_frame = 1 - (tickstokill / initial(tickstokill))
ttk_frame = CLAMP(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT)
ttk_frame = clamp(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT)
if(ttk_frame != RPpos)
RPpos = ttk_frame
mob_underlay.icon_state = "frame[RPpos]"
@@ -420,7 +420,7 @@
//Supply
/obj/item/circuitboard/computer/bounty
name = "Nanotrasen Bounty Console (Computer Board)"
name = "\improper Nanotrasen Bounty Console (Computer Board)"
icon_state = "supply"
build_path = /obj/machinery/computer/bounty
@@ -702,7 +702,7 @@
if(!new_cost || (loc != user))
to_chat(user, "<span class='warning'>You must hold the circuitboard to change its cost!</span>")
return
custom_cost = CLAMP(round(new_cost, 1), 10, 1000)
custom_cost = clamp(round(new_cost, 1), 10, 1000)
to_chat(user, "<span class='notice'>The cost is now set to [custom_cost].</span>")
/obj/item/circuitboard/machine/medical_kiosk/examine(mob/user)
@@ -883,7 +883,7 @@
if(!new_cloud || (loc != user))
to_chat(user, "<span class='warning'>You must hold the circuitboard to change its Cloud ID!</span>")
return
cloud_id = CLAMP(round(new_cloud, 1), 1, 100)
cloud_id = clamp(round(new_cloud, 1), 1, 100)
/obj/item/circuitboard/machine/public_nanite_chamber/examine(mob/user)
. = ..()
+2 -2
View File
@@ -24,7 +24,7 @@
dumped = TRUE
/obj/structure/checkoutmachine
name = "Nanotrasen Space-Coin Market"
name = "\improper Nanotrasen Space-Coin Market"
desc = "This is good for spacecoin because"
icon = 'icons/obj/money_machine.dmi'
icon_state = "bogdanoff"
@@ -210,7 +210,7 @@
bogdanoff = user
addtimer(CALLBACK(src, .proc/startLaunch), 100)
sound_to_playing_players('sound/items/dump_it.ogg', 20)
deadchat_broadcast("Protocol CRAB-17 has been activated. A space-coin market has been launched at the station!", turf_target = get_turf(src))
deadchat_broadcast("Protocol CRAB-17 has been activated. A space-coin market has been launched at the station!", turf_target = get_turf(src), message_type=DEADCHAT_ANNOUNCEMENT)
/obj/effect/dumpeetTarget/proc/startLaunch()
DF = new /obj/effect/dumpeetFall(drop_location())
+2 -2
View File
@@ -335,8 +335,8 @@
var/clicky
if(click_params && click_params["icon-x"] && click_params["icon-y"])
clickx = CLAMP(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
clicky = CLAMP(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
clickx = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
clicky = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
if(!instant)
to_chat(user, "<span class='notice'>You start drawing a [temp] on the [target.name]...</span>")
+2 -2
View File
@@ -276,7 +276,7 @@
return
/obj/item/defibrillator/compact/combat/loaded/nanotrasen
name = "elite nanotrasen defibrillator"
name = "elite Nanotrasen defibrillator"
desc = "A belt-equipped state-of-the-art defibrillator. Can revive through spacesuits, has an experimental self-recharging battery, and can be utilized in combat via applying the paddles in a disarming or agressive manner."
icon_state = "defibnt" //needs defib inhand sprites
item_state = "defibnt"
@@ -659,7 +659,7 @@
base_icon_state = "syndiepaddles"
/obj/item/twohanded/shockpaddles/syndicate/nanotrasen
name = "elite nanotrasen defibrillator paddles"
name = "elite Nanotrasen defibrillator paddles"
desc = "A pair of paddles used to revive deceased ERT members. They possess both the ability to penetrate armor and to deliver powerful or disabling shocks offensively."
icon_state = "ntpaddles0"
item_state = "ntpaddles0"
@@ -38,7 +38,7 @@
var/new_duration = input(user, "Set the duration (5-300):", "Desynchronizer", duration / 10) as null|num
if(new_duration)
new_duration = new_duration SECONDS
new_duration = CLAMP(new_duration, 50, max_duration)
new_duration = clamp(new_duration, 50, max_duration)
duration = new_duration
to_chat(user, "<span class='notice'>You set the duration to [DisplayTimeText(duration)].</span>")
@@ -276,11 +276,7 @@
STOP_PROCESSING(SSobj, src)
/obj/item/flashlight/flare/ignition_effect(atom/A, mob/user)
if(fuel && on)
. = "<span class='notice'>[user] lights [A] with [src] like a real \
badass.</span>"
else
. = ""
. = fuel && on ? "<span class='notice'>[user] lights [A] with [src] like a real badass.</span>" : ""
/obj/item/flashlight/flare/proc/turn_off()
on = FALSE
@@ -115,7 +115,7 @@
update_icon()
/obj/item/instrument/piano_synth/headphones/spacepods
name = "nanotrasen space pods"
name = "\improper Nanotrasen space pods"
desc = "Flex your money, AND ignore what everyone else says, all at once!"
icon_state = "spacepods"
item_state = "spacepods"
@@ -165,7 +165,7 @@
// Negative numbers will subtract
/obj/item/lightreplacer/proc/AddUses(amount = 1)
uses = CLAMP(uses + amount, 0, max_uses)
uses = clamp(uses + amount, 0, max_uses)
/obj/item/lightreplacer/proc/AddShards(amount = 1, user)
bulb_shards += amount
@@ -10,23 +10,25 @@
slot_flags = ITEM_SLOT_BACK
w_class = WEIGHT_CLASS_HUGE
custom_materials = list(/datum/material/iron=10000, /datum/material/glass=2500)
var/ui_x = 260
var/ui_y = 137
var/on = TRUE
var/code = 2
var/frequency = FREQ_ELECTROPACK
var/shock_cooldown = 0
/obj/item/electropack/suicide_act(mob/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)
var/shock_cooldown = FALSE
/obj/item/electropack/Initialize()
. = ..()
SSradio.add_object(src, frequency, RADIO_SIGNALER)
set_frequency(frequency)
/obj/item/electropack/Destroy()
SSradio.remove_object(src, frequency)
return ..()
/obj/item/electropack/suicide_act(mob/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)
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/electropack/attack_hand(mob/user)
if(iscarbon(user))
@@ -56,55 +58,15 @@
else
return ..()
/obj/item/electropack/Topic(href, href_list)
//..()
var/mob/living/carbon/C = usr
if(usr.stat || usr.restrained() || C.back == src)
return
if((ishuman(usr) && usr.contents.Find(src)) || usr.contents.Find(master) || (in_range(src, usr) && isturf(loc)))
usr.set_machine(src)
if(href_list["freq"])
SSradio.remove_object(src, frequency)
frequency = sanitize_frequency(frequency + text2num(href_list["freq"]))
SSradio.add_object(src, frequency, RADIO_SIGNALER)
else
if(href_list["code"])
code += text2num(href_list["code"])
code = round(code)
code = min(100, code)
code = max(1, code)
else
if(href_list["power"])
on = !( on )
icon_state = "electropack[on]"
if(!( master ))
if(ismob(loc))
attack_self(loc)
else
for(var/mob/M in viewers(1, src))
if(M.client)
attack_self(M)
else
if(ismob(master.loc))
attack_self(master.loc)
else
for(var/mob/M in viewers(1, master))
if(M.client)
attack_self(M)
else
usr << browse(null, "window=radio")
return
return
/obj/item/electropack/receive_signal(datum/signal/signal)
if(!signal || signal.data["code"] != code)
return
if(isliving(loc) && on)
if(shock_cooldown != 0)
if(shock_cooldown)
return
shock_cooldown = 1
addtimer(VARSET_CALLBACK(src, shock_cooldown, 0), 100)
shock_cooldown = TRUE
addtimer(VARSET_CALLBACK(src, shock_cooldown, FALSE), 100)
var/mob/living/L = loc
step(L, pick(GLOB.cardinals))
@@ -117,28 +79,63 @@
if(master)
master.receive_signal()
return
/obj/item/electropack/attack_self(mob/user)
/obj/item/electropack/proc/set_frequency(new_frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
SSradio.add_object(src, frequency, RADIO_SIGNALER)
if(!ishuman(user))
/obj/item/electropack/ui_status(mob/user)
var/mob/living/carbon/C = user
if(C?.back == src)
return UI_CLOSE
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.default_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/ui_data(mob/user)
var/list/data = list()
data["power"] = on
data["frequency"] = frequency
data["code"] = code
data["minFrequency"] = MIN_FREE_FREQ
data["maxFrequency"] = MAX_FREE_FREQ
return data
/obj/item/electropack/ui_act(action, params)
if(..())
return
user.set_machine(src)
var/dat = {"<TT>Turned [on ? "On" : "Off"] -
<A href='?src=[REF(src)];power=1'>Toggle</A><BR>
<B>Frequency/Code</B> for electropack:<BR>
Frequency:
<A href='byond://?src=[REF(src)];freq=-10'>-</A>
<A href='byond://?src=[REF(src)];freq=-2'>-</A> [format_frequency(frequency)]
<A href='byond://?src=[REF(src)];freq=2'>+</A>
<A href='byond://?src=[REF(src)];freq=10'>+</A><BR>
Code:
<A href='byond://?src=[REF(src)];code=-5'>-</A>
<A href='byond://?src=[REF(src)];code=-1'>-</A> [code]
<A href='byond://?src=[REF(src)];code=1'>+</A>
<A href='byond://?src=[REF(src)];code=5'>+</A><BR>
</TT>"}
user << browse(dat, "window=radio")
onclose(user, "radio")
return
var/mob/living/carbon/C = usr
if(C?.back == src)
return
switch(action)
if("power")
on = !on
icon_state = "electropack[on]"
. = TRUE
if("freq")
var/value = unformat_frequency(params["freq"])
if(value)
frequency = sanitize_frequency(value, TRUE)
set_frequency(frequency)
. = TRUE
if("code")
var/value = text2num(params["code"])
if(value)
value = round(value)
code = clamp(value, 1, 100)
. = TRUE
if("reset")
if(params["reset"] == "freq")
frequency = initial(frequency)
. = TRUE
else if(params["reset"] == "code")
code = initial(code)
. = TRUE
@@ -250,7 +250,7 @@ effective or pretty fucking useless.
charge = max(0,charge - 25)//Quick decrease in light
else
charge = min(max_charge,charge + 50) //Charge in the dark
animate(user,alpha = CLAMP(255 - charge,0,255),time = 10)
animate(user,alpha = clamp(255 - charge,0,255),time = 10)
/obj/item/jammer
@@ -7,12 +7,14 @@
righthand_file = 'icons/mob/inhands/weapons/bombs_righthand.dmi'
desc = "Regulates the transfer of air between two tanks."
w_class = WEIGHT_CLASS_BULKY
var/ui_x = 310
var/ui_y = 320
var/obj/item/tank/tank_one
var/obj/item/tank/tank_two
var/obj/item/assembly/attached_device
var/mob/attacher = null
var/valve_open = FALSE
var/toggle = 1
var/toggle = TRUE
/obj/item/transfer_valve/IsAssemblyHolder()
return TRUE
@@ -54,7 +56,7 @@
attacher = user
return
//Attached device memes
//These keep attached devices synced up, for example a TTV with a mouse trap being found in a bag so it's triggered, or moving the TTV with an infrared beam sensor to update the beam's direction.
/obj/item/transfer_valve/Move()
. = ..()
if(attached_device)
@@ -74,58 +76,14 @@
if(attached_device)
attached_device.Crossed(AM)
/obj/item/transfer_valve/attack_hand()//Triggers mousetraps
//Triggers mousetraps
/obj/item/transfer_valve/attack_hand()
. = ..()
if(.)
return
if(attached_device)
attached_device.attack_hand()
//These keep attached devices synced up, for example a TTV with a mouse trap being found in a bag so it's triggered, or moving the TTV with an infrared beam sensor to update the beam's direction.
/obj/item/transfer_valve/attack_self(mob/user)
user.set_machine(src)
var/dat = {"<B> Valve properties: </B>
<BR> <B> Attachment one:</B> [tank_one] [tank_one ? "<A href='?src=[REF(src)];tankone=1'>Remove</A>" : ""]
<BR> <B> Attachment two:</B> [tank_two] [tank_two ? "<A href='?src=[REF(src)];tanktwo=1'>Remove</A>" : ""]
<BR> <B> Valve attachment:</B> [attached_device ? "<A href='?src=[REF(src)];device=1'>[attached_device]</A>" : "None"] [attached_device ? "<A href='?src=[REF(src)];rem_device=1'>Remove</A>" : ""]
<BR> <B> Valve status: </B> [ valve_open ? "<A href='?src=[REF(src)];open=1'>Closed</A> <B>Open</B>" : "<B>Closed</B> <A href='?src=[REF(src)];open=1'>Open</A>"]"}
var/datum/browser/popup = new(user, "trans_valve", name)
popup.set_content(dat)
popup.open()
return
/obj/item/transfer_valve/Topic(href, href_list)
..()
if(!usr.canUseTopic(src, BE_CLOSE))
return
if(tank_one && href_list["tankone"])
split_gases()
valve_open = FALSE
tank_one.forceMove(drop_location())
tank_one = null
update_icon()
else if(tank_two && href_list["tanktwo"])
split_gases()
valve_open = FALSE
tank_two.forceMove(drop_location())
tank_two = null
update_icon()
else if(href_list["open"])
toggle_valve()
else if(attached_device)
if(href_list["rem_device"])
attached_device.on_detach()
attached_device = null
update_icon()
if(href_list["device"])
attached_device.attack_self(usr)
attack_self(usr)
add_fingerprint(usr)
/obj/item/transfer_valve/proc/process_activation(obj/item/D)
if(toggle)
toggle = FALSE
@@ -186,11 +144,10 @@
tank_one.air_contents.merge(temp)
tank_two.air_contents.volume -= tank_one.air_contents.volume
/*
/*
Exadv1: I know this isn't how it's going to work, but this was just to check
it explodes properly when it gets a signal (and it does).
*/
*/
/obj/item/transfer_valve/proc/toggle_valve()
if(!valve_open && tank_one && tank_two)
valve_open = TRUE
@@ -216,7 +173,6 @@
admin_bomber_message = " - Last touched by: [ADMIN_LOOKUPFLW(bomber)]"
bomber_message = " - Last touched by: [key_name_admin(bomber)]"
var/admin_bomb_message = "Bomb valve opened in [ADMIN_VERBOSEJMP(bombturf)][admin_attachment_message][admin_bomber_message]"
GLOB.bombers += admin_bomb_message
message_admins(admin_bomb_message)
@@ -230,8 +186,58 @@
split_gases()
valve_open = FALSE
update_icon()
// this doesn't do anything but the timer etc. expects it to be here
// eventually maybe have it update icon to show state (timer, prox etc.) like old bombs
/*
This doesn't do anything but the timer etc. expects it to be here
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.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "transfer_valve", 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()
+1 -1
View File
@@ -189,7 +189,7 @@ obj/item/dice/d6/ebony
/obj/item/dice/proc/diceroll(mob/user)
result = roll(sides)
if(rigged != DICE_NOT_RIGGED && result != rigged_value)
if(rigged == DICE_BASICALLY_RIGGED && prob(CLAMP(1/(sides - 1) * 100, 25, 80)))
if(rigged == DICE_BASICALLY_RIGGED && prob(clamp(1/(sides - 1) * 100, 25, 80)))
result = rigged_value
else if(rigged == DICE_TOTALLY_RIGGED)
result = rigged_value
@@ -273,7 +273,7 @@
var/newspread = text2num(stripped_input(user, "Please enter a new spread amount", name))
if (newspread != null && user.canUseTopic(src, BE_CLOSE))
newspread = round(newspread)
unit_spread = CLAMP(newspread, 5, 100)
unit_spread = clamp(newspread, 5, 100)
to_chat(user, "<span class='notice'>You set the time release to [unit_spread] units per detonation.</span>")
if (newspread != unit_spread)
to_chat(user, "<span class='notice'>The new value is out of bounds. Minimum spread is 5 units, maximum is 100 units.</span>")
+2 -2
View File
@@ -89,12 +89,12 @@ obj/item/grenade/firecracker/wirecutter_act(mob/living/user, obj/item/I)
return
if(det_time)
det_time -= 10
to_chat(user, "<span class='notice'>You shorten the fuse of [src] with [I].")
to_chat(user, "<span class='notice'>You shorten the fuse of [src] with [I].</span>")
playsound(src, 'sound/items/wirecutter.ogg', 20, TRUE)
icon_state = initial(icon_state) + "_[det_time]"
update_icon()
else
to_chat(user, "<span class='danger'>You've already removed all of the fuse!")
to_chat(user, "<span class='danger'>You've already removed all of the fuse!</span>")
obj/item/grenade/firecracker/preprime(mob/user, delayoverride, msg = TRUE, volume = 80)
var/turf/T = get_turf(src)
@@ -45,7 +45,7 @@
/obj/item/grenade/iedcasing/attack_self(mob/user) //
if(!active)
if(clown_check(user))
if(!botch_check(user))
to_chat(user, "<span class='warning'>You light the [name]!</span>")
cut_overlay("improvised_grenade_filled")
preprime(user, null, FALSE)
+17 -7
View File
@@ -17,6 +17,7 @@
var/det_time = 50
var/display_timer = 1
var/clumsy_check = GRENADE_CLUMSY_FUMBLE
var/sticky = FALSE
/obj/item/grenade/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] primes [src], then eats it! It looks like [user.p_theyre()] trying to commit suicide!</span>")
@@ -32,19 +33,20 @@
if(!QDELETED(src))
qdel(src)
/obj/item/grenade/proc/clown_check(mob/living/carbon/human/user)
/obj/item/grenade/proc/botch_check(mob/living/carbon/human/user)
var/clumsy = HAS_TRAIT(user, TRAIT_CLUMSY)
if(clumsy && (clumsy_check == GRENADE_CLUMSY_FUMBLE))
if(prob(50))
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
preprime(user, 5, FALSE)
return FALSE
return TRUE
else if(!clumsy && (clumsy_check == GRENADE_NONCLUMSY_FUMBLE))
to_chat(user, "<span class='warning'>You pull the pin on [src]. Attached to it is a pink ribbon that says, \"<span class='clown'>HONK</span>\"</span>")
preprime(user, 5, FALSE)
return FALSE
return TRUE
return TRUE
else if(sticky && prob(50)) // to add risk to sticky tape grenade cheese, no return cause we still prime as normal after
to_chat(user, "<span class='warning'>What the... [src] is stuck to your hand!</span>")
ADD_TRAIT(src, TRAIT_NODROP, STICKY_NODROP)
/obj/item/grenade/examine(mob/user)
. = ..()
@@ -56,8 +58,16 @@
/obj/item/grenade/attack_self(mob/user)
if(HAS_TRAIT(src, TRAIT_NODROP))
to_chat(user, "<span class='notice'>You try prying [src] off your hand...</span>")
if(do_after(user, 70, target=src))
to_chat(user, "<span class='notice'>You manage to remove [src] from your hand.</span>")
REMOVE_TRAIT(src, TRAIT_NODROP, STICKY_NODROP)
return
if(!active)
if(clown_check(user))
if(!botch_check(user)) // if they botch the prime, it'll be handled in botch_check
preprime(user)
/obj/item/grenade/proc/log_grenade(mob/user, turf/T)
@@ -103,7 +113,7 @@
if(time != null)
if(time < 3)
time = 3
det_time = round(CLAMP(time * 10, 0, 50))
det_time = round(clamp(time * 10, 0, 50))
else
var/previous_time = det_time
switch(det_time)
+66
View File
@@ -0,0 +1,66 @@
/obj/item/grenade/hypnotic
name = "flashbang"
desc = "A modified flashbang which uses hypnotic flashes and mind-altering soundwaves to induce an instant trance upon detonation."
icon_state = "flashbang"
item_state = "flashbang"
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
var/flashbang_range = 7
/obj/item/grenade/hypnotic/prime()
update_mob()
var/flashbang_turf = get_turf(src)
if(!flashbang_turf)
return
do_sparks(rand(5, 9), FALSE, src)
playsound(flashbang_turf, 'sound/effects/screech.ogg', 100, TRUE, 8, 0.9)
new /obj/effect/dummy/lighting_obj (flashbang_turf, LIGHT_COLOR_PURPLE, (flashbang_range + 2), 4, 2)
for(var/mob/living/M in get_hearers_in_view(flashbang_range, flashbang_turf))
bang(get_turf(M), M)
qdel(src)
/obj/item/grenade/hypnotic/proc/bang(turf/T, mob/living/M)
if(M.stat == DEAD) //They're dead!
return
var/distance = max(0,get_dist(get_turf(src),T))
//Bang
var/hypno_sound = FALSE
//Hearing protection check
if(iscarbon(M))
var/mob/living/carbon/C = M
var/list/reflist = list(1)
SEND_SIGNAL(C, COMSIG_CARBON_SOUNDBANG, reflist)
var/intensity = reflist[1]
var/ear_safety = C.get_ear_protection()
var/effect_amount = intensity - ear_safety
if(effect_amount > 0)
hypno_sound = TRUE
if(!distance || loc == M || loc == M.loc)
M.Paralyze(10)
M.Knockdown(100)
to_chat(M, "<span class='hypnophrase'>The sound echoes in your brain...</span>")
M.hallucination += 50
else
if(distance <= 1)
M.Paralyze(5)
M.Knockdown(30)
if(hypno_sound)
to_chat(M, "<span class='hypnophrase'>The sound echoes in your brain...</span>")
M.hallucination += 50
//Flash
if(M.flash_act(affect_silicon = 1))
M.Paralyze(max(10/max(1,distance), 5))
M.Knockdown(max(100/max(1,distance), 40))
if(iscarbon(M))
var/mob/living/carbon/C = M
if(C.hypnosis_vulnerable()) //The sound causes the necessary conditions unless the target has mindshield or hearing protection
C.apply_status_effect(/datum/status_effect/trance, 100, TRUE)
else
to_chat(C, "<span class='hypnophrase'>The light is so pretty...</span>")
C.confused += min(C.confused + 10, 20)
C.dizziness += min(C.dizziness + 10, 20)
C.drowsyness += min(C.drowsyness + 10, 20)
+4 -2
View File
@@ -72,7 +72,7 @@
return
if(user.get_active_held_item() == src)
newtime = CLAMP(newtime, 10, 60000)
newtime = clamp(newtime, 10, 60000)
det_time = newtime
to_chat(user, "Timer set for [det_time] seconds.")
@@ -100,7 +100,9 @@
var/obj/item/I = AM
I.throw_speed = max(1, (I.throw_speed - 3))
I.throw_range = max(1, (I.throw_range - 3))
I.embedding = I.embedding.setRating(embed_chance = 0)
if(I.embedding)
I.embedding["embed_chance"] = 0
I.AddElement(/datum/element/embed, I.embedding)
else if(istype(AM, /mob/living))
plastic_overlay.layer = FLOAT_LAYER
+2 -2
View File
@@ -196,9 +196,9 @@
/obj/item/his_grace/proc/adjust_bloodthirst(amt)
prev_bloodthirst = bloodthirst
if(prev_bloodthirst < HIS_GRACE_CONSUME_OWNER && !ascended)
bloodthirst = CLAMP(bloodthirst + amt, HIS_GRACE_SATIATED, HIS_GRACE_CONSUME_OWNER)
bloodthirst = clamp(bloodthirst + amt, HIS_GRACE_SATIATED, HIS_GRACE_CONSUME_OWNER)
else if(!ascended)
bloodthirst = CLAMP(bloodthirst + amt, HIS_GRACE_CONSUME_OWNER, HIS_GRACE_FALL_ASLEEP)
bloodthirst = clamp(bloodthirst + amt, HIS_GRACE_CONSUME_OWNER, HIS_GRACE_FALL_ASLEEP)
update_stats()
/obj/item/his_grace/proc/update_stats()
+1 -1
View File
@@ -77,7 +77,7 @@
L.SetImmobilized(0)
L.SetParalyzed(0)
L.SetUnconscious(0)
L.reagents.add_reagent(/datum/reagent/medicine/muscle_stimulant, CLAMP(5 - L.reagents.get_reagent_amount(/datum/reagent/medicine/muscle_stimulant), 0, 5)) //If you don't have legs or get bola'd, tough luck!
L.reagents.add_reagent(/datum/reagent/medicine/muscle_stimulant, clamp(5 - L.reagents.get_reagent_amount(/datum/reagent/medicine/muscle_stimulant), 0, 5)) //If you don't have legs or get bola'd, tough luck!
colorize(L)
/obj/item/hot_potato/examine(mob/user)
+3 -3
View File
@@ -157,7 +157,7 @@
name = "combat knife"
icon_state = "buckknife"
desc = "A military combat utility survival knife."
embedding = list("embedded_pain_multiplier" = 4, "embed_chance" = 65, "embedded_fall_chance" = 10, "embedded_ignore_throwspeed_threshold" = TRUE)
embedding = list("pain_mult" = 4, "embed_chance" = 65, "fall_chance" = 10, "ignore_throwspeed_threshold" = TRUE)
force = 20
throwforce = 20
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "cut")
@@ -166,7 +166,7 @@
/obj/item/kitchen/knife/combat/survival
name = "survival knife"
icon_state = "survivalknife"
embedding = list("embedded_pain_multiplier" = 4, "embed_chance" = 35, "embedded_fall_chance" = 10)
embedding = list("pain_mult" = 4, "embed_chance" = 35, "fall_chance" = 10)
desc = "A hunting grade survival knife."
force = 15
throwforce = 15
@@ -179,7 +179,7 @@
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
desc = "A sharpened bone. The bare minimum in survival."
embedding = list("embedded_pain_multiplier" = 4, "embed_chance" = 35, "embedded_fall_chance" = 10)
embedding = list("pain_mult" = 4, "embed_chance" = 35, "fall_chance" = 10)
force = 15
throwforce = 15
custom_materials = null
+1 -1
View File
@@ -99,7 +99,7 @@
throw_speed = 3
throw_range = 5
sharpness = IS_SHARP
embedding = list("embed_chance" = 75, "embedded_impact_pain_multiplier" = 10)
embedding = list("embed_chance" = 75, "impact_pain_mult" = 10)
armour_penetration = 35
block_chance = 50
@@ -22,6 +22,8 @@
else
if(attack_verb_off.len)
attack_verb = attack_verb_off
if(embedding)
RemoveElement(/datum/element/embed, embedding)
if(sharpness)
AddComponent(/datum/component/butchering, 50, 100, 0, hitsound)
@@ -53,6 +55,8 @@
attack_verb = attack_verb_on
icon_state = icon_state_on
w_class = w_class_on
if(embedding)
AddElement(/datum/element/embed, embedding)
else
force = initial(force)
throwforce = initial(throwforce)
@@ -62,6 +66,9 @@
attack_verb = attack_verb_off
icon_state = initial(icon_state)
w_class = initial(w_class)
if(embedding)
RemoveElement(/datum/element/embed, embedding)
transform_messages(user, supress_message_text)
add_fingerprint(user)
return TRUE
+1 -1
View File
@@ -14,7 +14,7 @@
/obj/item/choice_beacon
name = "choice beacon"
desc = "Hey, why are you viewing this?!! Please let Centcom know about this odd occurance."
desc = "Hey, why are you viewing this?!! Please let CentCom know about this odd occurrence."
icon = 'icons/obj/device.dmi'
icon_state = "gangtool-blue"
item_state = "radio"
+3 -3
View File
@@ -174,7 +174,7 @@
fire_items(T, user)
if(pressureSetting >= 3 && iscarbon(user))
var/mob/living/carbon/C = user
C.visible_message("<span class='warning'>[C] is thrown down by the force of the cannon!</span>", "<span class='userdanger'>[src] slams into your shoulder, knocking you down!")
C.visible_message("<span class='warning'>[C] is thrown down by the force of the cannon!</span>", "<span class='userdanger'>[src] slams into your shoulder, knocking you down!</span>")
C.Paralyze(60)
/obj/item/pneumatic_cannon/proc/fire_items(turf/target, mob/user)
@@ -212,8 +212,8 @@
return target
var/x_o = (target.x - starting.x)
var/y_o = (target.y - starting.y)
var/new_x = CLAMP((starting.x + (x_o * range_multiplier)), 0, world.maxx)
var/new_y = CLAMP((starting.y + (y_o * range_multiplier)), 0, world.maxy)
var/new_x = clamp((starting.x + (x_o * range_multiplier)), 0, world.maxx)
var/new_y = clamp((starting.y + (y_o * range_multiplier)), 0, world.maxy)
var/turf/newtarget = locate(new_x, new_y, starting.z)
return newtarget
+1 -1
View File
@@ -227,7 +227,7 @@
desc = "A banner with the logo of the blue deity."
/obj/item/storage/backpack/bannerpack
name = "nanotrasen banner backpack"
name = "\improper Nanotrasen banner backpack"
desc = "It's a backpack with lots of extra room. A banner with Nanotrasen's logo is attached, that can't be removed."
icon_state = "bannerpack"
+6 -6
View File
@@ -390,7 +390,7 @@
var/obj/item/reagent_containers/food/snacks/L
switch(mode)
if(DISPENSE_LOLLIPOP_MODE)
L = new /obj/item/reagent_containers/food/snacks/lollipop(T)
L = new /obj/item/reagent_containers/food/snacks/chewable/lollipop(T)
if(DISPENSE_ICECREAM_MODE)
L = new /obj/item/reagent_containers/food/snacks/icecream(T)
var/obj/item/reagent_containers/food/snacks/icecream/I = L
@@ -517,13 +517,13 @@
name = "lollipop"
desc = "Oh noes! A fast-moving lollipop!"
icon_state = "lollipop_1"
ammo_type = /obj/item/reagent_containers/food/snacks/lollipop/cyborg
ammo_type = /obj/item/reagent_containers/food/snacks/chewable/lollipop/cyborg
var/color2 = rgb(0, 0, 0)
nodamage = TRUE
/obj/projectile/bullet/reusable/lollipop/Initialize()
. = ..()
var/obj/item/reagent_containers/food/snacks/lollipop/S = new ammo_type(src)
var/obj/item/reagent_containers/food/snacks/chewable/lollipop/S = new ammo_type(src)
color2 = S.headcolor
var/mutable_appearance/head = mutable_appearance('icons/obj/projectiles.dmi', "lollipop_2")
head.color = color2
@@ -532,7 +532,7 @@
/obj/projectile/bullet/reusable/lollipop/handle_drop()
if(!dropped)
var/turf/T = get_turf(src)
var/obj/item/reagent_containers/food/snacks/lollipop/S = new ammo_type(T)
var/obj/item/reagent_containers/food/snacks/chewable/lollipop/S = new ammo_type(T)
S.change_head_color(color2)
dropped = TRUE
@@ -653,7 +653,7 @@
continue
usage += projectile_tick_speed_ecost
usage += (tracked[I] * projectile_damage_tick_ecost_coefficient)
energy = CLAMP(energy - usage, 0, maxenergy)
energy = clamp(energy - usage, 0, maxenergy)
if(energy <= 0)
deactivate_field()
visible_message("<span class='warning'>[src] blinks \"ENERGY DEPLETED\".</span>")
@@ -663,7 +663,7 @@
if(iscyborg(host.loc))
host = host.loc
else
energy = CLAMP(energy + energy_recharge, 0, maxenergy)
energy = clamp(energy + energy_recharge, 0, maxenergy)
return
if(host.cell && (host.cell.charge >= (host.cell.maxcharge * cyborg_cell_critical_percentage)) && (energy < maxenergy))
host.cell.use(energy_recharge*energy_recharge_cyborg_drain_coefficient)
+3 -3
View File
@@ -35,15 +35,15 @@
if(TH.force_wielded > initial(TH.force_wielded))
to_chat(user, "<span class='warning'>[TH] has already been refined before. It cannot be sharpened further!</span>")
return
TH.force_wielded = CLAMP(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay
TH.force_wielded = clamp(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay
if(I.force > initial(I.force))
to_chat(user, "<span class='warning'>[I] has already been refined before. It cannot be sharpened further!</span>")
return
user.visible_message("<span class='notice'>[user] sharpens [I] with [src]!</span>", "<span class='notice'>You sharpen [I], making it much more deadly than before.</span>")
playsound(src, 'sound/items/unsheath.ogg', 25, TRUE)
I.sharpness = IS_SHARP_ACCURATE
I.force = CLAMP(I.force + increment, 0, max)
I.throwforce = CLAMP(I.throwforce + increment, 0, max)
I.force = clamp(I.force + increment, 0, max)
I.throwforce = clamp(I.throwforce + increment, 0, max)
I.name = "[prefix] [I.name]"
name = "worn out [name]"
desc = "[desc] At least, it used to."
+1
View File
@@ -21,6 +21,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
max_amount = 50
attack_verb = list("hit", "bludgeoned", "whacked")
hitsound = 'sound/weapons/gun/general/grenade_launch.ogg'
embedding = list()
novariants = TRUE
/obj/item/stack/rods/suicide_act(mob/living/carbon/user)
@@ -253,6 +253,7 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
sharpness = IS_SHARP
var/icon_prefix
var/obj/item/stack/sheet/weld_material = /obj/item/stack/sheet/glass
embedding = list("embed_chance" = 65)
/obj/item/shard/suicide_act(mob/user)
@@ -193,6 +193,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
new/datum/stack_recipe("coffin", /obj/structure/closet/crate/coffin, 5, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("book case", /obj/structure/bookcase, 4, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("drying rack", /obj/machinery/smartfridge/drying_rack, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("wooden barrel", /obj/structure/fermenting_barrel, 8, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("dog bed", /obj/structure/bed/dogbed, 10, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("dresser", /obj/structure/dresser, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("picture frame", /obj/item/wallframe/picture, 1, time = 10),\
+2 -2
View File
@@ -77,9 +77,9 @@
/obj/item/stack/proc/update_weight()
if(amount <= (max_amount * (1/3)))
w_class = CLAMP(full_w_class-2, WEIGHT_CLASS_TINY, full_w_class)
w_class = clamp(full_w_class-2, WEIGHT_CLASS_TINY, full_w_class)
else if (amount <= (max_amount * (2/3)))
w_class = CLAMP(full_w_class-1, WEIGHT_CLASS_TINY, full_w_class)
w_class = clamp(full_w_class-1, WEIGHT_CLASS_TINY, full_w_class)
else
w_class = full_w_class
+62
View File
@@ -0,0 +1,62 @@
/obj/item/stack/sticky_tape
name = "sticky tape"
singular_name = "sticky tape"
desc = "Used for sticking to things for sticking said things to people."
icon = 'icons/obj/tapes.dmi'
icon_state = "tape_w"
var/prefix = "sticky"
item_flags = NOBLUDGEON
amount = 5
max_amount = 5
resistance_flags = FLAMMABLE
grind_results = list(/datum/reagent/cellulose = 5)
var/list/conferred_embed = EMBED_HARMLESS
var/overwrite_existing = FALSE
/obj/item/stack/sticky_tape/afterattack(obj/item/I, mob/living/user)
if(!istype(I))
return
if(I.embedding && I.embedding == conferred_embed)
to_chat(user, "<span class='warning'>[I] is already coated in [src]!</span>")
return
user.visible_message("<span class='notice'>[user] begins wrapping [I] with [src].</span>", "<span class='notice'>You begin wrapping [I] with [src].</span>")
if(do_after(user, 30, target=I))
I.embedding = conferred_embed
I.AddElement(/datum/element/embed, I.embedding)
to_chat(user, "<span class='notice'>You finish wrapping [I] with [src].</span>")
use(1)
I.name = "[prefix] [I.name]"
if(istype(I, /obj/item/grenade))
var/obj/item/grenade/sticky_bomb = I
sticky_bomb.sticky = TRUE
/obj/item/stack/sticky_tape/super
name = "super sticky tape"
singular_name = "super sticky tape"
desc = "Quite possibly the most mischevious substance in the galaxy. Use with extreme lack of caution."
icon_state = "tape_y"
prefix = "super sticky"
conferred_embed = EMBED_HARMLESS_SUPERIOR
/obj/item/stack/sticky_tape/pointy
name = "pointy tape"
singular_name = "pointy tape"
desc = "Used for sticking to things for sticking said things inside people."
icon_state = "tape_evil"
prefix = "pointy"
conferred_embed = EMBED_POINTY
/obj/item/stack/sticky_tape/pointy/super
name = "super pointy tape"
singular_name = "super pointy tape"
desc = "You didn't know tape could look so sinister. Welcome to Space Station 13."
icon_state = "tape_spikes"
prefix = "super pointy"
conferred_embed = EMBED_POINTY_SUPERIOR
+8
View File
@@ -20,6 +20,9 @@
if(QDELETED(src) && !transfer)
new /obj/item/c_tube(T)
/obj/item/stack/wrapping_paper/small
desc = "Wrap packages with this festive paper to make gifts. This roll looks a bit skimpy."
amount = 10
/*
* Package Wrap
@@ -121,6 +124,11 @@
if(QDELETED(src) && !transfer)
new /obj/item/c_tube(T)
/obj/item/stack/packageWrap/small
desc = "You can use this to wrap items in. This roll looks a bit skimpy."
w_class = WEIGHT_CLASS_SMALL
amount = 5
/obj/item/c_tube
name = "cardboard tube"
desc = "A tube... of cardboard."
+59
View File
@@ -1270,3 +1270,62 @@
/obj/item/storage/box/sparklers/PopulateContents()
for(var/i in 1 to 7)
new/obj/item/sparkler(src)
/obj/item/storage/box/gum
name = "bubblegum packet"
desc = "The packaging is entirely in japanese, apparently. You can't make out a single word of it."
icon_state = "bubblegum_generic"
illustration = null
foldable = null
custom_price = 120
/obj/item/storage/box/gum/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.set_holdable(list(/obj/item/storage/box/gum))
STR.max_items = 4
/obj/item/storage/box/gum/PopulateContents()
for(var/i in 1 to 4)
new/obj/item/reagent_containers/food/snacks/chewable/bubblegum(src)
/obj/item/storage/box/gum/nicotine
name = "nicotine gum packet"
desc = "Designed to help with nicotine addiction and oral fixation all at once without destroying your lungs in the process. Mint flavored!"
icon_state = "bubblegum_nicotine"
custom_premium_price = 275
/obj/item/storage/box/gum/nicotine/PopulateContents()
for(var/i in 1 to 4)
new/obj/item/reagent_containers/food/snacks/chewable/bubblegum/nicotine(src)
/obj/item/storage/box/gum/happiness
name = "HP+ gum packet"
desc = "A seemingly homemade packaging with an odd smell. It has a weird drawing of a smiling face sticking out its tongue."
icon_state = "bubblegum_happiness"
custom_price = 300
custom_premium_price = 300
/obj/item/storage/box/gum/happiness/Initialize()
. = ..()
if (prob(25))
desc += "You can faintly make out the word 'Hemopagopril' was once scribbled on it."
/obj/item/storage/box/gum/happiness/PopulateContents()
for(var/i in 1 to 4)
new/obj/item/reagent_containers/food/snacks/chewable/bubblegum/happiness(src)
/obj/item/storage/box/shipping
name = "box of shipping supplies"
desc = "Contains several scanners and labelers for shipping things. Wrapping Paper not included."
illustration = "shipping"
/obj/item/storage/box/shipping/PopulateContents()
var/static/items_inside = list(
/obj/item/destTagger=1,\
/obj/item/sales_tagger=1,\
/obj/item/export_scanner=1,\
/obj/item/stack/packageWrap/small=2,\
/obj/item/stack/wrapping_paper/small=1
)
generate_items_inside(items_inside,src)
+7 -15
View File
@@ -146,7 +146,7 @@
return
var/static/items_inside = list(
/obj/item/reagent_containers/pill/patch/aiuri = 3,
/obj/item/reagent_containers/spray/rhigoxane = 1,
/obj/item/reagent_containers/spray/hercuri = 1,
/obj/item/reagent_containers/hypospray/medipen/oxandrolone = 1,
/obj/item/reagent_containers/hypospray/medipen = 1)
generate_items_inside(items_inside,src)
@@ -222,7 +222,7 @@
var/static/items_inside = list(
/obj/item/reagent_containers/pill/patch/libital = 3,
/obj/item/stack/medical/gauze = 1,
/obj/item/storage/pill_bottle/trophazole = 1,
/obj/item/storage/pill_bottle/C2/probital = 1,
/obj/item/reagent_containers/hypospray/medipen/salacid = 1)
generate_items_inside(items_inside,src)
@@ -354,13 +354,13 @@
for(var/i in 1 to 3)
new /obj/item/reagent_containers/pill/potassiodide(src)
/obj/item/storage/pill_bottle/trophazole
name = "bottle of trophazole pills"
desc = "Contains pills used to treat brute damage.The tag in the bottle states 'Eat before ingesting'."
/obj/item/storage/pill_bottle/C2/probital
name = "bottle of probital pills"
desc = "Contains pills used to treat brute damage.The tag in the bottle states 'Eat before ingesting, may cause fatigue'."
/obj/item/storage/pill_bottle/trophazole/PopulateContents()
/obj/item/storage/pill_bottle/C2/probital/PopulateContents()
for(var/i in 1 to 4)
new /obj/item/reagent_containers/pill/trophazole(src)
new /obj/item/reagent_containers/pill/C2/probital(src)
/obj/item/storage/pill_bottle/iron
name = "bottle of iron pills"
@@ -435,14 +435,6 @@
for(var/i in 1 to 7)
new /obj/item/reagent_containers/pill/psicodine(src)
/obj/item/storage/pill_bottle/happiness
name = "happiness pill bottle"
desc = "The label is long gone, in its place an 'H' written with a marker."
/obj/item/storage/pill_bottle/happiness/PopulateContents()
for(var/i in 1 to 5)
new /obj/item/reagent_containers/pill/happiness(src)
/obj/item/storage/pill_bottle/penacid
name = "bottle of pentetic acid pills"
desc = "Contains pills to expunge radiation and toxins."
+2 -2
View File
@@ -190,7 +190,7 @@
pressure = text2num(pressure)
. = TRUE
if(.)
distribute_pressure = CLAMP(round(pressure), TANK_MIN_RELEASE_PRESSURE, TANK_MAX_RELEASE_PRESSURE)
distribute_pressure = clamp(round(pressure), TANK_MIN_RELEASE_PRESSURE, TANK_MAX_RELEASE_PRESSURE)
/obj/item/tank/remove_air(amount)
return air_contents.remove(amount)
@@ -212,7 +212,7 @@
return null
var/tank_pressure = air_contents.return_pressure()
var/actual_distribute_pressure = CLAMP(tank_pressure, 0, distribute_pressure)
var/actual_distribute_pressure = clamp(tank_pressure, 0, distribute_pressure)
var/moles_needed = actual_distribute_pressure*volume_to_return/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
+1 -1
View File
@@ -448,7 +448,7 @@
force_wielded = 18
throwforce = 20
throw_speed = 4
embedding = list("embedded_impact_pain_multiplier" = 3)
embedding = list("impact_pain_mult" = 3)
armour_penetration = 10
custom_materials = list(/datum/material/iron=1150, /datum/material/glass=2075)
hitsound = 'sound/weapons/bladeslice.ogg'
+18 -2
View File
@@ -280,12 +280,28 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
force = 2
throwforce = 20 //20 + 2 (WEIGHT_CLASS_SMALL) * 4 (EMBEDDED_IMPACT_PAIN_MULTIPLIER) = 28 damage on hit due to guaranteed embedding
throw_speed = 4
embedding = list("embedded_pain_multiplier" = 4, "embed_chance" = 100, "embedded_fall_chance" = 0)
embedding = list("pain_mult" = 4, "embed_chance" = 100, "fall_chance" = 0)
w_class = WEIGHT_CLASS_SMALL
sharpness = IS_SHARP
custom_materials = list(/datum/material/iron=500, /datum/material/glass=500)
resistance_flags = FIRE_PROOF
/obj/item/throwing_star/stamina
name = "shock throwing star"
desc = "An aerodynamic disc designed to cause excruciating pain when stuck inside fleeing targets, hopefully without causing fatal harm."
throwforce = 5
embedding = list("pain_chance" = 5, "embed_chance" = 100, "fall_chance" = 0, "jostle_chance" = 10, "pain_stam_pct" = 0.8, "jostle_pain_mult" = 3)
/obj/item/throwing_star/toy
name = "toy throwing star"
desc = "An aerodynamic disc strapped with adhesive for sticking to people, good for playing pranks and getting yourself killed by security."
sharpness = IS_BLUNT
force = 0
throwforce = 0
embedding = list("pain_mult" = 0, "jostle_pain_mult" = 0, "embed_chance" = 100, "fall_chance" = 0)
/obj/item/throwing_star/magspear
name = "magnetic spear"
desc = "A reusable spear that is typically loaded into kinetic spearguns."
@@ -295,7 +311,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
force = 10
throw_range = 0 //throwing these invalidates the speargun
attack_verb = list("stabbed", "ripped", "gored", "impaled")
embedding = list("embedded_pain_multiplier" = 8, "embed_chance" = 100, "embedded_fall_chance" = 0, "embedded_impact_pain_multiplier" = 15) //55 damage+embed on hit
embedding = list("pain_mult" = 8, "embed_chance" = 100, "fall_chance" = 0, "impact_pain_mult" = 15) //55 damage+embed on hit
/obj/item/switchblade
name = "switchblade"
+3 -3
View File
@@ -33,7 +33,7 @@
if(damage_flag)
armor_protection = armor.getRating(damage_flag)
if(armor_protection) //Only apply weak-against-armor/hollowpoint effects if there actually IS armor.
armor_protection = CLAMP(armor_protection - armour_penetration, min(armor_protection, 0), 100)
armor_protection = clamp(armor_protection - armour_penetration, min(armor_protection, 0), 100)
return round(damage_amount * (100 - armor_protection)*0.01, DAMAGE_PRECISION)
///the sound played when the obj is damaged.
@@ -206,7 +206,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
if(T.intact && level == 1) //fire can't damage things hidden below the floor.
return
if(exposed_temperature && !(resistance_flags & FIRE_PROOF))
take_damage(CLAMP(0.02 * exposed_temperature, 0, 20), BURN, "fire", 0)
take_damage(clamp(0.02 * exposed_temperature, 0, 20), BURN, "fire", 0)
if(!(resistance_flags & ON_FIRE) && (resistance_flags & FLAMMABLE) && !(resistance_flags & FIRE_PROOF))
resistance_flags |= ON_FIRE
SSfire_burning.processing[src] = src
@@ -242,7 +242,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
if(has_buckled_mobs())
for(var/m in buckled_mobs)
var/mob/living/buckled_mob = m
buckled_mob.electrocute_act((CLAMP(round(strength/400), 10, 90) + rand(-5, 5)), src, flags = SHOCK_TESLA)
buckled_mob.electrocute_act((clamp(round(strength/400), 10, 90) + rand(-5, 5)), src, flags = SHOCK_TESLA)
/obj/proc/reset_shocked()
obj_flags &= ~BEING_SHOCKED
+1 -1
View File
@@ -235,7 +235,7 @@
if(brain.force_replace_ai_name)
A.fully_replace_character_name(A.name, brain.replacement_ai_name())
SSblackbox.record_feedback("amount", "ais_created", 1)
deadchat_broadcast(" has been brought online at <b>[get_area_name(A, TRUE)]</b>.", "<span class='name'>[A]</span>", follow_target=A)
deadchat_broadcast(" has been brought online at <b>[get_area_name(A, TRUE)]</b>.", "<span class='name'>[A]</span>", follow_target=A, message_type=DEADCHAT_ANNOUNCEMENT)
qdel(src)
else
state = AI_READY_CORE
+159 -39
View File
@@ -39,21 +39,29 @@
name = "canvas"
desc = "Draw out your soul on this canvas!"
icon = 'icons/obj/artstuff.dmi'
icon_state = "square"
icon_state = "11x11"
resistance_flags = FLAMMABLE
var/width = 11
var/height = 11
var/list/grid
var/list/top_colors
var/canvas_color = "#ffffff" //empty canvas color
var/ui_x = 400
var/ui_y = 400
var/used = FALSE
var/painting_name //Painting name, this is set after framing.
var/framed = FALSE //Blocks edits, set on framing
var/finalized = FALSE //Blocks edits
var/icon_generated = FALSE
var/icon/generated_icon
// Painting overlay offset when framed
var/framed_offset_x = 11
var/framed_offset_y = 10
pixel_x = 10
pixel_y = 9
/obj/item/canvas/Initialize()
. = ..()
top_colors = list()
reset_grid()
/obj/item/canvas/proc/reset_grid()
@@ -85,6 +93,7 @@
. = ..()
.["grid"] = grid
.["name"] = painting_name
.["finalized"] = finalized
/obj/item/canvas/examine(mob/user)
. = ..()
@@ -92,7 +101,7 @@
/obj/item/canvas/ui_act(action, params)
. = ..()
if(. || framed)
if(. || finalized)
return
var/mob/user = usr
switch(action)
@@ -104,34 +113,50 @@
var/x = text2num(params["x"])
var/y = text2num(params["y"])
grid[x][y] = color
top_colors = get_most_common_colors(3)
used = TRUE
update_icon()
. = TRUE
if("finalize")
. = TRUE
if(!finalized)
finalize(user)
/obj/item/canvas/proc/finalize(mob/user)
finalized = TRUE
generate_proper_overlay()
try_rename(user)
/obj/item/canvas/update_overlays()
. = ..()
for(var/i in 2 to top_colors.len) //first is used as base color
var/mutable_appearance/detail = mutable_appearance(icon, "[icon_state]_detail_[i-1]")
detail.appearance_flags |= RESET_COLOR
detail.color = top_colors[i]
if(!icon_generated)
if(used)
var/mutable_appearance/detail = mutable_appearance(icon,"[icon_state]wip")
detail.pixel_x = 1
detail.pixel_y = 1
. += detail
else
var/mutable_appearance/detail = mutable_appearance(generated_icon)
detail.pixel_x = 1
detail.pixel_y = 1
. += detail
/obj/item/canvas/update_icon_state()
. = ..()
if(top_colors.len)
color = top_colors[1]
/obj/item/canvas/proc/generate_proper_overlay()
if(icon_generated)
return
var/png_filename = "data/paintings/temp_painting.png"
var/result = rustg_dmi_create_png(png_filename,"[width]","[height]",get_data_string())
if(result)
CRASH("Error generating painting png : [result]")
generated_icon = new(png_filename)
icon_generated = TRUE
update_icon()
/obj/item/canvas/proc/get_most_common_colors(count)
var/list/tally = list()
for(var/x in 1 to width)
for(var/y in 1 to height)
tally[grid[x][y]] += 1
sortTim(tally,/proc/cmp_numeric_dsc,associative=TRUE)
. = list()
for(var/result in tally)
. += result
if(length(.) >= count)
break
/obj/item/canvas/proc/get_data_string()
var/list/data = list()
for(var/y in 1 to height)
for(var/x in 1 to width)
data += grid[x][y]
return data.Join("")
//Todo make this element ?
/obj/item/canvas/proc/get_paint_tool_color(obj/item/I)
@@ -153,27 +178,44 @@
else if(istype(I, /obj/item/soap) || istype(I, /obj/item/reagent_containers/glass/rag))
return canvas_color
/obj/item/canvas/proc/try_rename(mob/user)
var/new_name = stripped_input(user,"What do you want to name the painting?")
if(!painting_name && new_name && user.canUseTopic(src,BE_CLOSE))
painting_name = new_name
SStgui.update_uis(src)
/obj/item/canvas/nineteenXnineteen
icon_state = "square"
icon_state = "19x19"
width = 19
height = 19
ui_x = 600
ui_y = 600
pixel_x = 6
pixel_y = 9
framed_offset_x = 8
framed_offset_y = 9
/obj/item/canvas/twentythreeXnineteen
icon_state = "wide"
icon_state = "23x19"
width = 23
height = 19
ui_x = 800
ui_y = 600
pixel_x = 4
pixel_y = 10
framed_offset_x = 6
framed_offset_y = 8
/obj/item/canvas/twentythreeXtwentythree
icon_state = "square"
icon_state = "23x23"
width = 23
height = 23
ui_x = 800
ui_y = 800
pixel_x = 5
pixel_y = 9
framed_offset_x = 5
framed_offset_y = 6
/obj/item/wallframe/painting
name = "painting frame"
@@ -191,6 +233,7 @@
icon_state = "frame-empty"
buildable_sign = FALSE
var/obj/item/canvas/C
var/persistence_id
/obj/structure/sign/painting/Initialize(mapload, dir, building)
. = ..()
@@ -217,7 +260,6 @@
/obj/structure/sign/painting/wirecutter_act(mob/living/user, obj/item/I)
. = ..()
if(C)
C.framed = FALSE
C.forceMove(drop_location())
C = null
to_chat(user, "<span class='notice'>You remove the painting from the frame.</span>")
@@ -227,20 +269,98 @@
/obj/structure/sign/painting/proc/frame_canvas(mob/user,obj/item/canvas/new_canvas)
if(user.transferItemToLoc(new_canvas,src))
C = new_canvas
C.framed = TRUE
if(!C.finalized)
C.finalize(user)
to_chat(user,"<span class='notice'>You frame [C].</span>")
update_icon()
/obj/structure/sign/painting/proc/try_rename(mob/user)
var/new_name = stripped_input(user,"What do you want to name the painting?")
if(C && !C.painting_name && new_name && user.canUseTopic(src,BE_CLOSE))
C.painting_name = new_name
SStgui.update_uis(C)
if(!C.painting_name)
C.try_rename(user)
/obj/structure/sign/painting/update_icon_state()
. = ..()
if(C && C.generated_icon)
icon_state = null
else
icon_state = "frame-empty"
/obj/structure/sign/painting/update_overlays()
. = ..()
if(C && C.top_colors.len)
var/mutable_appearance/MA = mutable_appearance(icon, "frame-content-overlay")
MA.appearance_flags |= RESET_COLOR
MA.color = C.top_colors[1]
if(C && C.generated_icon)
var/mutable_appearance/MA = mutable_appearance(C.generated_icon)
MA.pixel_x = C.framed_offset_x
MA.pixel_y = C.framed_offset_y
. += MA
var/mutable_appearance/frame = mutable_appearance(C.icon,"[C.icon_state]frame")
frame.pixel_x = C.framed_offset_x - 1
frame.pixel_y = C.framed_offset_y - 1
. += frame
/obj/structure/sign/painting/proc/load_persistent()
if(!persistence_id)
return
if(!SSpersistence.paintings || !SSpersistence.paintings[persistence_id] || !length(SSpersistence.paintings[persistence_id]))
return
var/list/chosen = pick(SSpersistence.paintings[persistence_id])
var/title = chosen["title"]
var/png = "data/paintings/[persistence_id]/[chosen["md5"]].png"
if(!fexists(png))
stack_trace("Persistent painting [chosen["md5"]].png was not found in [persistence_id] directory.")
return
var/icon/I = new(png)
var/obj/item/canvas/new_canvas
var/w = I.Width()
var/h = I.Height()
for(var/T in typesof(/obj/item/canvas))
new_canvas = T
if(initial(new_canvas.width) == w && initial(new_canvas.height) == h)
new_canvas = new T(src)
break
new_canvas.fill_grid_from_icon(I)
new_canvas.generated_icon = I
new_canvas.icon_generated = TRUE
new_canvas.finalized = TRUE
new_canvas.painting_name = title
C = new_canvas
update_icon()
/obj/structure/sign/painting/proc/save_persistent()
if(!persistence_id || !C)
return
if(sanitize_filename(persistence_id) != persistence_id)
stack_trace("Invalid persistence_id - [persistence_id]")
return
var/data = C.get_data_string()
var/md5 = md5(data)
var/list/current = SSpersistence.paintings[persistence_id]
if(!current)
current = list()
for(var/list/entry in current)
if(entry["md5"] == md5)
return
var/png_directory = "data/paintings/[persistence_id]/"
var/png_path = png_directory + "[md5].png"
var/result = rustg_dmi_create_png(png_path,"[C.width]","[C.height]",data)
if(result)
CRASH("Error saving persistent painting: [result]")
current += list(list("title" = C.painting_name , "md5" = md5))
SSpersistence.paintings[persistence_id] = current
/obj/item/canvas/proc/fill_grid_from_icon(icon/I)
var/w = I.Width() + 1
var/h = I.Height() + 1
for(var/x in 1 to width)
for(var/y in 1 to height)
grid[x][y] = I.GetPixel(w-x,h-y)
//Presets for art gallery mapping, for paintings to be shared across stations
/obj/structure/sign/painting/library
persistence_id = "library"
/obj/structure/sign/painting/library_secure
persistence_id = "library_secure"
/obj/structure/sign/painting/library_private // keep your smut away from prying eyes, or non-librarians at least
persistence_id = "library_private"
+1 -1
View File
@@ -218,7 +218,7 @@ LINEN BINS
dream_messages = list("a book", "an explosion", "lightning", "a staff", "a skeleton", "a robe", "magic")
/obj/item/bedsheet/nanotrasen
name = "nanotrasen bedsheet"
name = "\improper Nanotrasen bedsheet"
desc = "It has the Nanotrasen logo on it and has an aura of duty."
icon_state = "sheetNT"
item_state = "sheetNT"
+1 -1
View File
@@ -129,7 +129,7 @@
if(burn_time_remaining() < MAXIMUM_BURN_TIMER)
flame_expiry_timer = world.time + MAXIMUM_BURN_TIMER
else
fuel_added = CLAMP(fuel_added + amount, 0, MAXIMUM_BURN_TIMER)
fuel_added = clamp(fuel_added + amount, 0, MAXIMUM_BURN_TIMER)
/obj/structure/fireplace/proc/burn_time_remaining()
if(lit)
+1 -1
View File
@@ -125,7 +125,7 @@
else
cur_oct[cur_note] = text2num(ni)
if(user.dizziness > 0 && prob(user.dizziness / 2))
cur_note = CLAMP(cur_note + rand(round(-user.dizziness / 10), round(user.dizziness / 10)), 1, 7)
cur_note = clamp(cur_note + rand(round(-user.dizziness / 10), round(user.dizziness / 10)), 1, 7)
if(user.dizziness > 0 && prob(user.dizziness / 5))
if(prob(30))
cur_acc[cur_note] = "#"
+3 -3
View File
@@ -69,13 +69,13 @@
icon_state = "firefighter"
/obj/structure/showcase/machinery/implanter
name = "Nanotrasen automated mindshield implanter exhibit"
name = "\improper Nanotrasen automated mindshield implanter exhibit"
desc = "A flimsy model of a standard Nanotrasen automated mindshield implant machine. With secure positioning harnesses and a robotic surgical injector, brain damage and other serious medical anomalies are now up to 60% less likely!"
icon = 'icons/obj/machines/implantchair.dmi'
icon_state = "implantchair"
/obj/structure/showcase/machinery/microwave
name = "Nanotrasen-brand microwave"
name = "\improper Nanotrasen-brand microwave"
desc = "The famous Nanotrasen-brand microwave, the multi-purpose cooking appliance every station needs! This one appears to be drawn onto a cardboard box."
icon = 'icons/obj/kitchen.dmi'
icon_state = "mw"
@@ -91,7 +91,7 @@
desc = "A stand with a model of the perfect Nanotrasen Employee bolted to it. Signs indicate it is robustly genetically engineered, as well as being ruthlessly loyal."
/obj/structure/showcase/machinery/tv
name = "Nanotrasen corporate newsfeed"
name = "\improper Nanotrasen corporate newsfeed"
desc = "A slightly battered looking TV. Various Nanotrasen infomercials play on a loop, accompanied by a jaunty tune."
icon = 'icons/obj/computer.dmi'
icon_state = "television"
+2 -92
View File
@@ -98,102 +98,12 @@
wash_atom(AM)
/obj/machinery/shower/proc/wash_atom(atom/A)
SEND_SIGNAL(A, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
A.washed(src)
reagents.reaction(A, TOUCH, reaction_volume)
if(isobj(A))
wash_obj(A)
else if(isturf(A))
wash_turf(A)
else if(isliving(A))
wash_mob(A)
if(isliving(A))
check_heat(A)
contamination_cleanse(A)
/obj/machinery/shower/proc/wash_obj(obj/O)
. = SEND_SIGNAL(O, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
O.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
/obj/machinery/shower/proc/wash_turf(turf/tile)
SEND_SIGNAL(tile, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
tile.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
for(var/obj/effect/E in tile)
if(is_cleanable(E))
qdel(E)
/obj/machinery/shower/proc/wash_mob(mob/living/L)
SEND_SIGNAL(L, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
L.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "shower", /datum/mood_event/nice_shower)
if(iscarbon(L))
var/mob/living/carbon/M = L
. = TRUE
for(var/obj/item/I in M.held_items)
wash_obj(I)
if(M.back && wash_obj(M.back))
M.update_inv_back(0)
var/list/obscured = M.check_obscured_slots()
if(M.head && wash_obj(M.head))
M.update_inv_head()
if(M.glasses && !(ITEM_SLOT_EYES in obscured) && wash_obj(M.glasses))
M.update_inv_glasses()
if(M.wear_mask && !(ITEM_SLOT_MASK in obscured) && wash_obj(M.wear_mask))
M.update_inv_wear_mask()
if(M.ears && !(HIDEEARS in obscured) && wash_obj(M.ears))
M.update_inv_ears()
if(M.wear_neck && !(ITEM_SLOT_NECK in obscured) && wash_obj(M.wear_neck))
M.update_inv_neck()
if(M.shoes && !(HIDESHOES in obscured) && wash_obj(M.shoes))
M.update_inv_shoes()
var/washgloves = FALSE
if(M.gloves && !(HIDEGLOVES in obscured))
washgloves = TRUE
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.wear_suit && wash_obj(H.wear_suit))
H.update_inv_wear_suit()
else if(H.w_uniform && wash_obj(H.w_uniform))
H.update_inv_w_uniform()
if(washgloves)
SEND_SIGNAL(H, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
if(!H.is_mouth_covered())
H.lip_style = null
H.update_body()
if(H.belt && wash_obj(H.belt))
H.update_inv_belt()
else
SEND_SIGNAL(M, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
else
SEND_SIGNAL(L, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
/obj/machinery/shower/proc/contamination_cleanse(atom/thing)
var/datum/component/radioactive/healthy_green_glow = thing.GetComponent(/datum/component/radioactive)
if(!healthy_green_glow || QDELETED(healthy_green_glow))
return
var/strength = healthy_green_glow.strength
if(strength <= RAD_BACKGROUND_RADIATION)
qdel(healthy_green_glow)
return
healthy_green_glow.strength -= max(0, (healthy_green_glow.strength - (RAD_BACKGROUND_RADIATION * 2)) * 0.2)
/obj/machinery/shower/process()
if(on)
wash_atom(loc)
+3 -3
View File
@@ -144,11 +144,11 @@
setDir(turn(dir, 90))
/obj/structure/sign/nanotrasen
name = "\improper Nanotrasen Logo"
desc = "A sign with the Nanotrasen Logo on it. Glory to Nanotrasen!"
name = "\improper Nanotrasen logo"
desc = "A sign with the Nanotrasen logo on it. Glory to Nanotrasen!"
icon_state = "nanotrasen"
/obj/structure/sign/logo
name = "nanotrasen logo"
name = "\improper Nanotrasen logo"
desc = "The Nanotrasen corporate logo."
icon_state = "nanotrasen_sign1"
+2 -2
View File
@@ -182,8 +182,8 @@
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
return
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
I.pixel_x = CLAMP(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
I.pixel_y = CLAMP(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
I.pixel_x = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
I.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
AfterPutItemOnTable(I, user)
return TRUE
else