Skip to content

Commit

Permalink
Merge remote-tracking branch 'Nebula/dev' into update/devmerge-2022-0…
Browse files Browse the repository at this point in the history
…3-17
  • Loading branch information
hermaplusplus committed Mar 17, 2022
2 parents c989516 + 2787f42 commit e291ef6
Show file tree
Hide file tree
Showing 50 changed files with 549 additions and 186 deletions.
2 changes: 2 additions & 0 deletions code/__defines/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#define SPECIES_FLAG_NO_BLOCK BITFLAG(8) // Unable to block or defend itself from attackers.
#define SPECIES_FLAG_NEED_DIRECT_ABSORB BITFLAG(9) // This species can only have their DNA taken by direct absorption.
#define SPECIES_FLAG_LOW_GRAV_ADAPTED BITFLAG(10) // This species is used to lower than standard gravity, affecting stamina in high-grav
#define SPECIES_FLAG_CRYSTALLINE BITFLAG(11) // This species is made of crystalline material. Replaces var/is_crystalline.
#define SPECIES_FLAG_SYNTHETIC BITFLAG(12) // This species is synthetic/robotic and spawns with prosthetic limbs.

// Species spawn flags
#define SPECIES_IS_WHITELISTED BITFLAG(0) // Must be whitelisted to play.
Expand Down
13 changes: 6 additions & 7 deletions code/game/machinery/syndicatebeacon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@
src.updateUsrDialog()
return
charges -= 1
switch(rand(1,2))
if(1)
temptext = "<font color=red><i><b>Double-crosser. You planned to betray us from the start. Allow us to repay the favor in kind.</b></i></font>"
src.updateUsrDialog()
spawn(rand(50,200)) selfdestruct()
return
if(prob(50))
temptext = "<font color=red><i><b>Double-crosser. You planned to betray us from the start. Allow us to repay the favor in kind.</b></i></font>"
src.updateUsrDialog()
addtimer(CALLBACK(src, .proc/selfdestruct), rand(5, 20) SECONDS)
return
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/N = M
to_chat(M, "<B>You have joined the ranks of the Syndicate and become a traitor to the station!</B>")
Expand All @@ -76,7 +75,7 @@

/obj/machinery/syndicate_beacon/proc/selfdestruct()
selfdestructing = 1
spawn() explosion(src.loc, 1, rand(1,3), rand(3,8), 10)
INVOKE_ASYNC(GLOBAL_PROC, .proc/explosion, src.loc, 1, rand(1, 3), rand(3, 8), 10)

////////////////////////////////////////
//Singularity beacon
Expand Down
12 changes: 6 additions & 6 deletions code/game/objects/items/weapons/storage/storage_ui/default.dm
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
/datum/storage_ui/default/proc/arrange_item_slots(var/rows, var/cols)
var/cx = 4
var/cy = 2+rows
boxes.screen_loc = "LEFT+4:16,BOTTOM+2:16 to LEFT+[4+cols]:16,BOTTOM+[2+rows]:16"
boxes.screen_loc = "LEFT+3:16,BOTTOM+1.7:16 to LEFT+[3+cols]:16,BOTTOM+[1.7+rows]:16"

for(var/obj/O in storage.contents)
O.screen_loc = "LEFT+[cx]:16,BOTTOM+[cy]:16"
Expand All @@ -206,9 +206,9 @@
M.Scale((storage_width-storage_cap_width*2+3)/32,1)
storage_continue.transform = M

storage_start.screen_loc = "LEFT+4:16,BOTTOM+2:16"
storage_continue.screen_loc = "LEFT+4:[storage_cap_width+(storage_width-storage_cap_width*2)/2+2],BOTTOM+2:16"
storage_end.screen_loc = "LEFT+4:[19+storage_width-storage_cap_width],BOTTOM+2:16"
storage_start.screen_loc = "LEFT+3:16,BOTTOM+1.7:16"
storage_continue.screen_loc = "LEFT+3:[storage_cap_width+(storage_width-storage_cap_width*2)/2+2],BOTTOM+1.7:16"
storage_end.screen_loc = "LEFT+3:[19+storage_width-storage_cap_width],BOTTOM+1.7:16"

var/startpoint = 0
var/endpoint = 1
Expand All @@ -231,11 +231,11 @@
storage_start.overlays += stored_continue
storage_start.overlays += stored_end

O.screen_loc = "LEFT+4:[round((startpoint+endpoint)/2)+2-O.pixel_x],BOTTOM+2:[16-O.pixel_y]"
O.screen_loc = "LEFT+3:[round((startpoint+endpoint)/2)+2-O.pixel_x],BOTTOM+1.7:[16-O.pixel_y]"
O.maptext = ""
O.hud_layerise()

