Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
TaculoTaculo committed Mar 31, 2024
2 parents fbf56ec + b4f3f94 commit 3d38d11
Show file tree
Hide file tree
Showing 116 changed files with 3,055 additions and 719 deletions.
Binary file modified ModularTegustation/Teguicons/224x128.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/64x64.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/tegu_effects10x10.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/tegumobs.dmi
Binary file not shown.
8 changes: 6 additions & 2 deletions ModularTegustation/_adventure_console/adventure_layout.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* TEXT BASED ADVENTURES
* Adventures that are mostly predefined paths.
* This was difficult to finalize since i havent made a text based adventure before.
* Special defines such as button macros are in the code/_DEFINES/~lobotomy_defines.dm
*/

/datum/adventure_layout
Expand Down Expand Up @@ -160,7 +161,7 @@

/datum/adventure_layout/proc/TravelUI(obj/machinery/call_machine)
switch(travel_mode)
if(ADVENTURE_MODE_BATTLE to ADVENTURE_MODE_EVENT_BATTLE)
if(ADVENTURE_MODE_BATTLE, ADVENTURE_MODE_EVENT_BATTLE)
if(!enemy_desc)
GenerateEnemy()
. += BattleModeDisplay(call_machine)
Expand Down Expand Up @@ -259,7 +260,7 @@

/*I put || in here and the code got upset so i have to do TO instead
Eugh maybe we will fix it later on if adventure mode event battle stops being 3. -IP*/
if(ADVENTURE_MODE_BATTLE to ADVENTURE_MODE_EVENT_BATTLE)
if(ADVENTURE_MODE_BATTLE, ADVENTURE_MODE_EVENT_BATTLE)
BattleModeReact(num)

//Reactions for adventure based on mode.
Expand Down Expand Up @@ -291,6 +292,9 @@
temp_text += "<br>YOU RUN AWAY FROM YOUR OPPONENT<br>5 DAMAGE HEALED<br>EVENT PROGRESS -5<br>"
AdjustHP(5)
AdjustProgress(-5)
paths_to_tread.Cut()
enemy_desc = null
travel_mode = ADVENTURE_MODE_TRAVEL
else
DoBattle(0)
temp_text += "<br>YOU FAIL TO ESCAPE THE ENEMY<br>"
Expand Down
70 changes: 65 additions & 5 deletions ModularTegustation/_adventure_console/console.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
density = TRUE
//Keepin it simple and soft coded.
var/datum/adventure_layout/adventure_data
//Saved profiles that are password locked
var/list/profile_list = list()

//Console with debug text adventure program for testing.
/obj/machinery/text_adventure_console/debug/Initialize()
. = ..()
if(!adventure_data)
adventure_data = new(TRUE)
NewProfile(TRUE)

//Stolen from nanite_program_hub.dm
/obj/machinery/text_adventure_console/update_overlays()
Expand All @@ -28,9 +29,12 @@
if(isliving(user))
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
var/dat
if(!adventure_data)
adventure_data = new
dat += adventure_data.Adventure(src, user)
if(adventure_data)
dat += adventure_data.Adventure(src, user)
dat += "<br><A href='byond://?src=[REF(src)];log_out_profile=[REF(src)]'>LOG OUT</A><br>\
<A href='byond://?src=[REF(src)];new_profile_password=[REF(src)]'>CREATE PASSWORD</A>"
else
dat += ProfileMenu()
var/datum/browser/popup = new(user, "Adventure", "AdventureTest", 500, 600)
popup.set_content(dat)
popup.open()
Expand All @@ -47,6 +51,39 @@
usr.set_machine(src)
add_fingerprint(usr)

//Profile Selection
if(href_list["profile"])
var/set_profile = profile_list[text2num(href_list["profile"])]
if(!set_profile)
updateUsrDialog()
return TRUE
if(profile_list[set_profile] != null)
var/input_password = input(usr, "PLEASE TYPE IN PASSWORD", "PASSWORD INPUT") as null|num
if(input_password != profile_list[set_profile])
to_chat(usr, span_notice("INCORRECT PASSWORD"))
return TRUE
adventure_data = set_profile
updateUsrDialog()
return TRUE

if(href_list["log_out_profile"])
adventure_data = null
updateUsrDialog()
return TRUE

if(href_list["new_profile"])
NewProfile()
updateUsrDialog()
return TRUE

