From fd1bf82dfafd7afae975d7c73eb282de6b467231 Mon Sep 17 00:00:00 2001 From: Cameron653 Date: Sun, 8 May 2016 17:04:53 -0400 Subject: [PATCH] Adds weight machines and weight variables Exactly what it says on the tin. Weight descriptions aren't in yet, but the machines remove weight and nutrition. Compiles without errors/warnings. --- code/game/machinery/adv_med_vr.dm | 17 ++ code/modules/client/preferences_vr.dm | 0 code/modules/vore/eating/living_vr.dm | 4 +- code/modules/vore/eating/vore_vr.dm | 2 + code/modules/vore/weight/fit_vr.dmi | Bin 0 -> 2625 bytes .../vore/weight/fitness_machines_vr.dm | 154 ++++++++++++++++++ vorestation.dme | 3 + 7 files changed, 179 insertions(+), 1 deletion(-) create mode 100644 code/game/machinery/adv_med_vr.dm create mode 100644 code/modules/client/preferences_vr.dm create mode 100644 code/modules/vore/weight/fit_vr.dmi create mode 100644 code/modules/vore/weight/fitness_machines_vr.dm diff --git a/code/game/machinery/adv_med_vr.dm b/code/game/machinery/adv_med_vr.dm new file mode 100644 index 0000000000..fc3433bc87 --- /dev/null +++ b/code/game/machinery/adv_med_vr.dm @@ -0,0 +1,17 @@ +/* + +/obj/machinery/bodyscanner/proc/get_occupant_data_vr(list/incoming = list(),mob/living/carbon/human/H) + incoming["Weight"] = H.weight + return + + + +/obj/machinery/body_scanconsole/proc/med_info2(var/list/occ, var/dat = "Scan performed at [occ["stationtime"]]
") + dat += text("Body Weight (to scale): [occ["weight"]]lbs / [occ["weight"] / 2.20463]kg