closer.screen_loc = "LEFT+4:[storage_width+19],BOTTOM+2:16"
closer.screen_loc = "LEFT+3:[storage_width+19],BOTTOM+1.7:16"

// Sets up numbered display to show the stack size of each stored mineral
// NOTE: numbered display is turned off currently because it's broken
Expand Down
14 changes: 14 additions & 0 deletions code/game/objects/items/weapons/storage/wallets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,20 @@
else
return ..()


/obj/item/storage/wallet/AltClick(mob/user)
if (user != loc || user.incapacitated() || !ishuman(user))
return ..()

var/obj/item/card/id/id = GetIdCard()
if (istype(id))
remove_from_storage(id)
user.put_in_hands(id)
return

return ..()


/obj/item/storage/wallet/random/Initialize()
. = ..()
var/item1_type = pick( /obj/item/cash/c10,/obj/item/cash/c100,/obj/item/cash/c1000,/obj/item/cash/c20,/obj/item/cash/c200,/obj/item/cash/c50, /obj/item/cash/c500)
Expand Down
13 changes: 13 additions & 0 deletions code/game/objects/structures/catwalk.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,19 @@
if(!QDELETED(src) && severity != 3)
physically_destroyed()

/obj/structure/catwalk/grab_attack(var/obj/item/grab/G)
var/mob/living/affecting_mob = G.get_affecting_mob()
if(atom_flags & ATOM_FLAG_CLIMBABLE)
var/obj/occupied = turf_is_crowded()
if (occupied)
to_chat(G.assailant, SPAN_WARNING("There's \a [occupied] in the way."))
return TRUE
G.affecting.forceMove(src.loc)
if(affecting_mob)
SET_STATUS_MAX(affecting_mob, STAT_WEAK, rand(2,5))
visible_message(SPAN_DANGER("[G.assailant] puts [G.affecting] on \the [src]."))
return TRUE

/obj/structure/catwalk/attack_robot(var/mob/user)
if(Adjacent(user))
attack_hand(user)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/doors/_door.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

/obj/structure/door/on_update_icon()
..()
icon_state = "[icon_base][!density ? "open" : ""]"
icon_state = "[icon_base][!density ? "_open" : ""]"

/obj/structure/door/proc/post_change_state()
update_nearby_tiles()
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/mineral_bath.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
var/repaired_organ

// Replace limbs for crystalline species.
if(H.species.is_crystalline && prob(10))
if((H.species.species_flags & SPECIES_FLAG_CRYSTALLINE) && prob(10))
for(var/limb_type in H.species.has_limbs)
var/obj/item/organ/external/E = H.get_organ(limb_type)
if(E && !E.is_usable() && !(E.limb_flags & ORGAN_FLAG_HEALS_OVERKILL))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
C.use(1)
if(!isturf(src.loc))
src.forceMove(get_turf(src))
playsound(src.loc, 'sound/effects/rustle5.ogg', 50, 1)
to_chat(user, "You add padding to \the [src].")
add_padding(padding_type)
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
I.appearance_flags |= RESET_COLOR
I.color = reinf_material.color
add_overlay(I)
if(has_special_overlay && buckled_mob)
if(has_special_overlay)
I = image(icon, "[icon_state]_special")
I.layer = buckled_mob ? ABOVE_HUMAN_LAYER : FLOAT_LAYER
if(material_alteration & MAT_FLAG_ALTERATION_COLOR)
Expand Down Expand Up @@ -220,6 +220,32 @@
/obj/structure/bed/chair/office/comfy/yellow
reinf_material = /decl/material/solid/cloth/yellow

/obj/structure/bed/chair/rounded
name = "rounded chair"
desc = "It's a rounded chair. It looks comfy."
icon_state = "roundedchair"

/obj/structure/bed/chair/rounded/brown
reinf_material = /decl/material/solid/leather
/obj/structure/bed/chair/rounded/red
reinf_material = /decl/material/solid/carpet
/obj/structure/bed/chair/rounded/teal
reinf_material = /decl/material/solid/cloth/teal
/obj/structure/bed/chair/rounded/black
reinf_material = /decl/material/solid/cloth/black
/obj/structure/bed/chair/rounded/green
reinf_material = /decl/material/solid/cloth/green
/obj/structure/bed/chair/rounded/purple
reinf_material = /decl/material/solid/cloth/purple
/obj/structure/bed/chair/rounded/blue
reinf_material = /decl/material/solid/cloth/blue
/obj/structure/bed/chair/rounded/beige
reinf_material = /decl/material/solid/cloth/beige
/obj/structure/bed/chair/rounded/lime
reinf_material = /decl/material/solid/cloth/lime
/obj/structure/bed/chair/rounded/yellow
reinf_material = /decl/material/solid/cloth/yellow

