mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-12 00:20:55 +01:00
Merge pull request #187 from Alphas00/master
Dream Breaker, Adipoelectric machine tweak, fatness hiding tweak
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
|
||||
/obj/machinery/power/adipoelectric_generator/process()
|
||||
if(!occupant)
|
||||
src.visible_message("<span class='alert'>The [src] buzzes. It needs someon inside.</span>")
|
||||
playsound(src, 'sound/machines/buzz-two.ogg', 50)
|
||||
return PROCESS_KILL
|
||||
if(occupant:fatness_real > 0 && powernet && anchored && (emp_timer < world.time))
|
||||
@@ -57,6 +58,7 @@
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
emp_timer = world.time + 600
|
||||
if(occupant)
|
||||
src.visible_message("<span class='alert'>The [src] buzzes and expels anyone inside!.</span>")
|
||||
open_machine()
|
||||
|
||||
/obj/machinery/power/adipoelectric_generator/attackby(obj/item/P, mob/user, params)
|
||||
@@ -107,6 +109,7 @@
|
||||
add_fingerprint(occupant)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
src.visible_message("<span class='alert'>[src] needs to be anchored to a working wire and have a person going inside!</span>")
|
||||
open_machine()
|
||||
|
||||
/obj/machinery/power/adipoelectric_generator/update_icon()
|
||||
@@ -136,6 +139,13 @@
|
||||
QDEL_NULL(soundloop)
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/power/adipoelectric_generator/examine(mob/user)
|
||||
. = ..()
|
||||
if(is_operational())
|
||||
. += "<span class='notice'>[src]'s show it can produce <b>[conversion_rate * laser_modifier]W</b> per adipose unit, taking in <b>[max_fat]</b> max each time.</span>"
|
||||
else
|
||||
. += "<span class='notice'><b>[src]'s display is currently offline.</b></span>"
|
||||
|
||||
/obj/item/circuitboard/machine/power/adipoelectric_generator
|
||||
name = "Adipoelectric Generator (Machine Board)"
|
||||
build_path = /obj/machinery/power/adipoelectric_generator
|
||||
|
||||
@@ -18,6 +18,7 @@ GLOBAL_LIST_EMPTY(adipoelectric_transformer)
|
||||
var/conversion_rate = 0.000001
|
||||
var/emp_timer = 0
|
||||
var/emp_multiplier = 5
|
||||
var/datum/powernet/PN
|
||||
|
||||
/obj/machinery/adipoelectric_transformer/Initialize()
|
||||
. = ..()
|
||||
@@ -32,9 +33,10 @@ GLOBAL_LIST_EMPTY(adipoelectric_transformer)
|
||||
if(!is_operational())
|
||||
return
|
||||
if(!attached)
|
||||
src.visible_message("<span class='alert'>[src] buzzes. Seems like it's not attached to a working power net.</span>")
|
||||
playsound(src, 'sound/machines/buzz-two.ogg', 50)
|
||||
return PROCESS_KILL
|
||||
var/datum/powernet/PN = attached.powernet
|
||||
PN = attached.powernet
|
||||
if(PN)
|
||||
power_avaliable = PN.netexcess
|
||||
update_icon()
|
||||
@@ -59,6 +61,7 @@ GLOBAL_LIST_EMPTY(adipoelectric_transformer)
|
||||
. = ..()
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
if(occupant)
|
||||
src.visible_message("<span class='alert'>[src] emits ominous cracking noises!</span>")
|
||||
emp_timer = world.time //stuck in for 600 ticks, about 60 seconds
|
||||
|
||||
/obj/machinery/adipoelectric_transformer/attackby(obj/item/P, mob/user, params)
|
||||
@@ -101,6 +104,7 @@ GLOBAL_LIST_EMPTY(adipoelectric_transformer)
|
||||
GLOB.adipoelectric_transformer += src
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
src.visible_message("<span class='alert'>[src] buzzes. There must be another a person going in an no other transformer active in the area.</span>")
|
||||
playsound(src, 'sound/machines/buzz-two.ogg', 50)
|
||||
open_machine()
|
||||
|
||||
@@ -133,6 +137,19 @@ GLOBAL_LIST_EMPTY(adipoelectric_transformer)
|
||||
. = ..()
|
||||
GLOB.adipoelectric_transformer -= src
|
||||
|
||||
/obj/machinery/adipoelectric_transformer/examine(mob/user)
|
||||
. = ..()
|
||||
if(is_operational() && attached)
|
||||
if(PN)
|
||||
if(lastprocessed)
|
||||
. += "<span class='notice'>[src]'s last reading on display was <b>[lastprocessed * recharge_speed]</b> adipose units.</span>"
|
||||
else
|
||||
. += "<span class='notice'>[src] has no last reading.</span>"
|
||||
else
|
||||
. += "<span class='notice'>[src]'s display states 'ERROR'. There must be something wrong with the power.</b></span>"
|
||||
else
|
||||
. += "<span class='notice'><b>[src]'s display is currently offline.</b></span>"
|
||||
|
||||
/obj/item/circuitboard/machine/adipoelectric_transformer
|
||||
name = "Adipoelectric Transformer (Machine Board)"
|
||||
build_path = /obj/machinery/adipoelectric_transformer
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
// -fatness_real is the value a mob is actually at, even if it's being hidden. For permanent changes, use this one
|
||||
//What level of fatness is the parent mob currently at?
|
||||
var/fatness = 0
|
||||
//Is something overriding the actual fatness value of a character?
|
||||
var/fatness_hidden = FALSE
|
||||
//The actual value a mob is at. Is equal to fatness if fatness_hidden is FALSE.
|
||||
//Is something hiding the actual fatness value of a character?
|
||||
var/fat_hider = FALSE
|
||||
//The actual value a mob is at. Is equal to fatness if fat_hider is FALSE.
|
||||
var/fatness_real = 0
|
||||
//The value a mob's fatness is being overwritten with if fatness_hidden is TRUE.
|
||||
//The value a mob's fatness is being overwritten with if fat_hider has something in it.
|
||||
var/fatness_over = 0
|
||||
///At what rate does the parent mob gain weight? 1 = 100%
|
||||
var/weight_gain_rate = 1
|
||||
@@ -44,7 +44,7 @@
|
||||
if(client?.prefs?.max_weight) // GS13
|
||||
fatness_real = min(fatness_real, (client?.prefs?.max_weight - 1))
|
||||
|
||||
if(fatness_hidden) //If a character's real fatness is being hidden
|
||||
if(fat_hider) //If a character's real fatness is being hidden
|
||||
if(client?.prefs?.max_weight) //Check their prefs
|
||||
fatness_over = min(fatness_over, (client?.prefs?.max_weight - 1)) //And make sure it's not above their preferred max
|
||||
|
||||
@@ -102,8 +102,8 @@
|
||||
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/proc/fat_hide(hide_amount) //If something wants to hide fatness_real, it'll call this method and give it an amount to cover it with
|
||||
fatness_hidden = TRUE
|
||||
/mob/living/carbon/proc/fat_hide(hide_amount, hide_source) //If something wants to hide fatness_real, it'll call this method and give it an amount to cover it with
|
||||
fat_hider = hide_source
|
||||
fatness_over = hide_amount
|
||||
fatness = fatness_over //To update a mob's fatness with the new amount to be shown immediately
|
||||
if(client?.prefs?.weight_gain_extreme)
|
||||
@@ -112,7 +112,7 @@
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/proc/fat_show() //If something that hides fatness is removed or expires, it'll call this method
|
||||
fatness_hidden = FALSE
|
||||
fat_hider = FALSE
|
||||
fatness = fatness_real //To update a mob's fatness with their real one immediately
|
||||
if(client?.prefs?.weight_gain_extreme)
|
||||
xwg_resize()
|
||||
|
||||
@@ -8,13 +8,14 @@
|
||||
equip_sound = 'sound/items/equip/toolbelt_equip.ogg'
|
||||
drop_sound = 'sound/items/handling/toolbelt_drop.ogg'
|
||||
pickup_sound = 'sound/items/handling/toolbelt_pickup.ogg'
|
||||
var/hide_value = 0
|
||||
|
||||
/obj/item/bluespace_belt/equipped(mob/user, slot)
|
||||
..()
|
||||
var/mob/living/carbon/U = user
|
||||
if(slot == SLOT_BELT)
|
||||
to_chat(user, "<span class='notice'>You put the belt around your waist and your mass begins to shrink...</span>")
|
||||
U.fat_hide(0)
|
||||
U.fat_hide(hide_value, src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The belt is opened, letting your mass flow out!</span>")
|
||||
U.fat_show()
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
/obj/item/nullrod/attack(mob/target, mob/living/user)
|
||||
. = ..()
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/T = target
|
||||
if(T.fat_hider)
|
||||
if(isitem(T.fat_hider))
|
||||
var/obj/item/O = T.fat_hider
|
||||
T.dropItemToGround(O)
|
||||
if(T.cursed_fat == 1)
|
||||
T.cursed_fat = 0
|
||||
T.fattening_steps_left = 0
|
||||
|
||||
/obj/item/storage/book/bible/attack(mob/living/M, mob/living/carbon/human/user, heal_mode = TRUE)
|
||||
. = ..()
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/T = M
|
||||
if(T.fat_hider)
|
||||
if(isitem(T.fat_hider))
|
||||
var/obj/item/O = T.fat_hider
|
||||
T.dropItemToGround(O)
|
||||
if(T.cursed_fat == 1)
|
||||
T.cursed_fat = 0
|
||||
T.fattening_steps_left = 0
|
||||
|
||||
/datum/reagent/water/holywater/on_mob_life(mob/living/carbon/M)
|
||||
. = ..()
|
||||
if(M.fat_hider)
|
||||
if(isitem(M.fat_hider))
|
||||
var/obj/item/O = M.fat_hider
|
||||
M.dropItemToGround(O)
|
||||
if(M.cursed_fat == 1)
|
||||
M.cursed_fat = 0
|
||||
M.fattening_steps_left = 0
|
||||
|
||||
/obj/item/nullrod/dream_breaker
|
||||
name = "dream breaker"
|
||||
desc = "A cross-shaped weapon emitting a faint, dream-like light. Its blows will wake any dreamer."
|
||||
icon = 'GainStation13/icons/obj/dreambreaker.dmi'
|
||||
icon_state = "dreambreaker"
|
||||
item_state = "dreambreaker"
|
||||
lefthand_file = 'GainStation13/icons/obj/dreambreaker_left.dmi'
|
||||
righthand_file = 'GainStation13/icons/obj/dreambreaker_right.dmi'
|
||||
|
||||
actions_types = list(/datum/action/item_action/db_slide)
|
||||
var/slidedistance = 2
|
||||
var/slidespeed = 3
|
||||
var/stamina_cost = 34
|
||||
|
||||
force = 20
|
||||
throwforce = 25
|
||||
throw_range = 10
|
||||
throw_speed = 2
|
||||
var/click_delay = 2
|
||||
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
sharpness = IS_BLUNT
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
attack_verb = list("smashed", "whacked", "smacked", "bonked")
|
||||
hitsound = "swing_hit"
|
||||
|
||||
var/l_range = 3
|
||||
var/l_power = 0.8
|
||||
light_color = "#FFCC66"
|
||||
|
||||
/obj/item/nullrod/dream_breaker/Initialize()
|
||||
. = ..()
|
||||
set_light(l_range, l_power, light_color)
|
||||
|
||||
/obj/item/nullrod/dream_breaker/attack(mob/living/target, mob/living/user)
|
||||
. = ..()
|
||||
user.changeNext_move(CLICK_CD_MELEE * click_delay)
|
||||
|
||||
/obj/item/nullrod/dream_breaker/ui_action_click(mob/user, action)
|
||||
if(!isliving(user))
|
||||
return
|
||||
|
||||
var/atom/target = get_edge_target_turf(user, user.dir) //gets the user's direction
|
||||
user.resting = TRUE
|
||||
if(user:getStaminaLoss() < 100)
|
||||
if (user.throw_at(target, slidedistance, slidespeed, spin = FALSE, diagonals_first = TRUE))
|
||||
user:adjustStaminaLoss(stamina_cost) //reduce stamina loss by 0.3 per tick, 6 per 2 seconds
|
||||
user.visible_message("<span class='warning'>[usr] slides forward!</span>")
|
||||
user.resting = FALSE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Something prevents you from sliding forward!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You fall down when attempting to slide!</span>")
|
||||
|
||||
/datum/action/item_action/db_slide
|
||||
name = "Dream Breaker Slide"
|
||||
desc = "Use dream-like atheletics to slide forward, but don't wear yourself out!."
|
||||
icon_icon = 'GainStation13/icons/obj/dreambreaker.dmi'
|
||||
button_icon_state = "dreambreaker"
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 658 B |
Binary file not shown.
|
After Width: | Height: | Size: 446 B |
Binary file not shown.
|
After Width: | Height: | Size: 440 B |
@@ -3124,6 +3124,7 @@
|
||||
#include "GainStation13\code\modules\vending\gatocola.dm"
|
||||
#include "GainStation13\code\modules\vending\mealdor.dm"
|
||||
#include "GainStation13\code\obj\items\bluespace_belt.dm"
|
||||
#include "GainStation13\code\obj\items\holy.dm"
|
||||
#include "GainStation13\code\obj\items\minor_items.dm"
|
||||
#include "GainStation13\code\obj\structure\calorite_doors.dm"
|
||||
#include "GainStation13\code\obj\structure\candylight.dm"
|
||||
|
||||
Reference in New Issue
Block a user