") + +*/ +//WIP sleeper code. + +//attempt_vr(src,"get_occupant_data_vr",list(occupant_data,H)) //VOREStation Code + +//attempt_vr(src,"med_info2",list(occupant_data,occ)) //VOREStation Code \ No newline at end of file diff --git a/code/modules/client/preferences_vr.dm b/code/modules/client/preferences_vr.dm new file mode 100644 index 0000000000..e69de29bb2 diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 5b694f2323..8c0f615328 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -4,7 +4,9 @@ var/datum/belly/vore_selected // Default to no vore capability. var/list/vore_organs = list() // List of vore containers inside a mob var/absorbed = 0 // If a mob is absorbed into another - var/weight = 100 // Weight for mobs for weightgain system + var/weight = 137 // Weight for mobs for weightgain system + var/weight_gain = 1 //How fast you gain weight + var/weight_loss = 0.5 //How fast you lose weight // // Hook for generic creation of stuff on new creatures diff --git a/code/modules/vore/eating/vore_vr.dm b/code/modules/vore/eating/vore_vr.dm index edd07a0cd3..06b49f9510 100644 --- a/code/modules/vore/eating/vore_vr.dm +++ b/code/modules/vore/eating/vore_vr.dm @@ -35,6 +35,8 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE /datum/vore_preferences var/digestable = 1 var/list/belly_prefs = list() + var/weight_gain = 1 + var/weight_loss = 0.5 // // Adding procs to types to support vore diff --git a/code/modules/vore/weight/fit_vr.dmi b/code/modules/vore/weight/fit_vr.dmi new file mode 100644 index 0000000000000000000000000000000000000000..79ff63d14849756f6dcbe87f44c962412bd7c90f GIT binary patch literal 2625 zcmY*bdpOhkAOCKyEorHd>lO+X#v(Lrq@r?(CFL3=vJ){gg>6kFcPerl)rp-`B9>{i zImpq?a$P4ULoP*_Ft=@I=lss|oagt)=kvNe@7MEwKkv^!pEM7*qnjXF5C8x+xi~v{ z%8>i_QI?b47r-S}GN|`Bfji9Qa`p7|Zr!>S8yl;mqqAYd1}iHo8yg!>PcM5k8U};8 z96f4bVPR@!YGPu7!C)@qBV1iwX^C<5zdk6)N#ioBKXt!h(2F{nnXys$c>*juJ8OD! z@>?H&jNLXGvTpT!+MQnYt>O>khM@lFosrR1&Uvx@z)Ib|c`a5w-Z&41r+A`>8jr<)gm z9p{J21nVl!hv0M}CL}sMiVz-o830HnUfxmBv7!a9DB_E(~|N_cnZR`9+y>btKqYn*}CYA-vxGwy2|#N4&r6f4erxN;$6 z67!W{mz&{cb6>SP=-5dN{>jprGllbvc*sXx4M-p1OEr!%{#;#b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}?8Isq4{4O@7sU1z ztbFvt(n=0d2I-vqhW(9B&6FdyG|HDTVyv9mh(CxnsX#P@qg;I?V_bX z7$ybPiiGm18TuVKMYP_OIb!KxnIPxnF^k)v?2fgKB_fJCw`}RIopGK zsU4L*rcdTWVF8CLY zY!$7Vy^5f|p}45IVU zFe&^7Kq|qWm2mp_k>Yv@cJBKuZ&mItoBVV!e^t)ZnA0lj2a|#%Q$^23fCfkQjRIT_ LyE#=m23`LP3-$zI literal 0 HcmV?d00001 diff --git a/code/modules/vore/weight/fitness_machines_vr.dm b/code/modules/vore/weight/fitness_machines_vr.dm new file mode 100644 index 0000000000..dcfa2c1fb4 --- /dev/null +++ b/code/modules/vore/weight/fitness_machines_vr.dm @@ -0,0 +1,154 @@ +/obj/machinery/workout + name = "fitness lifter" + icon = 'code/modules/vore/weight/fit_vr.dmi' + icon_state = "fitnesslifter" //Sprites ripped from goon. + desc = "A utility often used to lose weight." + anchored = 1 + use_power = 0 + idle_power_usage = 0 + active_power_usage = 0 + +/obj/machinery/workout/attackby(obj/item/W, var/mob/living/user) + if(istype(W, /obj/item/weapon/wrench)) + src.add_fingerprint(user) + user.visible_message("[user] has [anchored ? "un" : ""]secured \the [src].", "You [anchored ? "un" : ""]secure \the [src].") + anchored = !anchored + playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + return + +/obj/machinery/workout/attack_hand(var/mob/living/user) + if(!anchored) + user << "For safety reasons, you are required to have this equipment wrenched down before using it!" + return + if(user.loc != src.loc) + user << "For safety reasons, you need to be sitting in the fitness lifter for it to work!" + return + if(user.nutrition > 70 && user.weight > 70) //If they have enough nutrition and body weight, they can exercise. + user.dir = src.dir + user.nutrition = user.nutrition - 20 //Working out burns a lot of calories! + user.weight = user.weight - 0.05 //Burn a bit of weight. Not much, but quite a bit. This can't be spammed, as they'll need nutrition to be able to work out. + icon_state = "fitnesslifter2" + user << "You lift some weights." + sleep(50) + icon_state = "fitnesslifter" + + + else if(user.nutrition < 70) + user << "You need more energy to workout on the mat!" + + else if(user.weight < 70) + user << "You're too skinny to risk losing any more weight!" + + else + user << "You're unable to use the fitness lifter." + return //Something went wrong. They shouldn't see this. + +/obj/machinery/workout/shipped + anchored = 0 // For cargo. + + +/obj/machinery/punching_bag + name = "punching bag" + icon = 'code/modules/vore/weight/fit_vr.dmi' + icon_state = "punchingbag" + desc = "A bag often used to releive stress and burn fat." + anchored = 1 + density = 1 + use_power = 0 + idle_power_usage = 0 + active_power_usage = 0 + +/obj/machinery/punching_bag/attack_hand(var/mob/living/user) + + if(user.nutrition > 35 && user.weight > 70) //If they have enough nutrition and body weight, they can exercise. + var/workout = rand(1,2) + user.nutrition = user.nutrition - 10 //A punching bag uses less calories. + user.weight = user.weight - 0.025 //And burns less weight. + icon_state = "punchingbag2" + switch(workout) + if(1) + user << "You slam your fist into the punching bag." + if(2) + user << "You jab the punching bag with your elbow." + playsound(src.loc, "punch", 50, 1) + sleep(50) + icon_state = "punchingbag" + + + else if(user.nutrition < 35) + user << "You need more energy to workout on the mat!" + + else if(user.weight < 70) + user << "You're too skinny to risk losing any more weight!" + + else + user << "You're unable to use the punching bag." + return //Something went wrong. They shouldn't see this. + + +/obj/machinery/punching_clown + name = "clown punching bag" + icon = 'code/modules/vore/weight/fit_vr.dmi' + icon_state = "bopbag" + desc = "A bag often used to releive stress and burn fat. It has a clown on the front of it." + anchored = 0 + density = 1 + use_power = 0 + idle_power_usage = 0 + active_power_usage = 0 + +/obj/machinery/punching_clown/attack_hand(var/mob/living/user) + + if(user.nutrition > 35 && user.weight > 70) //If they have enough nutrition and body weight, they can exercise. + var/workout = rand(1,4) + user.nutrition = user.nutrition - 10 + user.weight = user.weight - 0.025 + icon_state = "bopbag2" + switch(workout) + if(1) + user << "You slam your fist into the punching bag." + if(2) + user << "You jab the punching bag with your elbow." + if(3) + user << "You hammer the clown right in it's face with your fist." + if(4) + user << "A honk emits from the punching bag as you hit it." + playsound(src.loc, "punch", 50, 1) + playsound(src.loc, "clownstep", 50, 1) + playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1) + sleep(50) + icon_state = "bopbag" + + + else if(user.nutrition < 35) + user << "You need more energy to workout on the mat!" + + else if(user.weight < 70) + user << "You're too skinny to risk losing any more weight!" + + else + user << "You're unable to use the punching bag." + return //Something went wrong. They shouldn't see this. + + + + +/obj/machinery/scale + name = "scale" + icon = 'code/modules/vore/weight/fit_vr.dmi' + icon_state = "scale" + desc = "A scale used to measure ones weight relative to their size and species." + anchored = 1 // Set to 0 when we can construct or dismantle these. + use_power = 0 + idle_power_usage = 0 + active_power_usage = 0 + var/kilograms + +/obj/machinery/scale/attack_hand(var/mob/living/user) + if(user.loc != src.loc) + user << "You need to be standing on top of the scale for it to work!" + return + if(user.weight) //Just in case. + kilograms = round(text2num(user.weight),4) / 2.20463 + user << "Your relative weight is [user.weight]lb / [kilograms]kg." + user.visible_message("[user]'s relative weight is [user.weight]lb / [kilograms]kg.") diff --git a/vorestation.dme b/vorestation.dme index 0085f19409..8fe9400a3f 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -374,6 +374,7 @@ #include "code\game\jobs\job\security.dm" #include "code\game\jobs\job\silicon.dm" #include "code\game\machinery\adv_med.dm" +#include "code\game\machinery\adv_med_vr.dm" #include "code\game\machinery\ai_slipper.dm" #include "code\game\machinery\alarm.dm" #include "code\game\machinery\atmo_control.dm" @@ -990,6 +991,7 @@ #include "code\modules\client\preferences_savefile.dm" #include "code\modules\client\preferences_spawnpoints.dm" #include "code\modules\client\preferences_toggle_procs.dm" +#include "code\modules\client\preferences_vr.dm" #include "code\modules\client\ui_style.dm" #include "code\modules\client\preference_setup\preference_setup.dm" #include "code\modules\client\preference_setup\antagonism\01_basic.dm" @@ -1889,6 +1891,7 @@ #include "code\modules\vore\eating\vore_vr.dm" #include "code\modules\vore\eating\vorehooks_vr.dm" #include "code\modules\vore\eating\vorepanel_vr.dm" +#include "code\modules\vore\weight\fitness_machines_vr.dm" #include "code\modules\xgm\xgm_gas_data.dm" #include "code\modules\xgm\xgm_gas_mixture.dm" #include "code\unit_tests\loadout_tests.dm"