/obj/structure/bed/chair/shuttle
name = "shuttle seat"
desc = "A comfortable, secure seat. It has a sturdy-looking buckling system for smoother flights."
Expand Down
157 changes: 157 additions & 0 deletions code/game/objects/structures/stool_bed_chair_nest_sofa/sofa.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
/obj/structure/bed/sofa
name = "sofa"
desc = "A wide and comfy sofa - no one assistant was ate by it due production! It's made of wood and covered with colored cloth."
icon_state = "sofa"
color = "#666666"
buckle_dir = FALSE
buckle_lying = FALSE //force people to sit up in chairs when buckled
obj_flags = OBJ_FLAG_ROTATABLE
material = /decl/material/solid/wood

var/has_special_overlay = FALSE

/obj/structure/bed/sofa/do_simple_ranged_interaction(var/mob/user)
if(!buckled_mob && user)
rotate(user)
return TRUE

/obj/structure/bed/sofa/post_buckle_mob()
update_icon()
return ..()

/obj/structure/bed/attackby(obj/item/W, mob/user) //made to be able to rotate the sofa
. = ..()
if(.)
return
if(!isWrench(W))
return
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
anchored = !anchored
if(anchored)
to_chat(user, "You disanchored \the [src].")
else
to_chat(user, "You anchored \the [src].")

/obj/structure/bed/sofa/on_update_icon()
..()
var/image/I = image(icon, "[icon_state]_over")
I.layer = buckled_mob ? ABOVE_HUMAN_LAYER : FLOAT_LAYER
if(material_alteration & MAT_FLAG_ALTERATION_COLOR)
I.appearance_flags |= RESET_COLOR
I.color = material.color
add_overlay(I)
I = image(icon, "[icon_state]_armrest")
I.layer = buckled_mob ? ABOVE_HUMAN_LAYER : FLOAT_LAYER
if(material_alteration & MAT_FLAG_ALTERATION_COLOR)
I.appearance_flags |= RESET_COLOR
I.color = material.color
add_overlay(I)
if(reinf_material)
I = image(icon, "[icon_state]_padding_over")
I.layer = buckled_mob ? ABOVE_HUMAN_LAYER : FLOAT_LAYER
if(material_alteration & MAT_FLAG_ALTERATION_COLOR)
I.appearance_flags |= RESET_COLOR
I.color = reinf_material.color
add_overlay(I)
I = image(icon, "[icon_state]_padding_armrest")
I.layer = buckled_mob ? ABOVE_HUMAN_LAYER : FLOAT_LAYER
if(material_alteration & MAT_FLAG_ALTERATION_COLOR)
I.appearance_flags |= RESET_COLOR
I.color = reinf_material.color
add_overlay(I)
if(has_special_overlay && buckled_mob)
I = image(icon, "[icon_state]_special")
I.layer = buckled_mob ? ABOVE_HUMAN_LAYER : FLOAT_LAYER
if(material_alteration & MAT_FLAG_ALTERATION_COLOR)
I.appearance_flags |= RESET_COLOR
I.color = material.color
add_overlay(I)

/obj/structure/bed/sofa/rotate(mob/user)
if(!CanPhysicallyInteract(user) || anchored)
to_chat(user, SPAN_NOTICE("You can't interact with \the [src] right now!"))
return

set_dir(turn(dir, 90))
update_icon()

/obj/structure/bed/sofa/m/rotate(mob/user)
if(!CanPhysicallyInteract(user) || anchored)
to_chat(user, SPAN_NOTICE("You can't interact with \the [src] right now!"))
return

set_dir(turn(dir, 45))
update_icon()

/obj/structure/bed/sofa/m/red
reinf_material = /decl/material/solid/carpet
/obj/structure/bed/sofa/m/brown
reinf_material = /decl/material/solid/leather
/obj/structure/bed/sofa/m/teal
reinf_material = /decl/material/solid/cloth/teal
/obj/structure/bed/sofa/m/black
reinf_material = /decl/material/solid/cloth/black
/obj/structure/bed/sofa/m/green
reinf_material = /decl/material/solid/cloth/green
/obj/structure/bed/sofa/m/purple
reinf_material = /decl/material/solid/cloth/purple
/obj/structure/bed/sofa/m/blue
reinf_material = /decl/material/solid/cloth/blue
/obj/structure/bed/sofa/m/beige
reinf_material = /decl/material/solid/cloth/beige
/obj/structure/bed/sofa/m/lime
reinf_material = /decl/material/solid/cloth/lime
/obj/structure/bed/sofa/m/yellow
reinf_material = /decl/material/solid/cloth/yellow

