Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ stddef.dm

# ignore midi2piano build cache
/tools/midi2piano/midi2piano/obj/*
paradise.dme
7 changes: 5 additions & 2 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@
"blue" = "grey", \
"green" = "grey", \
"orange" = "light grey", \
"yellow" = "light grey", \
"brown" = "grey", \
"gold" = "light grey", \
"cyan" = "silver", \
Expand All @@ -283,8 +284,9 @@
"red" = "darkolivegreen", \
"green" = "darkslategrey", \
"orange" = "goldenrod", \
"gold" = "goldenrod", \
"yellow" = "goldenrod", \
"brown" = "darkolivegreen", \
"gold" = "goldenrod", \
"cyan" = "steelblue", \
"magenta" = "blue", \
"purple" = "darkslategrey", \
Expand All @@ -298,8 +300,9 @@
"blue" = "darkslateblue", \
"green" = "darkolivegreen", \
"orange" = "darkkhaki", \
"gold" = "darkkhaki", \
"yellow" = "darkkhaki", \
"brown" = "rebeccapurple", \
"gold" = "darkkhaki", \
"cyan" = "darkseagreen", \
"magenta" = "darkslateblue", \
"purple" = "darkslateblue", \
Expand Down
3 changes: 1 addition & 2 deletions code/datums/helper_datums/construction_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
var/list/steps
var/atom/holder
var/result
var/index
var/list/steps_desc
var/taskpath = null // Path of job objective completed.

Expand Down Expand Up @@ -128,7 +129,6 @@
return TRUE

/datum/construction/reversible
var/index

/datum/construction/reversible/New(atom)
..()
Expand Down Expand Up @@ -168,7 +168,6 @@
#define state_prev "prev"

/datum/construction/reversible2
var/index
var/base_icon = "durand"

/datum/construction/reversible2/New(atom)
Expand Down
24 changes: 15 additions & 9 deletions code/game/machinery/machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -523,15 +523,21 @@ Class Procs:
break
for(var/obj/item/stock_parts/B in W.contents)
if(istype(B, P) && istype(A, P))
if(B.rating > A.rating)
W.remove_from_storage(B, src)
W.handle_item_insertion(A, 1)
component_parts -= A
component_parts += B
B.loc = null
to_chat(user, "<span class='notice'>[A.name] replaced with [B.name].</span>")
shouldplaysound = 1
break
if(ispath(B.type, /obj/item/stock_parts/cell))
var/obj/item/stock_parts/cell/tA = A
var/obj/item/stock_parts/cell/tB = B
if(!(tB.maxcharge > tA.maxcharge) && !((tB.maxcharge == tA.maxcharge) && (tB.charge > tA.charge)))
continue
else if(B.rating <= A.rating)
continue
W.remove_from_storage(B, src)
W.handle_item_insertion(A, 1)
component_parts -= A
component_parts += B
B.loc = null
to_chat(user, "<span class='notice'>[A.name] replaced with [B.name].</span>")
shouldplaysound = 1
break
RefreshParts()
else
to_chat(user, display_parts(user))
Expand Down
20 changes: 10 additions & 10 deletions code/game/mecha/mecha_construction_paths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -767,13 +767,13 @@
/datum/construction/mecha/honker_chassis/spawn_result()
..("Honker")
var/obj/item/mecha_parts/chassis/const_holder = holder
const_holder.construct = new /datum/construction/mecha/honker(const_holder)
const_holder.construct = new /datum/construction/reversible/mecha/honker(const_holder)
const_holder.density = 1
qdel(src)
return


/datum/construction/mecha/honker
/datum/construction/reversible/mecha/honker
result = "/obj/mecha/combat/honker"
steps = list(list("key"=/obj/item/bikehorn),//1
list("key"=/obj/item/clothing/shoes/clown_shoes),//2
Expand All @@ -788,10 +788,10 @@
list("key"=/obj/item/bikehorn),//11
)

/datum/construction/mecha/honker/action(atom/used_atom,mob/user as mob)
/datum/construction/reversible/mecha/honker/action(atom/used_atom,mob/user as mob)
return check_step(used_atom,user)

/datum/construction/mecha/honker/custom_action(step, atom/used_atom, mob/user)
/datum/construction/reversible/mecha/honker/custom_action(index, diff, atom/used_atom, mob/user)
if(!..())
return 0

Expand All @@ -800,7 +800,7 @@
user.visible_message("HONK!")

//TODO: better messages.
switch(step)
switch(index)
if(10)
user.visible_message("[user] installs the central control module into the [holder].", "You install the central control module into the [holder].")
qdel(used_atom)
Expand Down Expand Up @@ -839,12 +839,12 @@
/datum/construction/mecha/reticence_chassis/spawn_result()
..("Reticence")
var/obj/item/mecha_parts/chassis/const_holder = holder
const_holder.construct = new /datum/construction/mecha/reticence(const_holder)
const_holder.construct = new /datum/construction/reversible/mecha/reticence(const_holder)
const_holder.density = 1
qdel(src)
return

/datum/construction/mecha/reticence
/datum/construction/reversible/mecha/reticence
result = "/obj/mecha/combat/reticence"
steps = list(list("key"=/obj/effect/dummy/mecha_emote_step),//1
list("key"=/obj/item/clothing/suit/suspenders),//2
Expand All @@ -857,10 +857,10 @@
list("key"=/obj/item/circuitboard/mecha/reticence/main),//9
)

/datum/construction/mecha/reticence/action(atom/used_atom,mob/user)
/datum/construction/reversible/mecha/reticence/action(atom/used_atom,mob/user)
return check_step(used_atom,user)

/datum/construction/mecha/reticence/custom_action(step, atom/used_atom, mob/user)
/datum/construction/reversible/mecha/reticence/custom_action(index, diff, atom/used_atom, mob/user)
if(!..())
return 0

Expand All @@ -870,7 +870,7 @@
qdel(used_atom)

//TODO: better messages.
switch(step)
switch(index)
if(9)
user.visible_message("[user] installs the central control module into the [holder].", "<span class='notice'>You install the central control module into the [holder].</span>")
qdel(used_atom)
Expand Down
4 changes: 2 additions & 2 deletions code/game/mecha/mecha_parts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,11 @@
emote = e

/obj/item/mecha_parts/chassis/reticence/hear_message(mob/living/M, msg)
if(!istype(M) || !istype(construct, /datum/construction/mecha/reticence))
if(!istype(M) || !istype(construct, /datum/construction/reversible/mecha/reticence))
return
// is the current step the dummy emote object?
var/list/steps = construct.steps
if(steps[steps.len]["key"] == /obj/effect/dummy/mecha_emote_step)
if(steps[construct.index]["key"] == /obj/effect/dummy/mecha_emote_step)
construct.action(new /obj/effect/dummy/mecha_emote_step(msg), M)

/obj/item/mecha_parts/part/reticence_torso
Expand Down
2 changes: 2 additions & 0 deletions code/modules/research/rdconsole.dm
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
// Somehow this href makes me very nervous
var/datum/tech/known = files.known_tech[params["id"]]
if(t_disk && known)
t_disk.name = "[t_disk.default_name] \[[known]\]"
t_disk.desc = known.desc + " Level: '[known.level]'"
t_disk.stored = known
menu = MENU_DISK
submenu = SUBMENU_MAIN
Expand Down
Loading