if(href_list["new_profile_password"])
var/new_password = input(usr, "PLEASE TYPE IN 3 DIGIT PASSWORD", "PASSWORD INPUT") as null|num
if(new_password)
profile_list[adventure_data] = clamp(new_password,100,999)
to_chat(usr, span_notice("PASSWORD SUCCESSFULLY CHANGED TO [profile_list[adventure_data]]"))
updateUsrDialog()
return TRUE

//Setting display menu for the text adventure.
if(href_list["set_display"])
var/set_display = text2num(href_list["set_display"])
Expand Down Expand Up @@ -110,3 +147,26 @@
playsound(get_turf(src), 'sound/machines/pda_button2.ogg', 50, TRUE)
updateUsrDialog()
return TRUE

/obj/machinery/text_adventure_console/proc/ProfileMenu(href, href_list)
. = "<tt>\
-------------------<br>\
|PROFILE SELECTION|<br>\
-------------------<br></tt>"
var/profile_num = 1
for(var/i in profile_list)
if(i)
. += "|<A href='byond://?src=[REF(src)];profile=[profile_num]'>PROFILE [profile_num]</A><br>"
profile_num++

. += "|<A href='byond://?src=[REF(src)];new_profile=[ref(src)]'>NEW PROFILE</A><br>\
<tt>-----------------</tt>"

/obj/machinery/text_adventure_console/proc/NewProfile(debug_profile = FALSE)
if(profile_list.len > 4)
to_chat(usr, span_notice("MAXIMUM PROFILES REACHED"))
return
var/new_profile = new /datum/adventure_layout(debug_profile)
profile_list += new_profile
profile_list[new_profile] = null
adventure_data = new_profile
177 changes: 177 additions & 0 deletions ModularTegustation/lc13_machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,180 @@
if(C.linked_console)
LAZYADD(abnormalities, "[C.AbnormalityInfo()]: [C.relative_location]")
sortList(abnormalities)

/*---------------\
|Torso Fabricator|
\---------------*/
#define ANIMATE_FABRICATOR_ACTIVE flick("fab_robot_a", src)
/*
* When someone who has the time to convert tegu cloners
* into ours you can remove this code. -IP
*/
/obj/machinery/body_fabricator
name = "torso fabricator"
desc = "A fabricator for constructing humanoid bodies for the bodiless. Place a brain inside and activate! -NO REFUNDS-."
icon = 'icons/mob/hivebot.dmi'
icon_state = "fab_robot"
density = TRUE
layer = BELOW_OBJ_LAYER
use_power = NO_POWER_USE
var/active = FALSE
var/stored_money = 0
var/prosthetic_cost = 300
var/organic_cost = 1200
var/obj/item/organ/brain/slotted_brain

/obj/machinery/body_fabricator/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/holochip))
var/obj/item/holochip/H = I
var/ahn_amount = H.get_item_credit_value()
H.spend(ahn_amount)
AdjustMoney(ahn_amount)
return

if(!slotted_brain)
if(istype(I, /obj/item/bodypart/head))
var/obj/item/bodypart/head/heed = I
if(heed.brain)
SlottedHead(heed)
return
if(istype(I, /obj/item/organ/brain))
var/obj/item/organ/brain/B = I
SlottedBrain(B)
return
..()

/obj/machinery/body_fabricator/ui_interact(mob/user)
. = ..()
if(isliving(user))
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
var/dat
dat += "<b>FABRICATION_FUNDS: [stored_money]</b><br>----------------------<br>"
if(slotted_brain)
if(slotted_brain)
dat += "BRAIN DETECTED|<br>--<br>"
dat += " <A href='byond://?src=[REF(src)];PRINT_PROSTHETIC=[REF(src)]'>PRINT PROSTHETIC TORSO: [prosthetic_cost] AHN:</A><br>"
dat += " Areas of the body have been replaced with scrap prosthetics. Clients have claimed to suffer a small attribute decrease.<br>"
dat += " <A href='byond://?src=[REF(src)];PRINT_ORGANIC=[REF(src)]'>PRINT ORGANIC TORSO: [organic_cost] AHN</A><br>"
dat += " Through undisclosed means we will print you a new torso with no attribute decay.<br>"
else
dat += "<b>NO BRAIN DETECTED|</b><br>--<br>"
var/datum/browser/popup = new(user, "body_fab", "body fabricator", 500, 550)
popup.set_content(dat)
popup.open()
return