/obj/structure/bed/sofa/r
name = "sofa"
desc = "A wide and comfy sofa - no one assistant was ate by it due production! It's made of wood and covered with colored cloth."
icon_state = "sofa_r"

/obj/structure/bed/sofa/r/red
reinf_material = /decl/material/solid/carpet
/obj/structure/bed/sofa/r/brown
reinf_material = /decl/material/solid/leather
/obj/structure/bed/sofa/r/teal
reinf_material = /decl/material/solid/cloth/teal
/obj/structure/bed/sofa/r/black
reinf_material = /decl/material/solid/cloth/black
/obj/structure/bed/sofa/r/green
reinf_material = /decl/material/solid/cloth/green
/obj/structure/bed/sofa/r/purple
reinf_material = /decl/material/solid/cloth/purple
/obj/structure/bed/sofa/r/blue
reinf_material = /decl/material/solid/cloth/blue
/obj/structure/bed/sofa/r/beige
reinf_material = /decl/material/solid/cloth/beige
/obj/structure/bed/sofa/r/lime
reinf_material = /decl/material/solid/cloth/lime
/obj/structure/bed/sofa/r/yellow
reinf_material = /decl/material/solid/cloth/yellow

/obj/structure/bed/sofa/l
name = "sofa"
desc = "A wide and comfy sofa - no one assistant was ate by it due production! It's made of wood and covered with colored cloth."
icon_state = "sofa_l"

/obj/structure/bed/sofa/l/red
reinf_material = /decl/material/solid/carpet
/obj/structure/bed/sofa/l/brown
reinf_material = /decl/material/solid/leather
/obj/structure/bed/sofa/l/teal
reinf_material = /decl/material/solid/cloth/teal
/obj/structure/bed/sofa/l/black
reinf_material = /decl/material/solid/cloth/black
/obj/structure/bed/sofa/l/green
reinf_material = /decl/material/solid/cloth/green
/obj/structure/bed/sofa/l/purple
reinf_material = /decl/material/solid/cloth/purple
/obj/structure/bed/sofa/l/blue
reinf_material = /decl/material/solid/cloth/blue
/obj/structure/bed/sofa/l/beige
reinf_material = /decl/material/solid/cloth/beige
/obj/structure/bed/sofa/l/lime
reinf_material = /decl/material/solid/cloth/lime
/obj/structure/bed/sofa/l/yellow
reinf_material = /decl/material/solid/cloth/yellow
13 changes: 11 additions & 2 deletions code/game/objects/structures/window.dm
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,16 @@
if(G.damage_stage() < 2)
G.affecting.visible_message(SPAN_DANGER("[G.assailant] bashes [G.affecting] against \the [src]!"))
if(prob(50))
SET_STATUS_MAX(affecting_mob, STAT_WEAK, 1)
SET_STATUS_MAX(affecting_mob, STAT_WEAK, 2)
affecting_mob.apply_damage(10, BRUTE, def_zone, used_weapon = src)
hit(25)
qdel(G)
else
G.affecting.visible_message(SPAN_DANGER("[G.assailant] crushes [G.affecting] against \the [src]!"))
SET_STATUS_MAX(affecting_mob, STAT_WEAK, 5)
affecting_mob.apply_damage(20, BRUTE, def_zone, used_weapon = src)
hit(50)
qdel(G)
return TRUE

/obj/structure/window/proc/hit(var/damage, var/sound_effect = 1)
Expand All @@ -333,6 +335,13 @@
set_dir(turn(dir, 90))
update_nearby_tiles(need_rebuild=1)

/obj/structure/window/set_dir(ndir)
. = ..()
if(is_fulltile())
atom_flags &= ~ATOM_FLAG_CHECKS_BORDER
else
atom_flags |= ATOM_FLAG_CHECKS_BORDER

/obj/structure/window/update_nearby_tiles(need_rebuild)
. = ..()
for(var/obj/structure/S in orange(loc, 1))
Expand Down Expand Up @@ -421,7 +430,7 @@
basestate = reinf_basestate
else
basestate = initial(basestate)

..()

if (paint_color)
Expand Down
Loading

0 comments on commit e291ef6

Please sign in to comment.