/obj/machinery/body_fabricator/Topic(href, href_list)
. = ..()
if(.)
return .
if(ishuman(usr))
usr.set_machine(src)
add_fingerprint(usr)
if(href_list["PRINT_PROSTHETIC"])
if(stored_money < prosthetic_cost)
return
ConstructTorso(2)
AdjustMoney(-prosthetic_cost)
updateUsrDialog()
return TRUE
if(href_list["PRINT_ORGANIC"])
if(stored_money < organic_cost)
return
ConstructTorso(1)
AdjustMoney(-organic_cost)
updateUsrDialog()
return TRUE

/obj/machinery/body_fabricator/proc/AdjustMoney(amount)
stored_money += amount

/*
* In Library of Ruina there is a fixer that has their body
* damaged by clowns so their coworkers behead them and take
* them to get a new body cloned for them. That is the
* inspiration for the torso fabricator.
*/
/obj/machinery/body_fabricator/proc/SlottedBrain(obj/item/organ/brain/B)
if(slotted_brain)
return FALSE
slotted_brain = B
B.forceMove(src)
return TRUE

/obj/machinery/body_fabricator/proc/SlottedHead(obj/item/bodypart/head/H)
if(slotted_brain)
return FALSE
if(!H.brain)
return FALSE
slotted_brain = H.brain
H.drop_organs()
slotted_brain.forceMove(src)
qdel(H)
return TRUE

/*
* Okay so when your gibbed your head contains your brainmob
* but when your brain is cut out of the head the brain now
* contains the brainmob. The brainmob is the one who has
* the previous owners dna stored in it.
*/
/obj/machinery/body_fabricator/proc/ConstructTorso(biotype = 1)
playsound(get_turf(src), 'sound/machines/click.ogg', 10, TRUE)
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src)
//YOU DIDNT PAY FOR LIMBS
RemoveAllLimbs(H)

//DNA TRANSFER GO!!!
if(slotted_brain)
var/mob/living/brain/B = locate(/mob/living/brain) in slotted_brain
var/datum/dna/gibbed_dna = B.stored_dna
if(gibbed_dna)
H.real_name = gibbed_dna.real_name
gibbed_dna.transfer_identity(H)

//BRAIN INSERTION
if(slotted_brain)
slotted_brain.Insert(H)

//REVIVE
H.revive(full_heal = FALSE, admin_revive = FALSE)
H.emote("gasp")
H.Jitter(100)

//YOU DIDNT PAY FOR PREMIUM SO WE ARE MAKING YOUR BODY WORSE
if(biotype == 2)
RoboticizeBody(H)
H.adjust_all_attribute_levels(-5)
H.updateappearance()
DumpBody(H)

/obj/machinery/body_fabricator/proc/RoboticizeBody(mob/living/carbon/human/H)
var/obj/item/bodypart/head/robot/robohead = new /obj/item/bodypart/head/robot(src)
var/old_head = H.get_bodypart(BODY_ZONE_HEAD)
robohead.replace_limb(H)
qdel(old_head)

var/obj/item/bodypart/chest/robot/robobody = new /obj/item/bodypart/chest/robot(src)
var/refuse = H.get_bodypart(BODY_ZONE_CHEST)
robobody.replace_limb(H)
qdel(refuse)

/obj/machinery/body_fabricator/proc/RemoveAllLimbs(mob/living/carbon/human/H)
var/static/list/zones = list(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG)
for(var/zone in zones)
var/obj/item/bodypart/BP = H.get_bodypart(zone)
if(BP)
BP.drop_limb()
qdel(BP)

/obj/machinery/body_fabricator/proc/DumpBody(mob/living/carbon/human/dude)
slotted_brain = null
ANIMATE_FABRICATOR_ACTIVE
playsound(get_turf(src), 'sound/effects/cashregister.ogg', 35, 3, 3)
sleep(32)
playsound(get_turf(src), 'sound/effects/bin_close.ogg', 35, 3, 3)
playsound(get_turf(src), 'sound/misc/splort.ogg', 35, 3, 3)
dude.forceMove(get_turf(src))

#undef ANIMATE_FABRICATOR_ACTIVE
Loading

0 comments on commit 3d38d11

Please sign in to comment.